From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: orgstruct-mode with custom headline prefix Date: Tue, 12 Feb 2013 22:32:35 +0100 Message-ID: <87obfp5ibw.fsf@bzg.ath.cx> References: <87vcah6xf5@ch.ristopher.com> <8738xh4xfr@ch.ristopher.com> <87y5f994ni.fsf@bzg.ath.cx> <87pq0l3gr2@ch.ristopher.com> <878v79925v.fsf@bzg.ath.cx> <87k3qt3exu@ch.ristopher.com> <87a9rplhue.fsf@bzg.ath.cx> <87622d5d8e@ch.ristopher.com> <87r4koasra@ch.ristopher.com> <8738x1cq0x.fsf@Rainer.invalid> <874nhhuun6@ch.ristopher.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5NT2-00084w-W8 for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 16:32:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5NSx-0002Ac-Pk for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 16:32:44 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:42533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5NSx-0002AT-Iw for emacs-orgmode@gnu.org; Tue, 12 Feb 2013 16:32:39 -0500 Received: by mail-wi0-f180.google.com with SMTP id hi8so677918wib.1 for ; Tue, 12 Feb 2013 13:32:38 -0800 (PST) In-Reply-To: <874nhhuun6@ch.ristopher.com> (Christopher Schmidt's message of "Tue, 12 Feb 2013 20:47:21 +0000 (GMT)") 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 --=-=-= Content-Type: text/plain Hi Christopher, Christopher Schmidt writes: > These internal functions should have been autoloaded. progv is pretty > obscure and I guess noone has noticed that bug in cl-macs until now. The attached patch gets rid of progv by using org-let. As a side-effect, it fixes a but that was introduced with your change: M-x turn-on-orgstruct RET in message-mode and try to move around list items for example... it will choke at org-auto-fill-function not being defined. The bug is not limited to this example of course. Let me know if it breaks something I may have overlooked. >> Emacs 24.3.93 seems to have that fixed, > > So does 24.2.x. > > I will push a fix ASAP. > >> but complains about this instead: >> In org-heading-components: >> org.el:7436:16:Warning: reference to free variable `orgstruct-mode' > > This one is bogus, the variable is defined later on. I will silence > that warning. Thanks in advance for this! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=fix-orgstruct-changes.patch diff --git a/lisp/org.el b/lisp/org.el index 5892489..b251cbe 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8781,7 +8781,7 @@ Possible values in the list of contexts are `table', `headline', and `item'." (setq x (if (symbolp x) (list x) - (list (car x) (cdr x)))) + (list (car x) (list 'quote (cdr x))))) (if (and (not (get (car x) 'org-state)) (string-match "^\\(org-\\|orgtbl-\\|outline-\\|comment-\\|paragraph-\\|auto-fill\\|normal-auto-fill\\|fill-paragraph\\|indent-\\)" @@ -8810,15 +8810,8 @@ call CMD." (org-load-modules-maybe) (unless org-local-vars (setq org-local-vars (org-get-local-variables))) - (let (symbols values) - (dolist (var org-local-vars) - (when (or (not (boundp (car var))) - (eq (symbol-value (car var)) - (default-value (car var)))) - (push (car var) symbols) - (push (cadr var) values))) - (progv symbols values - (call-interactively cmd)))) + (org-let org-local-vars + (call-interactively cmd))) ;;;; Archiving --=-=-= Content-Type: text/plain -- Bastien --=-=-=--