changeset 76277:4f84c10773de

(org-set-tags): Prevent slipping of point during completion.
author Carsten Dominik <dominik@science.uva.nl>
date Sat, 03 Mar 2007 11:08:14 +0000
parents 786d717284e3
children dc5475982593
files lisp/textmodes/org.el
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/org.el	Sat Mar 03 11:07:24 2007 +0000
+++ b/lisp/textmodes/org.el	Sat Mar 03 11:08:14 2007 +0000
@@ -5,7 +5,7 @@
 ;; Author: Carsten Dominik <dominik at science dot uva dot nl>
 ;; Keywords: outlines, hypermedia, calendar, wp
 ;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
-;; Version: 4.67b
+;; Version: 4.67c
 ;;
 ;; This file is part of GNU Emacs.
 ;;
@@ -83,7 +83,7 @@
 
 ;;; Version
 
-(defvar org-version "4.67b"
+(defvar org-version "4.67c"
   "The version number of the file org.el.")
 (defun org-version ()
   (interactive)
@@ -11627,8 +11627,9 @@
 		  (org-fast-tag-selection current-tags inherited-tags table)
 		(let ((org-add-colon-after-tag-completion t))
 		  (org-trim
-		   (completing-read "Tags: " 'org-tags-completion-function
-				    nil nil current 'org-tags-history)))))
+		   (save-excursion
+		     (completing-read "Tags: " 'org-tags-completion-function
+				      nil nil current 'org-tags-history))))))
 	(while (string-match "[-+&]+" tags)
 	  ;; No boolean logic, just a list
 	  (setq tags (replace-match ":" t t tags))))
@@ -11636,7 +11637,7 @@
           (setq tags "")
 	(unless (string-match ":$" tags) (setq tags (concat tags ":")))
 	(unless (string-match "^:" tags) (setq tags (concat ":" tags))))
-
+      
       ;; Insert new tags at the correct column
       (beginning-of-line 1)
       (if (re-search-forward