From: Damian <ddtest@gmail.com>
To: emacs-orgmode@gnu.org, mail@nicolasgoaziou.fr
Subject: Re: Bug: missing `save-excursion' in `org-fast-tag-selection' [9.2.3 (9.2.3-9-g0803e2-elpa @ /home/il/.emacs.d/elpa/org-20190422/)]
Date: Wed, 1 May 2019 09:03:37 -0700 [thread overview]
Message-ID: <6e5d946f-398f-346a-eeaa-2e0729d631e8@gmail.com> (raw)
Ingo Lohmar <address@hidden> writes:
> I tried to use `org-agenda-set-tags'. The source buffer (where the
> change should be applied) is visible at the same time as the agenda is.
> Also, fast tag selection with a single key is enabled.
>
> Under these circumstances, the tag text is appended to the line (not
> even necessarily a heading!) where point is in the source buffer visible
> next to the agenda, instead of the correct heading that I acted upon.
>
> I tracked this done to a missing `save-excursion' wrapped around the
> `save-window-excursion' in `org-fast-tag-selection' (org.el line 14567
> in my version). This would be analogous to what is done in
> `org-fast-todo-selection' and fixes my issue.
I am experiencing the same issue. Based on Ingo's analysis I made the
following change which resolved the problem for me.
Thanks,
-Damian
diff --git a/lisp/org.el b/lisp/org.el
index 94713a7e5..3f2bd5758 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12484,6 +12484,7 @@ Returns the new tags string, or nil to not
change the current settings."
" "
(make-string (- org-tags-column (current-column)) ?\
))))))
(move-overlay org-tags-overlay ov-start ov-end)
+ (save-excursion
(save-window-excursion
(if expert
(set-buffer (get-buffer-create " *Org tags*"))
@@ -12645,7 +12646,7 @@ Returns the new tags string, or nil to not
change the current settings."
(delete-overlay org-tags-overlay)
(if rtn
(mapconcat 'identity current ":")
- nil))))
+ nil)))))
(defun org-make-tag-string (tags)
"Return string associated to TAGS.
next reply other threads:[~2019-05-01 16:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 16:03 Damian [this message]
2019-05-09 20:05 ` Bug: missing `save-excursion' in `org-fast-tag-selection' [9.2.3 (9.2.3-9-g0803e2-elpa @ /home/il/.emacs.d/elpa/org-20190422/)] Nicolas Goaziou
-- strict thread matches above, loose matches on Subject: below --
2019-04-27 10:45 Ingo Lohmar
2019-04-29 17:21 ` Nicolas Goaziou
2019-04-26 17:51 Ingo Lohmar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e5d946f-398f-346a-eeaa-2e0729d631e8@gmail.com \
--to=ddtest@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).