aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Dominik2007-03-03 11:08:14 +0000
committerCarsten Dominik2007-03-03 11:08:14 +0000
commitb08b89d027dd8cd409faee81a066c83ae3c06bc0 (patch)
treeed5e7fa4e6aba00e34b28f9fee7bd03d9bbb3e8c
parent77c0d5951aa619b163efc84767fa22d3f359f726 (diff)
downloademacs-b08b89d027dd8cd409faee81a066c83ae3c06bc0.tar.gz
emacs-b08b89d027dd8cd409faee81a066c83ae3c06bc0.zip
(org-set-tags): Prevent slipping of point during completion.
-rw-r--r--lisp/textmodes/org.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 61d4a690ef9..5cab0fd8f01 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.67b 8;; Version: 4.67c
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -83,7 +83,7 @@
83 83
84;;; Version 84;;; Version
85 85
86(defvar org-version "4.67b" 86(defvar org-version "4.67c"
87 "The version number of the file org.el.") 87 "The version number of the file org.el.")
88(defun org-version () 88(defun org-version ()
89 (interactive) 89 (interactive)
@@ -11627,8 +11627,9 @@ With prefix ARG, realign all tags in headings in the current buffer."
11627 (org-fast-tag-selection current-tags inherited-tags table) 11627 (org-fast-tag-selection current-tags inherited-tags table)
11628 (let ((org-add-colon-after-tag-completion t)) 11628 (let ((org-add-colon-after-tag-completion t))
11629 (org-trim 11629 (org-trim
11630 (completing-read "Tags: " 'org-tags-completion-function 11630 (save-excursion
11631 nil nil current 'org-tags-history))))) 11631 (completing-read "Tags: " 'org-tags-completion-function
11632 nil nil current 'org-tags-history))))))
11632 (while (string-match "[-+&]+" tags) 11633 (while (string-match "[-+&]+" tags)
11633 ;; No boolean logic, just a list 11634 ;; No boolean logic, just a list
11634 (setq tags (replace-match ":" t t tags)))) 11635 (setq tags (replace-match ":" t t tags))))
@@ -11636,7 +11637,7 @@ With prefix ARG, realign all tags in headings in the current buffer."
11636 (setq tags "") 11637 (setq tags "")
11637 (unless (string-match ":$" tags) (setq tags (concat tags ":"))) 11638 (unless (string-match ":$" tags) (setq tags (concat tags ":")))
11638 (unless (string-match "^:" tags) (setq tags (concat ":" tags)))) 11639 (unless (string-match "^:" tags) (setq tags (concat ":" tags))))
11639 11640
11640 ;; Insert new tags at the correct column 11641 ;; Insert new tags at the correct column
11641 (beginning-of-line 1) 11642 (beginning-of-line 1)
11642 (if (re-search-forward 11643 (if (re-search-forward