all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Markus Heller <hellerm2@gmail.com>
To: emacs-orgmode@gnu.org
Subject: %? has no effect for org-agenda-prefix-format
Date: Wed, 16 Mar 2016 21:58:27 +0000 (UTC)	[thread overview]
Message-ID: <loom.20160316T224949-149@post.gmane.org> (raw)

Excerpt from describe-variable org-agenda-prefix-format:

If the first character after `%' is a question mark, the entire field
will only be included if the corresponding value applies to the current
entry.  This is useful for fields which should have fixed width when
present, but zero width when absent.  For example, "%?-12t" will
result in a 12 character time field if a time of the day is specified,
but will completely disappear in entries which do not contain a time.

This does not work for me (emacs 24.3, Org-mode version 8.2.10 (8.2.10-
41-g42228a-elpa)).

Excerpt from agenda view:

<excerpt agenda view>
Project Subtasks
  INFRA nil : TODO Purchase Fragment Library
</excerpt agenda view>

Excerpt from org file (Not that the task in question has no Property 
drawer at all):

<excerpt org file>
* Other Infrastructure Development
:PROPERTIES:
:CATEGORY: INFRA
:END:
** TODO NMR-based Fragment Screen
*** TODO Purchase Fragment Library
</excerpt org file>

Here's the definition of org-agenda-prefix-format from my .emacs:

<excerpt from .emacs>
((org-agenda-prefix-format "  %-5c %?-4(setq type (org-entry-get (point) 
\"Type\")): ")
</excerpt from .emacs>

There is a similar thread on stackexchange from March 10 on this 
(http://stackoverflow.com/questions/35910204/org-agenda-prefix-format-
does-not-work).

Is this a bug?

Thanks
Markus

             reply	other threads:[~2016-03-16 21:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 21:58 Markus Heller [this message]
2016-03-16 22:43 ` %? has no effect for org-agenda-prefix-format Christophe Schockaert

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20160316T224949-149@post.gmane.org \
    --to=hellerm2@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.