emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Joe Vornehm Jr." <joe.vornehm@gmail.com>
To: emacs-orgmode@gnu.org
Cc: "Joe Vornehm Jr." <joe.vornehm@gmail.com>
Subject: Patch: Customize failure for org-agenda-custom-commands
Date: Mon, 19 Mar 2012 17:23:45 -0400	[thread overview]
Message-ID: <4F67A3E1.4060703@gmail.com> (raw)

The Customize interface for org-agenda-custom-commands fails for agenda commands with an org-agenda-entry-types command option.  The reason it fails is that the org-agenda-entry-types option should be a quoted list, but the defcustom expression doesn't add the quote properly.  A patch is below.

To reproduce the error:
1. M-x customize-variable RET org-agenda-custom-commands
2. Click the first INS button
3. Choose a convenient access key and description (or leave them as defaults -- I used access key "x")
4. Click the second Value Menu button (currently set to "Tags/Property match (all agenda files)") and choose "Agenda"
5. Under "Local settings for this command. Remember to quote values:", click INS
6. Click the new Value Menu button and choose "Set daily/weekly entry types"
7. C-c C-c   (sets Customize variable for the current session)
8. M-x org-agenda RET x (or just C-c a x) -- you'll get an empty agenda buffer and the error message "Symbol's function definition is void: :deadline".

I haven't checked whether there are other quoting issues in the customization definition for org-agenda-custom-commands but thought I would submit the patch anyway.

Joe V.


diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 1b033e8..2e74d5d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -306,11 +306,13 @@ you can \"misuse\" it to also add other text to the header.  However,
              (string :tag "+tag or -tag"))))
          (list :tag "Set daily/weekly entry types"
            (const org-agenda-entry-types)
-          (set :greedy t :value (:deadline :scheduled :timestamp :sexp)
-               (const :deadline)
-               (const :scheduled)
-               (const :timestamp)
-               (const :sexp)))
+          (list
+           (const :format "" quote)
+           (set :greedy t :value (:deadline :scheduled :timestamp :sexp)
+            (const :deadline)
+            (const :scheduled)
+            (const :timestamp)
+            (const :sexp))))
          (list :tag "Standard skipping condition"
            :value (org-agenda-skip-function '(org-agenda-skip-entry-if))
            (const org-agenda-skip-function)

             reply	other threads:[~2012-03-19 21:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 21:23 Joe Vornehm Jr. [this message]
2012-03-22  0:22 ` Patch: Customize failure for org-agenda-custom-commands 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:

  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=4F67A3E1.4060703@gmail.com \
    --to=joe.vornehm@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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