GNU bug report logs -
#25462
Out of date doc string for "`".
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Mon, 16 Jan 2017 21:32:01 UTC
Severity: wishlist
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25462 in the body.
You can then email your comments to 25462 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Mon, 16 Jan 2017 21:32:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alan Mackenzie <acm <at> muc.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 16 Jan 2017 21:32:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, Emacs.
The doc string for "`" has become partial.
It fails to mention that "`" has a radically different meaning when used
in certain parts of a `pcase', and probably quite a few other similar
macros.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Mon, 16 Jan 2017 21:53:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 25462 <at> debbugs.gnu.org (full text, mbox):
On Mon, Jan 16, 2017 at 4:30 PM, Alan Mackenzie <acm <at> muc.de> wrote:
> Hello, Emacs.
>
> The doc string for "`" has become partial.
>
> It fails to mention that "`" has a radically different meaning when used
> in certain parts of a `pcase', and probably quite a few other similar
> macros.
I don't think that makes sense. Similarly, we don't add a mention of
`cl-loop's use of `if' in the docstring of `if', because that's not
part of the `if' special form. It's just a use of `if' as a plain
symbol.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Tue, 17 Jan 2017 20:13:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Hello, Noam.
On Mon, Jan 16, 2017 at 04:52:36PM -0500, Noam Postavsky wrote:
> On Mon, Jan 16, 2017 at 4:30 PM, Alan Mackenzie <acm <at> muc.de> wrote:
> > Hello, Emacs.
> > The doc string for "`" has become partial.
> > It fails to mention that "`" has a radically different meaning when used
> > in certain parts of a `pcase', and probably quite a few other similar
> > macros.
> I don't think that makes sense. Similarly, we don't add a mention of
> `cl-loop's use of `if' in the docstring of `if', because that's not
> part of the `if' special form. It's just a use of `if' as a plain
> symbol.
I don't think `if' inside cl-loop is liable to cause much confusion.
pcase, on the other hand, does cause confusion, as it radically changes
the meaning of symbols contained within it, something that other macros
don't do - with the possible minor exception of cl-loop.
If you can think of any other such examples of context dependence
changing the semantics, I think these should be documented too.
The direction I'm coming from is to make the doc strings help users -
not to make them 100% consistent.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Tue, 17 Jan 2017 21:18:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Noam Postavsky <npostavs <at> users.sourceforge.net> wrote:
> On Mon, Jan 16, 2017 at 4:30 PM, Alan Mackenzie <acm <at> muc.de> wrote:
>> Hello, Emacs.
>>
>> The doc string for "`" has become partial.
>>
>> It fails to mention that "`" has a radically different meaning when used
>> in certain parts of a `pcase', and probably quite a few other similar
>> macros.
>
> I don't think that makes sense. Similarly, we don't add a mention of
> `cl-loop's use of `if' in the docstring of `if', because that's not
> part of the `if' special form. It's just a use of `if' as a plain
> symbol.
Since the misunderstanding is believing that "`" is more special than it
is, maybe something calling out its ordinariness could be appropriate
(and throw in a reference to pcase as an example?)
I don't think this is great, but, as an example:
Note that `\\=`' is any ordinary Lisp symbol and thus may be treated
as data or given different meanings in particular contexts. For
instance, it has a special meaning inside `pcase' patterns.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Wed, 18 Jan 2017 02:04:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> Hello, Noam.
>
> On Mon, Jan 16, 2017 at 04:52:36PM -0500, Noam Postavsky wrote:
>> On Mon, Jan 16, 2017 at 4:30 PM, Alan Mackenzie <acm <at> muc.de> wrote:
>> > Hello, Emacs.
>
>> > The doc string for "`" has become partial.
>
>> > It fails to mention that "`" has a radically different meaning when used
>> > in certain parts of a `pcase', and probably quite a few other similar
>> > macros.
>
>> I don't think that makes sense. Similarly, we don't add a mention of
>> `cl-loop's use of `if' in the docstring of `if', because that's not
>> part of the `if' special form. It's just a use of `if' as a plain
>> symbol.
>
> I don't think `if' inside cl-loop is liable to cause much confusion.
> pcase, on the other hand, does cause confusion, as it radically changes
> the meaning of symbols contained within it, something that other macros
> don't do - with the possible minor exception of cl-loop.
>
> If you can think of any other such examples of context dependence
> changing the semantics, I think these should be documented too.
`rx' gives new semantics to `and', `or', `any', etc...
`condition-case' changes the meaning of the symbol list at the front of
its handlers.
At one point, the `use-package' macro (note, this is not (yet) part of
Emacs) interpreted `,' to mean eager evaluation. But people didn't like
it, so it now uses `lambda' for that instead.
> The direction I'm coming from is to make the doc strings help users -
> not to make them 100% consistent.
Well, I guess adding a mention of pcase in backquote's docstring would
be okay. The way your initial report phrases it, as if the docstring is
incomplete without that, didn't make sense to me.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Wed, 18 Jan 2017 20:41:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Hello again, Noam.
On Mon, Jan 16, 2017 at 04:52:36PM -0500, Noam Postavsky wrote:
> On Mon, Jan 16, 2017 at 4:30 PM, Alan Mackenzie <acm <at> muc.de> wrote:
> > Hello, Emacs.
> > The doc string for "`" has become partial.
> > It fails to mention that "`" has a radically different meaning when used
> > in certain parts of a `pcase', and probably quite a few other similar
> > macros.
> I don't think that makes sense. Similarly, we don't add a mention of
> `cl-loop's use of `if' in the docstring of `if', because that's not
> part of the `if' special form. It's just a use of `if' as a plain
> symbol.
In cl-loop, you might have "if", but you're never going to have "(if
...", are you? If this is correct, then `if' is not used in a way that
could be confused with the special form.
This doesn't apply to ` as used in pcase.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Wed, 18 Jan 2017 20:56:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Hello, John.
On Tue, Jan 17, 2017 at 01:17:27PM -0800, John Mastro wrote:
> Noam Postavsky <npostavs <at> users.sourceforge.net> wrote:
> > On Mon, Jan 16, 2017 at 4:30 PM, Alan Mackenzie <acm <at> muc.de> wrote:
> >> Hello, Emacs.
> >> The doc string for "`" has become partial.
> >> It fails to mention that "`" has a radically different meaning when used
> >> in certain parts of a `pcase', and probably quite a few other similar
> >> macros.
> > I don't think that makes sense. Similarly, we don't add a mention of
> > `cl-loop's use of `if' in the docstring of `if', because that's not
> > part of the `if' special form. It's just a use of `if' as a plain
> > symbol.
> Since the misunderstanding is believing that "`" is more special than it
> is, maybe something calling out its ordinariness could be appropriate
> (and throw in a reference to pcase as an example?)
"`" is very special. So special, indeed, that its syntax is handled by
the Lisp reader.
> I don't think this is great, but, as an example:
> Note that `\\=`' is any ordinary Lisp symbol and thus may be treated
> as data or given different meanings in particular contexts. For
> instance, it has a special meaning inside `pcase' patterns.
I think that's objectively wrong. "`" isn't an ordinary Lisp symbol,
it's a reader macro which is handled in the reader. There aren't many
of these macros, and only a very few in normal use.
Besides, we don't want to encourage people to reuse existing symbols for
unconnected purposes.
--
Alan Mackenzie (Nuremberg, Germany).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Wed, 18 Jan 2017 22:15:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 25462 <at> debbugs.gnu.org (full text, mbox):
On Wed, Jan 18, 2017 at 3:55 PM, Alan Mackenzie <acm <at> muc.de> wrote:
>
>> Note that `\\=`' is any ordinary Lisp symbol and thus may be treated
>> as data or given different meanings in particular contexts. For
>> instance, it has a special meaning inside `pcase' patterns.
>
> I think that's objectively wrong.
It's correct.
> "`" isn't an ordinary Lisp symbol,
> it's a reader macro which is handled in the reader.
It's both. "`" is a reader macro which expands into a list starting
with the ordinary Lisp symbol named "`".
(equal (car (read-from-string "`a"))
(list (intern "`") 'a)) ;=> t
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Sat, 25 Sep 2021 16:13:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Alan Mackenzie <acm <at> muc.de> writes:
> Hello, Emacs.
>
> The doc string for "`" has become partial.
>
> It fails to mention that "`" has a radically different meaning when used
> in certain parts of a `pcase', and probably quite a few other similar
> macros.
How about adding this at the very end of the ` docstring:
Note that some macros, such as `pcase', change the meaning of this
symbol.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Sun, 26 Sep 2021 06:47:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> How about adding this at the very end of the ` docstring:
>
> Note that some macros, such as `pcase', change the meaning of this
> symbol.
I added
Note that some macros, such as `pcase', use this symbol for other
purposes.
to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
25462 <at> debbugs.gnu.org and Alan Mackenzie <acm <at> muc.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 26 Sep 2021 06:48:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Sun, 26 Sep 2021 07:18:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Stefan Kangas <stefan <at> marxist.se> writes:
>
>> How about adding this at the very end of the ` docstring:
>>
>> Note that some macros, such as `pcase', change the meaning of this
>> symbol.
>
> I added
>
> Note that some macros, such as `pcase', use this symbol for other
> purposes.
>
> to Emacs 28.
Yes, that's even better. Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25462
; Package
emacs
.
(Sun, 26 Sep 2021 20:32:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 25462 <at> debbugs.gnu.org (full text, mbox):
Hello, Lars and Stefan.
On Sun, Sep 26, 2021 at 00:17:30 -0700, Stefan Kangas wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> > Stefan Kangas <stefan <at> marxist.se> writes:
> >> How about adding this at the very end of the ` docstring:
> >> Note that some macros, such as `pcase', change the meaning of this
> >> symbol.
> > I added
> > Note that some macros, such as `pcase', use this symbol for other
> > purposes.
> > to Emacs 28.
> Yes, that's even better. Thanks.
Thanks for the fix!
--
Alan Mackenzie (Nuremberg, Germany).
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 25 Oct 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 184 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.