From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Joe Vornehm Jr." Subject: Patch: Customize failure for org-agenda-custom-commands Date: Mon, 19 Mar 2012 17:23:45 -0400 Message-ID: <4F67A3E1.4060703@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9k3W-0006V6-U7 for emacs-orgmode@gnu.org; Mon, 19 Mar 2012 17:23:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S9k3V-0008KQ-36 for emacs-orgmode@gnu.org; Mon, 19 Mar 2012 17:23:54 -0400 Received: from mail-qa0-f48.google.com ([209.85.216.48]:55285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S9k3U-0008Jv-SX for emacs-orgmode@gnu.org; Mon, 19 Mar 2012 17:23:53 -0400 Received: by qam2 with SMTP id 2so1001537qam.0 for ; Mon, 19 Mar 2012 14:23:50 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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)