From mboxrd@z Thu Jan 1 00:00:00 1970 From: Norbert Zeh Subject: Re: Customizing agenda line format Date: Tue, 14 Sep 2010 14:21:21 -0300 Message-ID: <20100914172121.GA4640@cs.dal.ca> References: <20100913134826.GU4640@cs.dal.ca> <878w35v4o9.fsf@archeee.localdomain> <20100913211530.GY4640@cs.dal.ca> <87eicxp743.fsf@archeee.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=37736 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvZCe-0001Pl-72 for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 13:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvZCc-0003MO-PQ for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 13:21:56 -0400 Received: from hammer.cs.dal.ca ([129.173.22.32]:55213) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvZCb-0003JB-NT for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 13:21:54 -0400 Received: from monad.zehub.ca (NZeh.CS.Dal.Ca [129.173.213.24]) by hammer.cs.dal.ca (Postfix) with ESMTP id 36C30504FD for ; Tue, 14 Sep 2010 14:21:18 -0300 (ADT) Received: from nzeh by monad.zehub.ca with local (Exim 4.69) (envelope-from ) id 1OvZC5-0001yi-8W for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 14:21:21 -0300 Content-Disposition: inline In-Reply-To: <87eicxp743.fsf@archeee.localdomain> 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: Org Mode Mailing List Matt Lundin [2010.09.13 1916 -0400]: > Norbert Zeh writes: > > > Matt Lundin [2010.09.13 1512 -0400]: > >> Norbert Zeh writes: > >> > >> > Is there a way to freely customize the format of lines in the weekly > >> > agenda or todo list. > >> ... > >> > I have a bunch of todo items that have a special todo state, say SPECIAL. > >> > I don't want those included in my weekly agenda, but rather have a block > >> > agenda where one of the blocks lists all todo items with todo state > >> > SPECIAL. Clearly, since this block includes only items that are > >> > SPECIAL, listing this tag at the beginning of each entry's line is > >> > redundant information. So I'd like to remove the TODO state. For > >> > example, the org file entry > >> > > >> > * SPECIAL Call mom > >> > > >> > should appear simply as > >> > > >> > Call mom > >> > > >> > in that block of my agenda. Can this be done? > >> > >> Check out the variable org-agenda-todo-keyword-format. > >> > >> E.g., > >> > >> --8<---------------cut here---------------start------------->8--- > >> (setq org-agenda-custom-commands > >> '(("x" "Special" todo "SPECIAL" > >> ((org-agenda-todo-keyword-format ""))))) > >> --8<---------------cut here---------------end--------------->8--- > >> > >> The variable org-agenda-prefix-format might also be of interest. > > > > Well, I tried setting org-agenda-todo-keyword-format to "%0s", which > > didn't work, but I didn't think about the above. So I tried this now. > > It does remove the todo keyword, but it does only that. In particular, > > there is now a space at the beginning of each line, which I assume is > > simply the space in the headline that succeeds the todo keyword. Any > > way of getting rid of that? Thanks for the pointer so far. > > > > The information at the beginning of the line is controlled by > org-agenda-prefix-format. What is the value of org-agenda-prefix-format > on your machine? It seems to be more complicated than that. Here's what I found out by tinkering around with settings a little. Setting org-agenda-prefix-format to "" (as I already did before) correctly removes the prefix *before* the TODO keyword. The formatting function for everything starting with the TODO keyword, however, seems to unconditionally insert a space between the TODO keyword and the rest of the line. Thus, even if the TODO keyword is empty (by setting org-agenda-todo-keyword-format to ""), there is still a space after the now empty TODO keyword. Hence, the extra space at the beginning of the line. To me it seems like there's no way around this with the standard org mode settings. Cheers, Norbert