all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug or feature?
@ 2020-04-17 14:47 Colin Baxter
  2020-04-17 15:00 ` Colin Baxter
  0 siblings, 1 reply; 7+ messages in thread
From: Colin Baxter @ 2020-04-17 14:47 UTC (permalink / raw)
  To: help-gnu-emacs


Suppose you do

1. emacs <RET>
2. M-x gnus <RET>

We will assume this works - it generally does if your ~/.emacs and
~/.gnus.el are good :-). But

1. emacs -q <RET>
2. M-x load-library <RET>
3. ~/.emacs <RET>
4. M-x gnus <RET>

will produce an error. You must do

i.  M-x load-library <RET>
ii. ~/.gnus.el <RET>

before step (4). We assume that the file ~/.emacs does not have the line
(load-library "~/.gnus.el").

Is this simply a feature of the "-q" option or a bug?

Best wishes,


Colin Baxter
URL: http://www.Colin-Baxter.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
The sole cause of all human misery is the inability of people to sit
quietly in their rooms.  Blaise Pascal, 1670




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

* Re: Bug or feature?
  2020-04-17 14:47 Colin Baxter
@ 2020-04-17 15:00 ` Colin Baxter
  0 siblings, 0 replies; 7+ messages in thread
From: Colin Baxter @ 2020-04-17 15:00 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Colin Baxter <m43cap@yandex.com> writes:

    > Suppose you do

    > 1. emacs <RET> 2. M-x gnus <RET>

    > We will assume this works - it generally does if your ~/.emacs and
    > ~/.gnus.el are good :-). But

    > 1. emacs -q <RET> 2. M-x load-library <RET> 3. ~/.emacs <RET>
    > 4. M-x gnus <RET>

    > will produce an error. You must do

    > i.  M-x load-library <RET> ii. ~/.gnus.el <RET>

    > before step (4). We assume that the file ~/.emacs does not have
    > the line (load-library "~/.gnus.el").

    > Is this simply a feature of the "-q" option or a bug?

Thinking about it more, this is a feature because "emacs -q" will not
have any default settings, such as the location of the gnus init
file. Sorry about the original post.

Best wishes,

Colin Baxter
URL: http://www.Colin-Baxter.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
The sole cause of all human misery is the inability of people to sit
quietly in their rooms.  Blaise Pascal, 1670




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

* Bug or feature?
       [not found] <87zfsn7evr.fsf.ref@yahoo.com>
@ 2024-05-18  7:34 ` Po Lu
  2024-06-01 14:06   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Po Lu @ 2024-05-18  7:34 UTC (permalink / raw)
  To: emacs-devel

There is an elaborate segment of code in reset_buffer_local_variables
for, among other actions, eliminating outdated value cells from
buffer-local symbols that is not run when the shortcut is taken of
clearing local_var_alist_ in the case where PERMANENT_TOO is set, which
I suspect results in variable watchers being ignored and outdated symbol
values persisting.  Is there a specific reason for this discrepancy, or
is it just an oversight?



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

* Re: Bug or feature?
  2024-05-18  7:34 ` Bug or feature? Po Lu
@ 2024-06-01 14:06   ` Eli Zaretskii
  2024-06-15  7:55     ` Eli Zaretskii
  2024-06-15 15:42     ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2024-06-01 14:06 UTC (permalink / raw)
  To: Po Lu, Stefan Monnier; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Date: Sat, 18 May 2024 15:34:00 +0800
> 
> There is an elaborate segment of code in reset_buffer_local_variables
> for, among other actions, eliminating outdated value cells from
> buffer-local symbols that is not run when the shortcut is taken of
> clearing local_var_alist_ in the case where PERMANENT_TOO is set, which
> I suspect results in variable watchers being ignored and outdated symbol
> values persisting.  Is there a specific reason for this discrepancy, or
> is it just an oversight?

Stefan, any comments?



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

* Re: Bug or feature?
  2024-06-01 14:06   ` Eli Zaretskii
@ 2024-06-15  7:55     ` Eli Zaretskii
  2024-06-15  9:52       ` John ff
  2024-06-15 15:42     ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2024-06-15  7:55 UTC (permalink / raw)
  To: monnier; +Cc: luangruo, emacs-devel

Ping!

> Date: Sat, 01 Jun 2024 17:06:05 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: Po Lu <luangruo@yahoo.com>
> > Date: Sat, 18 May 2024 15:34:00 +0800
> > 
> > There is an elaborate segment of code in reset_buffer_local_variables
> > for, among other actions, eliminating outdated value cells from
> > buffer-local symbols that is not run when the shortcut is taken of
> > clearing local_var_alist_ in the case where PERMANENT_TOO is set, which
> > I suspect results in variable watchers being ignored and outdated symbol
> > values persisting.  Is there a specific reason for this discrepancy, or
> > is it just an oversight?
> 
> Stefan, any comments?
> 
> 



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

* Re: Bug or feature?
  2024-06-15  7:55     ` Eli Zaretskii
@ 2024-06-15  9:52       ` John ff
  0 siblings, 0 replies; 7+ messages in thread
From: John ff @ 2024-06-15  9:52 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, luangruo, emacs-devel




-------- Original Message --------
From: Eli Zaretskii <eliz@gnu.org>
Sent: Sat Jun 15 08:55:04 GMT+01:00 2024
To: monnier@iro.umontreal.ca
Cc: luangruo@yahoo.com, emacs-devel@gnu.org
Subject: Re: Bug or feature?

Ping!

> Date: Sat, 01 Jun 2024 17:06:05 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > From: Po Lu <luangruo@yahoo.com>
> > Date: Sat, 18 May 2024 15:34:00 +0800
> > 
> > There is an elaborate segment of code in reset_buffer_local_variables
> > for, among other actions, eliminating outdated value cells from
> > buffer-local symbols that is not run when the shortcut is taken of
> > clearing local_var_alist_ in the case where PERMANENT_TOO is set, which
> > I suspect results in variable watchers being ignored and outdated symbol
> > values persisting.  Is there a specific reason for this discrepancy, or
> > is it just an oversight?
> 
> Stefan, any comments?
> 
> 





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

* Re: Bug or feature?
  2024-06-01 14:06   ` Eli Zaretskii
  2024-06-15  7:55     ` Eli Zaretskii
@ 2024-06-15 15:42     ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2024-06-15 15:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Po Lu, emacs-devel

>> There is an elaborate segment of code in reset_buffer_local_variables
>> for, among other actions, eliminating outdated value cells from
>> buffer-local symbols that is not run when the shortcut is taken of
>> clearing local_var_alist_ in the case where PERMANENT_TOO is set, which
>> I suspect results in variable watchers being ignored and outdated symbol
>> values persisting.  Is there a specific reason for this discrepancy, or
>> is it just an oversight?
> Stefan, any comments?

Yes, it was an oversight in my commit 3ddff0803415.

This code also has another related problem because the var watchers can
change `local_var_alist`.  And I can't see in the code what prevents us
from running the watcher twice for those vars with `Qpermanent_local_hook`.
Oh, and calling `swap_in_global_binding` doesn't sound quite right
if we don't kill the var (because of `Qpermanent_local_hook`).


        Stefan




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

end of thread, other threads:[~2024-06-15 15:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87zfsn7evr.fsf.ref@yahoo.com>
2024-05-18  7:34 ` Bug or feature? Po Lu
2024-06-01 14:06   ` Eli Zaretskii
2024-06-15  7:55     ` Eli Zaretskii
2024-06-15  9:52       ` John ff
2024-06-15 15:42     ` Stefan Monnier
2020-04-17 14:47 Colin Baxter
2020-04-17 15:00 ` Colin Baxter

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.