GNU bug report logs - #19734
25.0.50; nested backquotes: recent changes not backward compatible

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Fri, 30 Jan 2015 17:51:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#19734: closed (25.0.50; nested backquotes: recent changes not
 backward compatible)
Date: Fri, 30 Jan 2015 21:03:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 30 Jan 2015 16:01:55 -0500
with message-id <jwv386shvx1.fsf-monnier+emacsbugs <at> gnu.org>
and subject line Re: bug#19734: 25.0.50; nested backquotes: recent changes not backward compatible
has caused the debbugs.gnu.org bug report #19734,
regarding 25.0.50; nested backquotes: recent changes not backward compatible
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
19734: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19734
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; nested backquotes: recent changes not backward compatible
Date: Fri, 30 Jan 2015 18:49:52 +0100
Hello,

Recent changes in backquote.el, I guess especially in this commit:

86009dd5d886f1101358990e4f8f69a5d1467eb8
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date:   Sat Nov 15 23:59:50 2014 -0500

    * lisp/emacs-lisp/backquote.el (backquote-process): Optimize away
      the ,' case.

were not backwards compatible.  If this was intended (?), it should be
mentioned in the news I think.

Here is an example.  In Emacs 24, I had something like this in my config
(massively shortened):


--8<---------------cut here---------------start------------->8---
(defun my-make-feh-cmd ()
  "Return a feh command line suitble for dired.
Take the current screen resolution at account."
  (if (not window-system)
      "feh"
    (let* ((display-pixel-width (display-pixel-width))
           (width (- display-pixel-width (frame-pixel-width))))
      (format "feh -Z -g %sx%s+%s *"
              width
              (- (x-display-pixel-height) 30)
              (min (+ (frame-pixel-width) 2) (- display-pixel-width width))))))

(require 'dired-x)

(let ((programs '("vlc *" "smplayer *")))
  (setq-default
   dired-guess-shell-alist-user
   `((".*" (if (file-directory-p file)
               `(,,'(my-make-feh-cmd) ;compute at runtime!
                 ,@',programs)
             ',programs)))))
--8<---------------cut here---------------end--------------->8---


In trunk, the backquote expression evals to something different now, and
AFAICT

    ,,'(my-make-feh-cmd)

from above must now be

      ,(my-make-feh-cmd)

That looks less frightening, but I had to find this out myself because
my code was broken and there was no news entry.


Thanks,

Michael.




In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5)
 of 2015-01-29 on drachen
Repository revision: 1dc1959ebf50401c69adeb6d182950b59835f94d
Windowing system distributor `The X.Org Foundation', version 11.0.11602901
System Description:	Debian GNU/Linux 8.0 (jessie)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB



[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 19734-done <at> debbugs.gnu.org
Subject: Re: bug#19734: 25.0.50;
 nested backquotes: recent changes not backward compatible
Date: Fri, 30 Jan 2015 16:01:55 -0500
>     * lisp/emacs-lisp/backquote.el (backquote-process): Optimize away
>       the ,' case.
> were not backwards compatible.  If this was intended (?), it should be
> mentioned in the news I think.

As the commit message indicates, this was supposed to be an
optimization, i.e. no change in observable behavior.

> In trunk, the backquote expression evals to something different now, and
>     ,,'(my-make-feh-cmd)
> from above must now be
>       ,(my-make-feh-cmd)

Yes, your rewrite is correct and desirable, but indeed we had a bug
which I've just fixed in master.  Thanks.


        Stefan


This bug report was last modified 10 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.