* 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ 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; 5+ 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] 5+ messages in thread
end of thread, other threads:[~2024-06-15 15:42 UTC | newest] Thread overview: 5+ 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
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).