瀏覽代碼

Removed unecessary invocations of org-agenda-show.

lisp/org-agenda.el (org-agenda-set-tags): Remove org-agenda-show to prevent
disrupting windows and changing point in original buffer.
(org-agenda-set-property): Same
(org-agenda-set-effort): Same
(org-agenda-toggle-archive-tag): Same

When setting a tag in the agenda, org-mode displays the corresponding
entry in the original org buffer by calling org-agenda-show. This has
the unwelcome side-effect of disrupting the current window arrangement
and changing the position of the point in the original buffer. This
behavior is inconsistent with the that of org-agenda-todo, which makes
all its changes "silently."

Here is the offending line (6799) in org-agenda-set-tags:

--8<---------------cut here---------------start------------->8---
(org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
--8<---------------cut here---------------end--------------->8---

The same line occurs in org-agenda-set-property, org-agenda-set-effort,
and org-agenda-toggle-archive tag.
Matt Lundin 14 年之前
父節點
當前提交
95a8b0680e
共有 1 個文件被更改,包括 0 次插入4 次删除
  1. 0 4
      lisp/org-agenda.el

+ 0 - 4
lisp/org-agenda.el

@@ -7296,7 +7296,6 @@ the same tree node, and the headline of the tree node in the Org-mode file."
   (org-agenda-check-no-diary)
   (if (and (org-region-active-p) (interactive-p))
       (call-interactively 'org-change-tag-in-region)
-    (org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
     (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
 			 (org-agenda-error)))
 	   (buffer (marker-buffer hdmarker))
@@ -7325,7 +7324,6 @@ the same tree node, and the headline of the tree node in the Org-mode file."
   "Set a property for the current headline."
   (interactive)
   (org-agenda-check-no-diary)
-  (org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
   (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
 		       (org-agenda-error)))
 	 (buffer (marker-buffer hdmarker))
@@ -7348,7 +7346,6 @@ the same tree node, and the headline of the tree node in the Org-mode file."
   "Set the effort property for the current headline."
   (interactive)
   (org-agenda-check-no-diary)
-  (org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
   (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
 		       (org-agenda-error)))
 	 (buffer (marker-buffer hdmarker))
@@ -7372,7 +7369,6 @@ the same tree node, and the headline of the tree node in the Org-mode file."
   "Toggle the archive tag for the current entry."
   (interactive)
   (org-agenda-check-no-diary)
-  (org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
   (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
                        (org-agenda-error)))
 	 (buffer (marker-buffer hdmarker))