From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)] Date: Sun, 04 Jun 2017 10:24:57 +0200 Message-ID: <877f0snorq.fsf@nicolasgoaziou.fr> References: <20170603114859.GE7145@seven> <87a85olrzq.fsf@nicolasgoaziou.fr> <20170604065733.GG7145@seven> <87o9u4nrte.fsf@nicolasgoaziou.fr> <20170604080822.GH7145@seven> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHQqL-0002Fh-1p for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 04:25:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHQqK-00052O-4W for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 04:25:01 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:53495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHQqJ-00050Y-Tg for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 04:25:00 -0400 In-Reply-To: <20170604080822.GH7145@seven> (Stefan-W. Hahn's message of "Sun, 4 Jun 2017 10:08:22 +0200") 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" To: "Stefan-W. Hahn" Cc: emacs-orgmode@gnu.org "Stefan-W. Hahn" writes: > I looked at it, but sorry, I think this also is not right, it expands to: > > ,---- > | (defun org-agenda-mode () > | ... > | (mapc #'make-local-variable org-agenda-local-vars) > | (dolist (elem save) > | (if > | (consp elem) > | (let* > | ((x > | (car elem)) > | (x > | (cdr elem))) > | (let > | ((val x) > | (var x)) > | (when > | (and val > | (memq var org-agenda-local-vars)) > | (set var val)))) > | nil))) > | (setq-local org-agenda-this-buffer-is-sticky t)) > | (org-agenda-sticky > `---- > > and the second one: > > ,---- > | (defun org-clone-local-variables (from-buffer &optional regexp) > | ... > | (dolist (pair (buffer-local-variables from-buffer)) > | (if > | (consp pair) > | (let* > | ((x > | (car pair)) > | (x > | (cdr pair))) > | (if > | (consp x) > | (let* > | ((x > | (cdr x))) > | (if > | (null x) > | (let > | ((name x)) > | (when > | (and > | (not > | (memq name org-unique-local-variables)) > | (or > | (null regexp) > | (string-match-p regexp > | (symbol-name name)))) > | (set > | (make-local-variable name) > | (cdr pair)))) > | nil)) > | nil)) > | nil))) > `---- > > Both looking wrong for me. Sorry. What do you think is wrong? In particular (let (res) (dolist (pair (buffer-local-variables)) (pcase pair (`(,var . ,val) (push (list 'set var val) res)))) res) expands to ((set flyspell-word-cache-result _) (set flyspell-word-cache-end -1) (set undo-auto--last-boundary-cause (2 #)) (set syntax-ppss-last (1 0 nil nil nil nil nil 0 nil nil nil)) (set syntax-propertize--done 139) (set flyspell-changes nil) (set deactivate-mark nil) (set flyspell-pre-point 139) (set auto-revert-notify-modified-p nil) ... ) which looks correct. Regards,