* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) [not found] ` <20220919173459.EC224C00872@vcs2.savannah.gnu.org> @ 2022-09-19 18:50 ` Lars Ingebrigtsen 2022-09-20 12:15 ` Michael Albinus ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Lars Ingebrigtsen @ 2022-09-19 18:50 UTC (permalink / raw) To: Mattias EngdegÃ¥rd; +Cc: emacs-devel, Alan Mackenzie, Michael Albinus Thanks, Mattias. Just a note that this adds a couple of warnings which perhaps Michael and Alan can have a look at: In c-get-lang-constant: progmodes/cc-defs.el:2685:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). progmodes/cc-defs.el:2685:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). In toplevel form: net/tramp-gvfs.el:2511:32: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). net/tramp-gvfs.el:2511:10: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). In tramp-archive-file-name-handler: net/tramp-archive.el:351:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). net/tramp-archive.el:351:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-19 18:50 ` master 60102016e4: Abolish max-specpdl-size (bug#57911) Lars Ingebrigtsen @ 2022-09-20 12:15 ` Michael Albinus 2022-09-20 12:18 ` Lars Ingebrigtsen 2022-09-20 12:49 ` Mattias Engdegård 2022-09-27 8:47 ` bug#57911: " Alan Mackenzie 2022-09-27 8:47 ` Alan Mackenzie 2 siblings, 2 replies; 12+ messages in thread From: Michael Albinus @ 2022-09-20 12:15 UTC (permalink / raw) To: Lars Ingebrigtsen Cc: Mattias EngdegÃ¥rd, emacs-devel, Alan Mackenzie Lars Ingebrigtsen <larsi@gnus.org> writes: Hi Lars, > Just a note that this adds a couple of warnings which perhaps Michael > and Alan can have a look at: > > In toplevel form: > net/tramp-gvfs.el:2511:32: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > net/tramp-gvfs.el:2511:10: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > In tramp-archive-file-name-handler: > net/tramp-archive.el:351:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > net/tramp-archive.el:351:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). Tramp needs this for Emacs 26. I've wrapped it with `with-no-warnings'. Best regards, Michael. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-20 12:15 ` Michael Albinus @ 2022-09-20 12:18 ` Lars Ingebrigtsen 2022-09-20 12:49 ` Mattias Engdegård 1 sibling, 0 replies; 12+ messages in thread From: Lars Ingebrigtsen @ 2022-09-20 12:18 UTC (permalink / raw) To: Michael Albinus; +Cc: Mattias EngdegÃ¥rd, emacs-devel, Alan Mackenzie Michael Albinus <michael.albinus@gmx.de> writes: > Tramp needs this for Emacs 26. I've wrapped it with `with-no-warnings'. Thanks. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-20 12:15 ` Michael Albinus 2022-09-20 12:18 ` Lars Ingebrigtsen @ 2022-09-20 12:49 ` Mattias Engdegård 2022-09-20 13:07 ` Lars Ingebrigtsen ` (2 more replies) 1 sibling, 3 replies; 12+ messages in thread From: Mattias Engdegård @ 2022-09-20 12:49 UTC (permalink / raw) To: Michael Albinus Cc: Lars Ingebrigtsen, emacs-devel, Alan Mackenzie, Stefan Monnier 20 sep. 2022 kl. 14.15 skrev Michael Albinus <michael.albinus@gmx.de>: > Tramp needs this for Emacs 26. I've wrapped it with `with-no-warnings'. Thank you, but maybe silencing all warnings in the affected code was a cudgel heavier than the situation called for? Perhaps something like this would do: > (defmacro tramp--with-max-specpdl-size (new-limit &rest body) > (declare (indent 1)) > (if (< emacs-major-version 29) > `(let ((max-specpdl-size ,new-limit)) . ,body) > `(progn . ,body)))) Or we could postpone the obsoletion for a while. The change was made partly for user convenience, but the typically package maintainer may not agree that this has been achieved: there is no way to be avoid warnings in code that has to work on previous Emacs versions without making it uglier. Would it be a bad idea to, say, make a note to obsolete max-specpdl-size in Emacs 31? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-20 12:49 ` Mattias Engdegård @ 2022-09-20 13:07 ` Lars Ingebrigtsen 2022-09-20 13:14 ` Michael Albinus 2022-09-20 14:56 ` Alan Mackenzie 2 siblings, 0 replies; 12+ messages in thread From: Lars Ingebrigtsen @ 2022-09-20 13:07 UTC (permalink / raw) To: Mattias Engdegård Cc: Michael Albinus, emacs-devel, Alan Mackenzie, Stefan Monnier Mattias Engdegård <mattiase@acm.org> writes: > Would it be a bad idea to, say, make a note to obsolete > max-specpdl-size in Emacs 31? Obsoleting it is nice, because that's a convenient way to let people know that altering it doesn't do anything any more. But as you point out, it makes it difficult to write portable code without disabling warnings for more code than you really want to disable those warnings for. So postponing the obsoletion might make sense. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-20 12:49 ` Mattias Engdegård 2022-09-20 13:07 ` Lars Ingebrigtsen @ 2022-09-20 13:14 ` Michael Albinus 2022-09-20 14:56 ` Alan Mackenzie 2 siblings, 0 replies; 12+ messages in thread From: Michael Albinus @ 2022-09-20 13:14 UTC (permalink / raw) To: Mattias Engdegård Cc: Lars Ingebrigtsen, emacs-devel, Alan Mackenzie, Stefan Monnier Mattias Engdegård <mattiase@acm.org> writes: Hi Mattias, >> Tramp needs this for Emacs 26. I've wrapped it with `with-no-warnings'. > > Thank you, but maybe silencing all warnings in the affected code was a cudgel heavier than the situation called for? Well, I wanted to use `with-suppressed-warnings', but this exists in Emacs 27+ only. > Perhaps something like this would do: > >> (defmacro tramp--with-max-specpdl-size (new-limit &rest body) >> (declare (indent 1)) >> (if (< emacs-major-version 29) >> `(let ((max-specpdl-size ,new-limit)) . ,body) >> `(progn . ,body)))) It isn't Tramp code which changes frequently, so I guess we could keep it as it is. And with Tramp 2.7 (Emacs 30), Emacs 26 won't be supported any longer, and Tramp can get rid of it. Let's work on a soonish Emacs 29 release ! :-) Best regards, Michael. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-20 12:49 ` Mattias Engdegård 2022-09-20 13:07 ` Lars Ingebrigtsen 2022-09-20 13:14 ` Michael Albinus @ 2022-09-20 14:56 ` Alan Mackenzie 2022-09-23 8:32 ` Mattias Engdegård 2 siblings, 1 reply; 12+ messages in thread From: Alan Mackenzie @ 2022-09-20 14:56 UTC (permalink / raw) To: Mattias Engdegård Cc: Michael Albinus, Lars Ingebrigtsen, emacs-devel, Stefan Monnier Hello, Mattias. On Tue, Sep 20, 2022 at 14:49:40 +0200, Mattias Engdegård wrote: > 20 sep. 2022 kl. 14.15 skrev Michael Albinus <michael.albinus@gmx.de>: > > Tramp needs this for Emacs 26. I've wrapped it with `with-no-warnings'. > Thank you, but maybe silencing all warnings in the affected code was a > cudgel heavier than the situation called for? Perhaps something like > this would do: > > (defmacro tramp--with-max-specpdl-size (new-limit &rest body) > > (declare (indent 1)) > > (if (< emacs-major-version 29) > > `(let ((max-specpdl-size ,new-limit)) . ,body) > > `(progn . ,body)))) > Or we could postpone the obsoletion for a while. The change was made > partly for user convenience, but the typically package maintainer may > not agree that this has been achieved: there is no way to be avoid > warnings in code that has to work on previous Emacs versions without > making it uglier. > Would it be a bad idea to, say, make a note to obsolete > max-specpdl-size in Emacs 31? I suspect it would go the same way as font-lock-reference-face did. That face was renamed to font-lock-constant-face in the early 1990s, with an alias. People just continued to use the alias. If you postpone the obsoletion of m-s-s to Emacs 31, the code using it probably won't change until then. :-( I suspect I am going to implement a macro something like: (defmacro c-maybe-max-specpdl-size-let (varlist &rest body) (let ((-varlist- varlist) msp-binding) (if (get 'max-specpdl-size 'byte-obsolete-variable) (cond ((memq 'max-specpdl-size -varlist-) (setq -varlist- (delq 'max-spec-pdl-size -varlist-))) ((setq msp-binding (assq 'max-spec-pdl-size -varlist-)) (setq -varlist- (delq msp-binding -varlist-))))) `(let ,varlist ,@body))) .. Which points out a deficit in Emacs, namely the lack of functions obsolete-variable-p and obsolete-function-p. -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-20 14:56 ` Alan Mackenzie @ 2022-09-23 8:32 ` Mattias Engdegård 0 siblings, 0 replies; 12+ messages in thread From: Mattias Engdegård @ 2022-09-23 8:32 UTC (permalink / raw) To: Alan Mackenzie Cc: Michael Albinus, Lars Ingebrigtsen, emacs-devel, Stefan Monnier 20 sep. 2022 kl. 16.56 skrev Alan Mackenzie <acm@muc.de>: > If you postpone the obsoletion of m-s-s to Emacs 31, the code using it > probably won't change until then. Very likely, but at least we then have the old NEWS entries to point at when people act surprised... But you are right in that we shouldn't invent a problem that doesn't necessarily exist. If legitimate-sounding concerns arise before 29.1 is released, including the prerelease, then we can take mitigating action. ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#57911: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-19 18:50 ` master 60102016e4: Abolish max-specpdl-size (bug#57911) Lars Ingebrigtsen 2022-09-20 12:15 ` Michael Albinus @ 2022-09-27 8:47 ` Alan Mackenzie 2022-09-27 8:47 ` Alan Mackenzie 2 siblings, 0 replies; 12+ messages in thread From: Alan Mackenzie @ 2022-09-27 8:47 UTC (permalink / raw) To: Lars Ingebrigtsen Cc: 57911, Mattias EngdegÃ¥rd, Michael Albinus, Stefan Monnier, emacs-devel Hello, Lars. On Mon, Sep 19, 2022 at 20:50:15 +0200, Lars Ingebrigtsen wrote: > Thanks, Mattias. > Just a note that this adds a couple of warnings which perhaps Michael > and Alan can have a look at: > In c-get-lang-constant: > progmodes/cc-defs.el:2685:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > progmodes/cc-defs.el:2685:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). I've now fixed these warnings. > In toplevel form: > net/tramp-gvfs.el:2511:32: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > net/tramp-gvfs.el:2511:10: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > In tramp-archive-file-name-handler: > net/tramp-archive.el:351:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > net/tramp-archive.el:351:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-19 18:50 ` master 60102016e4: Abolish max-specpdl-size (bug#57911) Lars Ingebrigtsen 2022-09-20 12:15 ` Michael Albinus 2022-09-27 8:47 ` bug#57911: " Alan Mackenzie @ 2022-09-27 8:47 ` Alan Mackenzie 2022-09-27 9:01 ` bug#57911: " Mattias Engdegård 2 siblings, 1 reply; 12+ messages in thread From: Alan Mackenzie @ 2022-09-27 8:47 UTC (permalink / raw) To: Lars Ingebrigtsen Cc: Mattias EngdegÃ¥rd, emacs-devel, Michael Albinus, Stefan Monnier, 57911 Hello, Lars. On Mon, Sep 19, 2022 at 20:50:15 +0200, Lars Ingebrigtsen wrote: > Thanks, Mattias. > Just a note that this adds a couple of warnings which perhaps Michael > and Alan can have a look at: > In c-get-lang-constant: > progmodes/cc-defs.el:2685:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > progmodes/cc-defs.el:2685:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). I've now fixed these warnings. > In toplevel form: > net/tramp-gvfs.el:2511:32: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > net/tramp-gvfs.el:2511:10: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > In tramp-archive-file-name-handler: > net/tramp-archive.el:351:37: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). > net/tramp-archive.el:351:15: Warning: ‘max-specpdl-size’ is an obsolete variable (as of 29.1). -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#57911: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-27 8:47 ` Alan Mackenzie @ 2022-09-27 9:01 ` Mattias Engdegård 2022-09-27 10:14 ` Alan Mackenzie 0 siblings, 1 reply; 12+ messages in thread From: Mattias Engdegård @ 2022-09-27 9:01 UTC (permalink / raw) To: Alan Mackenzie Cc: 57911, Lars Ingebrigtsen, Michael Albinus, Stefan Monnier, emacs-devel 27 sep. 2022 kl. 10.47 skrev Alan Mackenzie <acm@muc.de>: > I've now fixed these warnings. Thank you Alan! One detail though: > (let ((-varlist- varlist) msp-binding) Here `-varlist-` aliases `varlist`... > (setq -varlist- (delq 'max-specpdl-size -varlist-))) ... the original macro argument is mutated, which is directly from the source code -- maybe don't do that in a macro? Then we set `-varlist-`, but that's a dead store because... > `(let* ,varlist ,@body))) ... we use `varlist`. ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#57911: master 60102016e4: Abolish max-specpdl-size (bug#57911) 2022-09-27 9:01 ` bug#57911: " Mattias Engdegård @ 2022-09-27 10:14 ` Alan Mackenzie 0 siblings, 0 replies; 12+ messages in thread From: Alan Mackenzie @ 2022-09-27 10:14 UTC (permalink / raw) To: Mattias Engdegård Cc: 57911, Lars Ingebrigtsen, Michael Albinus, Stefan Monnier, emacs-devel Hello, Mattias. On Tue, Sep 27, 2022 at 11:01:40 +0200, Mattias Engdegård wrote: > 27 sep. 2022 kl. 10.47 skrev Alan Mackenzie <acm@muc.de>: > > I've now fixed these warnings. > Thank you Alan! One detail though: > > (let ((-varlist- varlist) msp-binding) > Here `-varlist-` aliases `varlist`... > > (setq -varlist- (delq 'max-specpdl-size -varlist-))) > ... the original macro argument is mutated, which is directly from the source code -- maybe don't do that in a macro? > Then we set `-varlist-`, but that's a dead store because... > > `(let* ,varlist ,@body))) > ... we use `varlist`. Thanks for spotting those mistakes. I think I've now fixed them with a second commit. -- Alan Mackenzie (Nuremberg, Germany). ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-09-27 10:14 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <166360889903.6127.6574959318930089210@vcs2.savannah.gnu.org> [not found] ` <20220919173459.EC224C00872@vcs2.savannah.gnu.org> 2022-09-19 18:50 ` master 60102016e4: Abolish max-specpdl-size (bug#57911) Lars Ingebrigtsen 2022-09-20 12:15 ` Michael Albinus 2022-09-20 12:18 ` Lars Ingebrigtsen 2022-09-20 12:49 ` Mattias Engdegård 2022-09-20 13:07 ` Lars Ingebrigtsen 2022-09-20 13:14 ` Michael Albinus 2022-09-20 14:56 ` Alan Mackenzie 2022-09-23 8:32 ` Mattias Engdegård 2022-09-27 8:47 ` bug#57911: " Alan Mackenzie 2022-09-27 8:47 ` Alan Mackenzie 2022-09-27 9:01 ` bug#57911: " Mattias Engdegård 2022-09-27 10:14 ` Alan Mackenzie
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.