From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] fast tag selection interface Date: Tue, 17 Feb 2009 22:00:48 +0100 Message-ID: <5A3737B9-DE28-473F-B9B1-B5385DBA1A49@uva.nl> References: <181D70D7-85EC-4010-ABD5-8F18C785337E@gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZX3m-0000M7-Df for emacs-orgmode@gnu.org; Tue, 17 Feb 2009 16:00:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZX3l-0000Lv-6f for emacs-orgmode@gnu.org; Tue, 17 Feb 2009 16:00:53 -0500 Received: from [199.232.76.173] (port=43891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZX3k-0000Ls-Ub for emacs-orgmode@gnu.org; Tue, 17 Feb 2009 16:00:52 -0500 Received: from nf-out-0910.google.com ([64.233.182.186]:48531) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZX3k-00017G-9k for emacs-orgmode@gnu.org; Tue, 17 Feb 2009 16:00:52 -0500 Received: by nf-out-0910.google.com with SMTP id d3so353883nfc.26 for ; Tue, 17 Feb 2009 13:00:51 -0800 (PST) In-Reply-To: <181D70D7-85EC-4010-ABD5-8F18C785337E@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christopher Suckling Cc: org-mode mailing list On Feb 16, 2009, at 1:15 AM, Christopher Suckling wrote: > As a result of the 40 variables thread and assorted worg tutorials, > I'm getting a little carried away with customising my workflow. > Consequently, my tag list have grown to the extent that the fast > tags selection interface is looking rather messy. > > The small patch below adds the capability to create arbitrary new > lines, either by adding "\n" (backslash n, not a newline!) to your # > +TAGS: or by adding "(:newline . nil)" to org-tag-alist. > > So I can have something like: > > ----- > [a] @assorted [g] @gtd [c] @contexts > > [o] other [r] relevant [t] tags > > [m] more [f] for [d] different [p] projects > ----- I am not convinced that this helps a lot. Do ou really think it is much better? The patch looks good and complete! Do you have a copyright assignment with the FSF? Not absolutely necessary for this small a patch, but still... - Carsten > > > The patch is a very hacky cut and paste job with little > understanding of the surrounding code, but I don't seem to have > broken anything in my setup yet... > > Best wishes, > > Christopher > > ----- > > Modified lisp/org.el > diff --git a/lisp/org.el b/lisp/org.el > index c4cfacd..484df30 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -2066,7 +2066,8 @@ See the manual for details." > (cons (string :tag "Tag name") > (character :tag "Access char")) > (const :tag "Start radio group" (:startgroup)) > - (const :tag "End radio group" (:endgroup))))) > + (const :tag "End radio group" (:endgroup)) > + (const :tag "New line" (:newline))))) > > (defvar org-file-tags nil > "List of tags that can be inherited by all entries in the file. > @@ -3398,6 +3399,7 @@ means to push this value onto the list in the > variable.") > (cond > ((equal e "{") (push '(:startgroup) tgs)) > ((equal e "}") (push '(:endgroup) tgs)) > + ((equal e "\\n") (push '(:newline) tgs)) > ((string-match (org-re "^\\([[:alnum:]_@]+\\)(\\(.\\))$") e) > (push (cons (match-string 1 e) > (string-to-char (match-string 2 e))) > @@ -3534,6 +3536,7 @@ Respect keys that are already there." > (cond > ((equal e '(:startgroup)) (push e new)) > ((equal e '(:endgroup)) (push e new)) > + ((equal e '(:newline)) (push e new)) > (t > (setq k (car e) c2 nil) > (if (cdr e) > @@ -8866,6 +8869,8 @@ Returns the new TODO keyword, or nil if no > state change should occur." > ((equal e '(:endgroup)) > (setq ingroup nil cnt 0) > (insert "}\n")) > + ((equal e '(:newline)) > + (insert "\n ")) > (t > (setq tg (car e) c (cdr e)) > (if ingroup (push tg (car groups))) > @@ -10316,6 +10321,8 @@ Returns the new tags string, or nil to not > change the current settings." > ((equal e '(:endgroup)) > (setq ingroup nil cnt 0) > (insert "}\n")) > + ((equal e '(:newline)) > + (insert "\n ")) > (t > (setq tg (car e) c2 nil) > (if (cdr e) > > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode