From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#29857: 27.0.50; error: "Loading `nil': old-style backquotes detected!" Date: Fri, 29 Dec 2017 20:34:26 +0000 Message-ID: References: <87d131ftal.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c122b70a21ba20561808f36" X-Trace: blaine.gmane.org 1514579598 32306 195.159.176.226 (29 Dec 2017 20:33:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 29 Dec 2017 20:33:18 +0000 (UTC) Cc: 29857@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 29 21:33:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eV1L6-0007qJ-BU for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Dec 2017 21:33:12 +0100 Original-Received: from localhost ([::1]:53872 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eV1N3-0001E0-Gp for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Dec 2017 15:35:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eV1Mx-0001CM-2T for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2017 15:35:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eV1Ms-0006wB-Qq for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2017 15:35:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eV1Ms-0006va-Mb for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2017 15:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eV1Ms-0007Z7-77 for bug-gnu-emacs@gnu.org; Fri, 29 Dec 2017 15:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Dec 2017 20:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29857 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29857-submit@debbugs.gnu.org id=B29857.151457968529055 (code B ref 29857); Fri, 29 Dec 2017 20:35:02 +0000 Original-Received: (at 29857) by debbugs.gnu.org; 29 Dec 2017 20:34:45 +0000 Original-Received: from localhost ([127.0.0.1]:56964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eV1Mb-0007YZ-6N for submit@debbugs.gnu.org; Fri, 29 Dec 2017 15:34:45 -0500 Original-Received: from mail-qt0-f173.google.com ([209.85.216.173]:36080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eV1MY-0007YI-Kz for 29857@debbugs.gnu.org; Fri, 29 Dec 2017 15:34:43 -0500 Original-Received: by mail-qt0-f173.google.com with SMTP id a16so55356646qtj.3 for <29857@debbugs.gnu.org>; Fri, 29 Dec 2017 12:34:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WFXQgcfOkqIrFef8+dE2/9ji5ilyENQk0+JJIb6l+Hc=; b=lAsgnHAn2v0vaoL1c6Qozc3fdQCyMZkDEsczNKwwMXjsMO/uI5lSbn7yEi7yiw8qim e1876fq3GI4BuC3F4z4amUP2DOeUFmwYXJzVhr58pns+bzXMyI/gfxakQpPDmDy+k+We UtSkwWG72W+Z9KG1wSOmmuHCFzH4kmZGkXypwCj6tTPFgAl0O53CKrORYVbSUAlLH+Vr 3WDeR58TSFhi1TT/eU2beXavE5gmiqkSYvGK0U8O5po/s0L0M6bVrNkz21qWzjItmLYj c4DnjO/2TuL/5lT9ni5NQgsCGYqef7+h53ioI2uZkVprW1G4itNDs7f9d4s+vnJsa1G2 NL/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WFXQgcfOkqIrFef8+dE2/9ji5ilyENQk0+JJIb6l+Hc=; b=E21YFP5glbNeC9AYW6kKKz8pN6OGUDsRccE6OhA5J5nNjxy4cq3ginFqGb7+UcLUrV xlB9KM0ccI3vqnBcZSRYDhj0DYCi/p6Qua1e2Ifqu/YkXEH0ONnhAb/fnHz+9nskzD+X eOOzyVvh7g6MuvoDCl8HVkTrnltFaNQ5sFSTXkoTHemHRtGvFpsSyTpYe+hhdq9arSDH A20FQD4ekX4QEXnMijHxxILjCY71CmcUQ/mGEDCQaaaS1uay28x4F0Bz5dPsEU7upZhZ jiF8woUvZrwQYEnyQPFCMh5xq/O2PiQXrr9fIyOcWfXwZLspCpYcgpdKQFyCRJU9IXa2 sGkg== X-Gm-Message-State: AKGB3mIyUn+olDObmkvoCe5/CS9ORli56SsoEmCqrI5/iCtP+IvrYdP+ cQDCANyLRSWgoYnN4ytNO9cf6K7Y5mrNFz+O4JU= X-Google-Smtp-Source: ACJfBovFxzjcEiLlqjQbk5LvGWA7IBI9GBdW2VwQjzIDzYbslNSQkUhjtUieP7O44jjipBfhacqWw3bREt5pTkhXCak= X-Received: by 10.200.27.76 with SMTP id p12mr50696081qtk.310.1514579677025; Fri, 29 Dec 2017 12:34:37 -0800 (PST) In-Reply-To: <87d131ftal.fsf@web.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141597 Archived-At: --94eb2c122b70a21ba20561808f36 Content-Type: text/plain; charset="UTF-8" Michael Heerdegen schrieb am Di., 26. Dez. 2017 um 15:39 Uhr: > > Hello, > > Insert into a fresh buffer (e.g. *scratch*): > > #+begin_src emacs-lisp > `(progn > (add-to-list 'rcirc-client-commands ,(concat "/" (symbol-name command))) > (defun ,(intern (concat "rcirc-cmd-" (symbol-name command))) > (,@argument &optional process target) > ,(concat docstring "\n\nNote: If PROCESS or TARGET are nil, the > values given" > "\nby `rcirc-buffer-process' and `rcirc-target' will be > used.") > ,interactive-form > (let ((process (or process (rcirc-buffer-process))) > (target (or target rcirc-target))) > (ignore target) ; mark `target' variable as ignorable > ,@body))) > #+end_src > > (that's the body of the `defun-rcirc-command' macro in rcirc.el). Put > point after the starting backquote character, at the position of the > outermost opening paren. Then (read (current-buffer)) errors with > > | Debugger entered--Lisp error: (error "Loading `nil': old-style > backquotes detected!") > | read(#) > | [...] > > I think raising this error is not justified, as there are no old-style > backquotes there AFAIK. It's somewhat subtle, but if you skip ` there is an oldstyle backquote here. There's a comment in lread.c: Because it's more difficult to peek 2 chars ahead, a new-style ,@ can still not be used outside of a `, unless it's in the middle of a list. That is, in the construct (,@argument the ,@ is oldstyle unless the ` has been read before. > Also, the error message saying loading `nil' > failed is confusing, it took me a while to find out where I tried to > load `nil' (nowhere). > It would be reasonable and easy to remove the "Loading `nil'" part in the case where no file is being loaded. > > Finally, let me say that `read' raising such errors about old-style > backquotes, may it be justified or not, breaks "el-search" which relies > heavily on `read' at diverse buffer positions to succeed. > > That's a bummer. It means that el-search currently relies on an underspecified legacy feature. Could el-search be changed to always include reading the initial ` in such cases? Otherwise I'd accept introducing a variable to control whether oldstyle backquotes should raise an error or get interpreted as newstyle. El-search would need to adapt, though, because the newstyle interpretation is different. However, that will need to happen anyway because at some point in time (Emacs 28?) we want to get rid of oldstyle backquotes altogether. --94eb2c122b70a21ba20561808f36 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Michae= l Heerdegen <michael_heerdeg= en@web.de> schrieb am Di., 26. Dez. 2017 um 15:39=C2=A0Uhr:

Hello,

Insert into a fresh buffer (e.g. *scratch*):

#+begin_src emacs-lisp
`(progn
=C2=A0 =C2=A0(add-to-list 'rcirc-client-commands ,(concat "/"= (symbol-name command)))
=C2=A0 =C2=A0(defun ,(intern (concat "rcirc-cmd-" (symbol-name co= mmand)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(,@argument &optional process target)
=C2=A0 =C2=A0 =C2=A0,(concat docstring "\n\nNote: If PROCESS or TARGET= are nil, the values given"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\nby `rcirc-buffer-p= rocess' and `rcirc-target' will be used.")
=C2=A0 =C2=A0 =C2=A0,interactive-form
=C2=A0 =C2=A0 =C2=A0(let ((process (or process (rcirc-buffer-process)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(target (or target rcirc-target)))=
=C2=A0 =C2=A0 =C2=A0 =C2=A0(ignore target) ; mark `target' variable as = ignorable
=C2=A0 =C2=A0 =C2=A0 =C2=A0,@body)))
#+end_src

(that's the body of the `defun-rcirc-command' macro in rcirc.el).= =C2=A0 Put
point after the starting backquote character, at the position of the
outermost opening paren.=C2=A0 Then (read (current-buffer)) errors with

| Debugger entered--Lisp error: (error "Loading `nil': old-style b= ackquotes detected!")
|=C2=A0 =C2=A0read(#<buffer *scratch*>)
|=C2=A0 =C2=A0[...]

I think raising this error is not justified, as there are no old-style
backquotes there AFAIK.=C2=A0

It's some= what subtle, but if you skip ` there is an oldstyle backquote here. There&#= 39;s a comment in lread.c:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0Because it's more difficult to peek 2 chars ahead, a new-styl= e
=C2=A0 =C2=A0,@ can sti= ll not be used outside of a `, unless it's in the middle
=C2=A0 =C2=A0of a list.
That is, in the construct (,@argument the ,@ is oldstyle unless the ` has = been read before.
=C2=A0
Als= o, the error message saying loading `nil'
failed is confusing, it took me a while to find out where I tried to
load `nil' (nowhere).

It would be r= easonable and easy to remove the "Loading `nil'" part in the = case where no file is being loaded.
=C2=A0

Finally, let me say that `read' raising such errors about old-style
backquotes, may it be justified or not, breaks "el-search" which = relies
heavily on `read' at diverse buffer positions to succeed.


That's a bummer. It means that el-sear= ch currently relies on an underspecified legacy feature. Could el-search be= changed to always include reading the initial ` in such cases?
O= therwise I'd accept introducing a variable to control whether oldstyle = backquotes should raise an error or get interpreted as newstyle. El-search = would need to adapt, though, because the newstyle interpretation is differe= nt. However, that will need to happen anyway because at some point in time = (Emacs 28?) we want to get rid of oldstyle backquotes altogether.=C2=A0
--94eb2c122b70a21ba20561808f36--