From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Typo in 'org-without-partial-completion' Date: Thu, 30 Jun 2011 11:12:15 +0200 Message-ID: <87wrg3k7io.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcDHq-0002yn-PR for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 05:11:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcDHo-0002Px-Ky for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 05:11:50 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:61232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcDHo-0002PQ-6t for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 05:11:48 -0400 Received: by wyg36 with SMTP id 36so1719178wyg.0 for ; Thu, 30 Jun 2011 02:11:47 -0700 (PDT) In-Reply-To: (Paul Sexton's message of "Wed, 22 Jun 2011 21:08:45 +0000 (UTC)") 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: Paul Sexton Cc: emacs-orgmode@gnu.org Hi Paul, Paul Sexton writes: > I think there's an error in 'org-without-partial-completion' in org-macs.el. > The variable pc-mode gets bound to the value of partial-completion-mode - but > this is a VARIABLE (t if that mode is enabled). Funcalling the value of > the variable produces an error, unsurprisingly. This breaks insertion of > properties with 'org-set-property'. > > Fixing it involves quoting the the symbol as shown below: > > > (defmacro org-without-partial-completion (&rest body) > `(let ((pc-mode (and (boundp 'partial-completion-mode) > 'partial-completion-mode))) ; <-- quote added > (unwind-protect > (progn > (when pc-mode (funcall pc-mode -1)) > ,@body) > (when pc-mode (funcall pc-mode 1))))) I've just reverted this modification, per Sebastian report. Can you be more precise about the problem it creates with org-set-property? Can you check if this version fixes the problems, if any? #+begin_src emacs-lisp (defmacro org-without-partial-completion (&rest body) `(let ((pc-mode ,(and (boundp 'partial-completion-mode) 'partial-completion-mode))) (unwind-protect (progn (when pc-mode (funcall pc-mode -1)) ,@body) (when pc-mode (funcall pc-mode 1))))) #+end_src emacs-lisp Thanks! -- Bastien