emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Patch: Customize failure for org-agenda-custom-commands
@ 2012-03-19 21:23 Joe Vornehm Jr.
  2012-03-22  0:22 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Vornehm Jr. @ 2012-03-19 21:23 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Joe Vornehm Jr.

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.


Patch:

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)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-22  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19 21:23 Patch: Customize failure for org-agenda-custom-commands Joe Vornehm Jr.
2012-03-22  0:22 ` Bastien

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