emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* helm-mode-org-set-tags adding additional tags
@ 2015-08-11 21:36 Stephen J. Barr
  2015-08-13  4:31 ` [PATCH] " Matt Lundin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Stephen J. Barr @ 2015-08-11 21:36 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Hello,

I am using org-mode 8.2.10 with helm. When I am adding tags to a headline,
the first tag offers me completions of all possible tags in the file.
However, if I go back later and add additional tags, I am not offered
completion. How can I fix this?

Thanks,
Stephen


Stephen J. Barr
PhD Student, Operations Management
Dept: Information Systems and Operations Management (ISOM)
Michael G. Foster School of Business
University of Washington
Phone:  425 516 5012
Email: stevejb@uw.edu
Twitter: @stevejb
Website: http://steve.planetbarr.com

[-- Attachment #2: Type: text/html, Size: 1289 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] Re: helm-mode-org-set-tags adding additional tags
  2015-08-11 21:36 helm-mode-org-set-tags adding additional tags Stephen J. Barr
@ 2015-08-13  4:31 ` Matt Lundin
  2015-08-14  0:04   ` Nicolas Goaziou
  2015-08-18 16:17 ` Bastien
  2015-08-18 16:17 ` Bastien
  2 siblings, 1 reply; 5+ messages in thread
From: Matt Lundin @ 2015-08-13  4:31 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

"Stephen J. Barr" <stevejb@uw.edu> writes:

> I am using org-mode 8.2.10 with helm. When I am adding tags to a
> headline, the first tag offers me completions of all possible tags in
> the file. However, if I go back later and add additional tags, I am
> not offered completion. How can I fix this?

I can confirm that this is not just a helm problem. There is a bug with
all completion backends with the the following *default* settings:

(setq org-use-fast-tag-selection 'auto) ;; provided that shortcuts are
                                        ;; defined in org-tag-alist
(setq org-fast-tag-selection-single-key nil)
(setq org-complete-tags-always-offer-all-agenda-tags nil)

Steps to replicate (without helm):

M-x org-set-tags
[Tab] Select via completion [Ret]
[Tab] Only the most recent tab appears [Ret]

The following patch should fix the problem.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-completion-when-selecting-more-than-one-tag.patch --]
[-- Type: text/x-diff, Size: 1014 bytes --]

From 370ba61a4647bb97d2233ccb6ef84db033824248 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Wed, 12 Aug 2015 23:22:22 -0500
Subject: [PATCH] Fix completion when selecting more than one tag

* lisp/org.el (org-fast-tag-selection): Make sure to set local variable
  buffer-tags to actual buffer-tags before pushing selected tag to the
  list; otherwise, the subsequent completion list will be limited to the
  one selected tag.
---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index a908d9e..d7528fc 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15314,7 +15314,8 @@ Returns the new tags string, or nil to not change the current settings."
 				"Tag: "
 				(or buffer-tags
 				    (with-current-buffer buf
-				      (org-get-buffer-tags)))))
+				      (setq buffer-tags
+					    (org-get-buffer-tags))))))
 		    (quit (setq tg "")))
 		  (when (string-match "\\S-" tg)
 		    (add-to-list 'buffer-tags (list tg))
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Re: helm-mode-org-set-tags adding additional tags
  2015-08-13  4:31 ` [PATCH] " Matt Lundin
@ 2015-08-14  0:04   ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2015-08-14  0:04 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Stephen J. Barr, emacs-orgmode

Hello,

Matt Lundin <mdl@imapmail.org> writes:

> The following patch should fix the problem.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: helm-mode-org-set-tags adding additional tags
  2015-08-11 21:36 helm-mode-org-set-tags adding additional tags Stephen J. Barr
  2015-08-13  4:31 ` [PATCH] " Matt Lundin
@ 2015-08-18 16:17 ` Bastien
  2015-08-18 16:17 ` Bastien
  2 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2015-08-18 16:17 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: emacs-orgmode

Hi Stephen,

"Stephen J. Barr" <stevejb@uw.edu> writes:

> I am using org-mode 8.2.10 with helm. When I am adding tags to a
> headline, the first tag offers me completions of all possible tags in
> the file. However, if I go back later and add additional tags, I am
> not offered completion. How can I fix this?

I'm not clear on how to reproduce this problem.

Can you go through the details step by step?

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: helm-mode-org-set-tags adding additional tags
  2015-08-11 21:36 helm-mode-org-set-tags adding additional tags Stephen J. Barr
  2015-08-13  4:31 ` [PATCH] " Matt Lundin
  2015-08-18 16:17 ` Bastien
@ 2015-08-18 16:17 ` Bastien
  2 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2015-08-18 16:17 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: emacs-orgmode

PS: also, if an external package is used, please explain how to
install and use it for the debugging purpose.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-18 16:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-11 21:36 helm-mode-org-set-tags adding additional tags Stephen J. Barr
2015-08-13  4:31 ` [PATCH] " Matt Lundin
2015-08-14  0:04   ` Nicolas Goaziou
2015-08-18 16:17 ` Bastien
2015-08-18 16:17 ` Bastien

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).