unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
@ 2017-11-24  7:56 Michael Heerdegen
  2017-11-25  1:22 ` Michael Heerdegen
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2017-11-24  7:56 UTC (permalink / raw)
  To: 29422


C-h i i
==>
Debugger entered--Lisp error: (error "Symbol enable-multibyte-characters may not be buffer-local")
  make-local-variable(enable-multibyte-characters)
  [...]
  clone-buffer()
  [...]
  command-execute(Info-index)

maybe related to 197dd690?


Thanks,

Michael.


In GNU Emacs 27.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.22.24)
 of 2017-11-24 built on drachen
Repository revision: 3f95bbcbb84f144c93b625d5cffab2d18200115c
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description:	Debian GNU/Linux testing (buster)






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-24  7:56 bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local Michael Heerdegen
@ 2017-11-25  1:22 ` Michael Heerdegen
  2017-11-25  7:53   ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Heerdegen @ 2017-11-25  1:22 UTC (permalink / raw)
  To: 29422-done; +Cc: Stefan Monnier

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Debugger entered--Lisp error: (error "Symbol enable-multibyte-characters may not be buffer-local")

Apparently has been fixed with d1000fb.


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-25  1:22 ` Michael Heerdegen
@ 2017-11-25  7:53   ` Eli Zaretskii
  2017-11-25 16:47     ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-25  7:53 UTC (permalink / raw)
  To: Michael Heerdegen, Stefan Monnier; +Cc: 29422

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Date: Sat, 25 Nov 2017 02:22:59 +0100
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>
> 
> Michael Heerdegen <michael_heerdegen@web.de> writes:
> 
> > Debugger entered--Lisp error: (error "Symbol enable-multibyte-characters may not be buffer-local")
> 
> Apparently has been fixed with d1000fb.

Yes, but signaling "Setting constant" when we actually mean a
read-only symbol is sub-optimal, IMO.  That error is for setting stuff
like nil and t, which enable-multibyte-characters isn't.  It will
confuse users to see this error in that case, I think.

And the ELisp manual clearly states that this error is for "symbols
that evaluate to themselves": nil, t, and keyword symbols.  So now the
implementation contradicts the documentation.

How about inventing a new error symbol for these cases?





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-25  7:53   ` Eli Zaretskii
@ 2017-11-25 16:47     ` Stefan Monnier
  2017-11-25 17:19       ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2017-11-25 16:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Heerdegen, 29422

> Yes, but signaling "Setting constant" when we actually mean a
> read-only symbol is sub-optimal, IMO.

That's the error that we've been using for (setq
enable-multibyte-characters ...) since Emacs-21.

> How about inventing a new error symbol for these cases?

I haven't found a situation where I needed to distinguish those two
error cases yet, so I don't see any need for that, but if you feel like
it, that's fine (tho better make that new error be a sub-error of
`setting-constant` so as not to break existing code).


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-25 16:47     ` Stefan Monnier
@ 2017-11-25 17:19       ` Eli Zaretskii
  2017-11-26  2:07         ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-25 17:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael_heerdegen, 29422

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Michael Heerdegen <michael_heerdegen@web.de>, 29422@debbugs.gnu.org
> Date: Sat, 25 Nov 2017 11:47:25 -0500
> 
> > Yes, but signaling "Setting constant" when we actually mean a
> > read-only symbol is sub-optimal, IMO.
> 
> That's the error that we've been using for (setq
> enable-multibyte-characters ...) since Emacs-21.

??? The code you changed signaled a "Symbol %s may not be
buffer-local" error, not "Setting constant".  What am I missing?

> > How about inventing a new error symbol for these cases?
> 
> I haven't found a situation where I needed to distinguish those two
> error cases yet, so I don't see any need for that, but if you feel like
> it, that's fine (tho better make that new error be a sub-error of
> `setting-constant` so as not to break existing code).

I meant for you to do that, as part of fixing this problem, but if you
don't feel like it, we should at least change the ELisp manual, as it
now contradicts the code.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-25 17:19       ` Eli Zaretskii
@ 2017-11-26  2:07         ` Stefan Monnier
  2017-11-26  3:39           ` Eli Zaretskii
  2017-11-26 15:31           ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Monnier @ 2017-11-26  2:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: michael_heerdegen, 29422

>> > Yes, but signaling "Setting constant" when we actually mean a
>> > read-only symbol is sub-optimal, IMO.
>> That's the error that we've been using for (setq
>> enable-multibyte-characters ...) since Emacs-21.

> ??? The code you changed signaled a "Symbol %s may not be
> buffer-local" error, not "Setting constant".  What am I missing?

My patch did not touch `setq`.  It just made `make-local-variable` and
`make-buffer-local-variable` signal the same error as `setq`.

> I meant for you to do that, as part of fixing this problem, but if you
> don't feel like it, we should at least change the ELisp manual, as it
> now contradicts the code.

If you mean the doc of `setq`, then I guess this discrepancy has been
with us since Emacs-21.


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-26  2:07         ` Stefan Monnier
@ 2017-11-26  3:39           ` Eli Zaretskii
  2017-11-26 15:31           ` Eli Zaretskii
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-26  3:39 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael_heerdegen, 29422

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: michael_heerdegen@web.de,  29422@debbugs.gnu.org
> Date: Sat, 25 Nov 2017 21:07:22 -0500
> 
> My patch did not touch `setq`.  It just made `make-local-variable` and
> `make-buffer-local-variable` signal the same error as `setq`.
> 
> > I meant for you to do that, as part of fixing this problem, but if you
> > don't feel like it, we should at least change the ELisp manual, as it
> > now contradicts the code.
> 
> If you mean the doc of `setq`, then I guess this discrepancy has been
> with us since Emacs-21.

Not unheard of, and not a good reason to leave it that way.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-26  2:07         ` Stefan Monnier
  2017-11-26  3:39           ` Eli Zaretskii
@ 2017-11-26 15:31           ` Eli Zaretskii
  2017-11-27  4:42             ` bug#29422: [SUSPECTED SPAM] " Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2017-11-26 15:31 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: michael_heerdegen, 29422

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: michael_heerdegen@web.de,  29422@debbugs.gnu.org
> Date: Sat, 25 Nov 2017 21:07:22 -0500
> 
> >> > Yes, but signaling "Setting constant" when we actually mean a
> >> > read-only symbol is sub-optimal, IMO.
> >> That's the error that we've been using for (setq
> >> enable-multibyte-characters ...) since Emacs-21.
> 
> > ??? The code you changed signaled a "Symbol %s may not be
> > buffer-local" error, not "Setting constant".  What am I missing?
> 
> My patch did not touch `setq`.  It just made `make-local-variable` and
> `make-buffer-local-variable` signal the same error as `setq`.

Which IMO is confusing because the doc string of
enable-multibyte-characters says

  Automatically becomes permanently buffer-local when set.

> > we should at least change the ELisp manual, as it now contradicts
> > the code.
> 
> If you mean the doc of `setq`, then I guess this discrepancy has been
> with us since Emacs-21.

Actually, Emacs 21 said something more reasonable:

  Variable enable-multibyte-characters is read-only

which was different from the error signaled when trying to change the
value of, say, t.  Only Emacs 22.1 tossed the difference and started
to signal the same error for both.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#29422: [SUSPECTED SPAM] Re: bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local
  2017-11-26 15:31           ` Eli Zaretskii
@ 2017-11-27  4:42             ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2017-11-27  4:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: michael_heerdegen, 29422

>> My patch did not touch `setq`.  It just made `make-local-variable` and
>> `make-buffer-local-variable` signal the same error as `setq`.
> Which IMO is confusing because the doc string of
> enable-multibyte-characters says
>   Automatically becomes permanently buffer-local when set.

Yes, it's a weird critter.  Some versions ago, you could setq-default on
it, whereas you couldn't setq on it.
It'd arguably be cleaner if it were a function rather than a variable.

> Actually, Emacs 21 said something more reasonable:
>
>   Variable enable-multibyte-characters is read-only
>
> which was different from the error signaled when trying to change the
> value of, say, t.  Only Emacs 22.1 tossed the difference and started
> to signal the same error for both.

Oh, right, Gerd only added defvaralias in Emacs-22 (which is why/when
it get unified into the `constant` bit field, IIRC).


        Stefan





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-27  4:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-24  7:56 bug#29422: 27.0.50; Symbol enable-multibyte-characters may not be buffer-local Michael Heerdegen
2017-11-25  1:22 ` Michael Heerdegen
2017-11-25  7:53   ` Eli Zaretskii
2017-11-25 16:47     ` Stefan Monnier
2017-11-25 17:19       ` Eli Zaretskii
2017-11-26  2:07         ` Stefan Monnier
2017-11-26  3:39           ` Eli Zaretskii
2017-11-26 15:31           ` Eli Zaretskii
2017-11-27  4:42             ` bug#29422: [SUSPECTED SPAM] " Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).