emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Noorul Islam K M <noorul@noorul.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] - Fix org-fast-tag-selection
Date: Tue, 03 Apr 2012 16:13:05 +0530	[thread overview]
Message-ID: <87fwclayfa.fsf@noman.maa.corp.collab.net> (raw)

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


Hello all,

I have the following setup similar to Bernt Hansen.

(setq org-tag-alist (quote ((:startgroup)
                            ("@errand" . ?e)
                            ("@office" . ?o)
                            ("@home" . ?h)
                            (:endgroup)
                            ("PHONE" . ?p)
                            ("WAITING" . ?w)
                            ("HOME" . ?H)
                            ("CANCELLED" . ?c)
                            ("NOTE" . ?n)
                            ("ORG" . ?O))))

New when I try to add a new tag with the key press "C-c C-q TAB" from a
heading, I get following backtrace.

Debugger entered--Lisp error: (wrong-type-argument stringp :endgroup)
  string-match("" :endgroup)
  ido-read-internal(list "Tag: " nil nil nil nil)
  ido-completing-read("Tag: " (#("REFILE" 0 6 (inherited t)) :startgroup "@errand" "@office" "@home" :endgroup "PHONE" "WAITING" "HOME" "CANCELLED" "NOTE" "ORG"))
  apply(ido-completing-read "Tag: " (#("REFILE" 0 6 (inherited t)) :startgroup "@errand" "@office" "@home" :endgroup "PHONE" "WAITING" "HOME" "CANCELLED" "NOTE" "ORG") nil)
  org-icompleting-read("Tag: " (#("REFILE" 0 6 (inherited t)) :startgroup "@errand" "@office" "@home" :endgroup "PHONE" "WAITING" "HOME" "CANCELLED" "NOTE" "ORG"))
  org-fast-tag-selection(nil (#("REFILE" 0 6 (inherited t))) ((:startgroup) ("@errand" . 101) ("@office" . 111) ("@home" . 104) (:endgroup) ("PHONE" . 112) ("WAITING" . 119) ("HOME" . 72) ("CANCELLED" . 99) ("NOTE" . 110) ("ORG" . 79) (#("REFILE" 0 6 (inherited t)))) nil)
  org-set-tags(nil nil)
  org-set-tags-command(nil)
  call-interactively(org-set-tags-command nil nil)

I think I nailed down the problem and fixed it in the attached patch.

Changelog:

* lisp/org.el (org-fast-tag-selection): Remove non-string object from org-tag-alist.

Thanks and Regards
Noorul


[-- Attachment #2: org.el.todo.fast.selection.txt --]
[-- Type: text/plain, Size: 573 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 8ffb6c8..2df860e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13756,7 +13756,10 @@ Returns the new tags string, or nil to not change the current settings."
 				 (append (or buffer-tags
 					     (with-current-buffer buf
 					       (mapcar 'car (org-get-buffer-tags))))
-					 (mapcar 'car table)))))
+					 (delq nil 
+					       (mapcar (lambda (x) 
+							 (if (stringp 
+							      (car x)) x)) table))))))
 		    (quit (setq tg "")))
 		  (when (string-match "\\S-" tg)
 		    (add-to-list 'buffer-tags (list tg))

             reply	other threads:[~2012-04-03 10:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 10:43 Noorul Islam K M [this message]
2012-04-03 12:10 ` [PATCH] - Fix org-fast-tag-selection Bastien
2012-04-03 13:48   ` Noorul Islam Kamal Malmiyoda
2012-04-03 13:57     ` Bastien
2012-04-03 14:02       ` Noorul Islam Kamal Malmiyoda
2012-04-03 14:29         ` Bastien
2012-04-03 13:45 ` Nick Dokos
2012-04-03 16:13 ` Bernt Hansen
2012-04-03 21:42   ` Nick Dokos
2012-04-04  5:56     ` Bastien
2012-04-04 11:16       ` Bernt Hansen
2012-04-04 13:54         ` Nick Dokos
2012-04-10 16:41         ` Bastien

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=87fwclayfa.fsf@noman.maa.corp.collab.net \
    --to=noorul@noorul.com \
    --cc=emacs-orgmode@gnu.org \
    /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).