all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 29857@debbugs.gnu.org
Subject: bug#29857: 27.0.50; error: "Loading `nil': old-style backquotes detected!"
Date: Sat, 30 Dec 2017 14:34:09 +0000	[thread overview]
Message-ID: <CAArVCkTgngo-CAU1bBAwfYUTz6=SfYkvQ93wAf+C4OSgWZhWSQ@mail.gmail.com> (raw)
In-Reply-To: <87y3lkgvsm.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 2844 bytes --]

Michael Heerdegen <michael_heerdegen@web.de> schrieb am Sa., 30. Dez. 2017
um 15:00 Uhr:

> Philipp Stephani <p.stephani2@gmail.com> writes:
>
> >  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.
>
> Yes, I think that would be good.
>

OK, I've sent a patch to do that:
https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00901.html


>
> >  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?
>
> Not really.  It would mean that the "construct" after any backquote
> can't be matched or replaced.
>
> E.g. if you have a function `foo' accepting three arguments, and you
> decide to change the definition of `foo' so that the meaning of the
> second and third arguments are interchanged, you want to replace all
> calls in your code with the rule
>
>   `(foo ,a ,b ,c) -> `(foo ,a ,c ,b)
>
> to adopt to the new signature.
>
> (Note that the backquote here is part of `pcase' pattern semantics and
> there is no relation with this issue).
>
> But in this occurrence:
>
> #+begin_src emacs-lisp
> (defmacro bar (form)
>   `(foo 1 1 ,@form))
> #+end_src
>
> this replacement rule would fail because the according form would be
> unmatchable (and the backquoted thing doesn't match).  One could work
> around this...there are always workarounds.  To need to do that would be
> very bad.
>

OK


>
> > Otherwise I'd accept introducing a variable to control whether
> > oldstyle backquotes should raise an error or get interpreted as
> > newstyle.
>
> That would be optimal for my case.
>

I've sent a patch for this as well:
https://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00902.html


>
> > El-search would need to adapt, though, because the newstyle
> > interpretation is different.
>
> In which way would el-search need to adapt?  It doesn't interpret code.
> It is a tool for matching and transforming lists, which, in most cases,
> happen to be code.  The user would need to know how `read' interprets
> what's matched, of course.
>
>
>
Then I guess el-search should document the new behavior. Previously (up to
Emacs 26) (read "(,@ x)") returns (\,@ x), now (with the new variable) it
returns ((\,@ x)).
However, if el-search uses `read` for both the buffer text and the search
pattern, the interpretations should still match (within one version of
Emacs).

[-- Attachment #2: Type: text/html, Size: 4219 bytes --]

  reply	other threads:[~2017-12-30 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26 14:38 bug#29857: 27.0.50; error: "Loading `nil': old-style backquotes detected!" Michael Heerdegen
2017-12-29 20:34 ` Philipp Stephani
2017-12-29 20:59   ` [PATCH 1/2] Add new variable to force new-style backquote interpretation Philipp Stephani
2017-12-29 20:59     ` [PATCH 2/2] Improve error message for old-style backquotes Philipp Stephani
2017-12-30  6:19     ` [PATCH 1/2] Add new variable to force new-style backquote interpretation Paul Eggert
2017-12-30  9:02       ` Philipp Stephani
2017-12-30 23:07         ` Paul Eggert
2017-12-30 23:29           ` Philipp Stephani
2017-12-31  0:40             ` Paul Eggert
2018-01-07 13:21               ` Philipp Stephani
2017-12-31  5:08             ` Stefan Monnier
2017-12-30 14:00   ` bug#29857: 27.0.50; error: "Loading `nil': old-style backquotes detected!" Michael Heerdegen
2017-12-30 14:34     ` Philipp Stephani [this message]
2017-12-30 22:33       ` Michael Heerdegen
2018-01-07 13:26         ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkTgngo-CAU1bBAwfYUTz6=SfYkvQ93wAf+C4OSgWZhWSQ@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=29857@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.