* replacement of find-file-not-found-hooks @ 2024-07-20 14:52 Uwe Brauer via Emacs development discussions. 2024-07-20 15:08 ` [Solved] (was: replacement of find-file-not-found-hooks) Uwe Brauer via Emacs development discussions. ` (2 more replies) 0 siblings, 3 replies; 19+ messages in thread From: Uwe Brauer via Emacs development discussions. @ 2024-07-20 14:52 UTC (permalink / raw) To: emacs-devel Hi According to the news: ** Some functions and variables obsolete since Emacs 21 or 22 have been removed: 'c-toggle-auto-state', 'find-file-not-found-hooks', 'ls-lisp-dired-ignore-case', 'query-replace-regexp-eval'. I am still using an old (starting in 1988) but very useful package called auto-insert-tkld.el (automatic insertion of text into new files.) It uses (add-hook 'find-file-not-found-hooks 'insert-auto-insert-files 'append) Now it seems that hook has been removed what shall I use instead? Backward compatibility, sigh Regards Uwe Brauer -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. ^ permalink raw reply [flat|nested] 19+ messages in thread
* [Solved] (was: replacement of find-file-not-found-hooks) 2024-07-20 14:52 replacement of find-file-not-found-hooks Uwe Brauer via Emacs development discussions. @ 2024-07-20 15:08 ` Uwe Brauer via Emacs development discussions. 2024-07-20 15:10 ` replacement of find-file-not-found-hooks Eli Zaretskii 2024-07-20 17:37 ` Andreas Schwab 2 siblings, 0 replies; 19+ messages in thread From: Uwe Brauer via Emacs development discussions. @ 2024-07-20 15:08 UTC (permalink / raw) To: emacs-devel [-- Attachment #1: Type: text/plain, Size: 643 bytes --] >>> "Edd" == Emacs development discussions <Uwe> writes: > Hi > According to the news: > ** Some functions and variables obsolete since Emacs 21 or 22 have been removed: > 'c-toggle-auto-state', 'find-file-not-found-hooks', > 'ls-lisp-dired-ignore-case', 'query-replace-regexp-eval'. (defalias 'find-file-not-found-hooks 'find-file-not-found-functions) Is the answer -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5684 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-20 14:52 replacement of find-file-not-found-hooks Uwe Brauer via Emacs development discussions. 2024-07-20 15:08 ` [Solved] (was: replacement of find-file-not-found-hooks) Uwe Brauer via Emacs development discussions. @ 2024-07-20 15:10 ` Eli Zaretskii 2024-07-20 17:37 ` Andreas Schwab 2 siblings, 0 replies; 19+ messages in thread From: Eli Zaretskii @ 2024-07-20 15:10 UTC (permalink / raw) To: Uwe Brauer; +Cc: emacs-devel > Date: Sat, 20 Jul 2024 16:52:13 +0200 > From: Uwe Brauer via "Emacs development discussions." <emacs-devel@gnu.org> > > According to the news: > > > ** Some functions and variables obsolete since Emacs 21 or 22 have been removed: > 'c-toggle-auto-state', 'find-file-not-found-hooks', > 'ls-lisp-dired-ignore-case', 'query-replace-regexp-eval'. > > I am still using an old (starting in 1988) but very useful package called > auto-insert-tkld.el (automatic insertion of text into new files.) > > It uses > (add-hook 'find-file-not-found-hooks 'insert-auto-insert-files 'append) > > Now it seems that hook has been removed what shall I use instead? You should use find-file-not-found-functions. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-20 14:52 replacement of find-file-not-found-hooks Uwe Brauer via Emacs development discussions. 2024-07-20 15:08 ` [Solved] (was: replacement of find-file-not-found-hooks) Uwe Brauer via Emacs development discussions. 2024-07-20 15:10 ` replacement of find-file-not-found-hooks Eli Zaretskii @ 2024-07-20 17:37 ` Andreas Schwab 2024-07-21 15:00 ` Uwe Brauer via Emacs development discussions. 2 siblings, 1 reply; 19+ messages in thread From: Andreas Schwab @ 2024-07-20 17:37 UTC (permalink / raw) To: emacs-devel On Jul 20 2024, Uwe Brauer via "Emacs development discussions." wrote: > According to the news: > > > ** Some functions and variables obsolete since Emacs 21 or 22 have been removed: > 'c-toggle-auto-state', 'find-file-not-found-hooks', > 'ls-lisp-dired-ignore-case', 'query-replace-regexp-eval'. > > I am still using an old (starting in 1988) but very useful package called > auto-insert-tkld.el (automatic insertion of text into new files.) > > It uses > (add-hook 'find-file-not-found-hooks 'insert-auto-insert-files 'append) > > Now it seems that hook has been removed what shall I use instead? According to the news: *** A number of hooks have been renamed to better follow the conventions: 'find-file-not-found-hooks' to 'find-file-not-found-functions', -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-20 17:37 ` Andreas Schwab @ 2024-07-21 15:00 ` Uwe Brauer via Emacs development discussions. 2024-07-21 15:52 ` Eli Zaretskii 2024-07-23 3:42 ` Richard Stallman 0 siblings, 2 replies; 19+ messages in thread From: Uwe Brauer via Emacs development discussions. @ 2024-07-21 15:00 UTC (permalink / raw) To: emacs-devel [-- Attachment #1: Type: text/plain, Size: 1208 bytes --] >>> "AS" == Andreas Schwab <schwab@linux-m68k.org> writes: > On Jul 20 2024, Uwe Brauer via "Emacs development discussions." wrote: >> According to the news: >> >> >> ** Some functions and variables obsolete since Emacs 21 or 22 have >> been removed: 'c-toggle-auto-state', 'find-file-not-found-hooks', >> 'ls-lisp-dired-ignore-case', 'query-replace-regexp-eval'. >> >> I am still using an old (starting in 1988) but very useful package >> called auto-insert-tkld.el (automatic insertion of text into new >> files.) >> >> It uses >> (add-hook 'find-file-not-found-hooks 'insert-auto-insert-files 'append) >> >> Now it seems that hook has been removed what shall I use instead? > According to the news: > *** A number of hooks have been renamed to better follow the conventions: > 'find-file-not-found-hooks' to 'find-file-not-found-functions', Thanks but then a hook is no longer called a hook? Confusing, isn't it? -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5684 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-21 15:00 ` Uwe Brauer via Emacs development discussions. @ 2024-07-21 15:52 ` Eli Zaretskii 2024-07-23 3:42 ` Richard Stallman 1 sibling, 0 replies; 19+ messages in thread From: Eli Zaretskii @ 2024-07-21 15:52 UTC (permalink / raw) To: Uwe Brauer; +Cc: emacs-devel > Date: Sun, 21 Jul 2024 17:00:39 +0200 > From: Uwe Brauer via "Emacs development discussions." <emacs-devel@gnu.org> > > >>> "AS" == Andreas Schwab <schwab@linux-m68k.org> writes: > > > According to the news: > > > *** A number of hooks have been renamed to better follow the conventions: > > > 'find-file-not-found-hooks' to 'find-file-not-found-functions', > > Thanks but then a hook is no longer called a hook? Confusing, isn't it? Not if you read the ELisp manual, which says: Most of the hooks in Emacs are “normal hooks”. These variables contain lists of functions to be called with no arguments. By convention, whenever the hook name ends in ‘-hook’, that tells you it is normal. We try to make all hooks normal, as much as possible, so that you can use them in a uniform way. Every major mode command is supposed to run a normal hook called the “mode hook” as one of the last steps of initialization. This makes it easy for a user to customize the behavior of the mode, by overriding the buffer-local variable assignments already made by the mode. Most minor mode functions also run a mode hook at the end. But hooks are used in other contexts too. For example, the hook ‘suspend-hook’ runs just before Emacs suspends itself (*note Suspending Emacs::). If the hook variable's name does not end with ‘-hook’, that indicates it is probably an “abnormal hook”. These differ from normal hooks in two ways: they can be called with one or more arguments, and their return values can be used in some way. The hook's documentation says how the functions are called and how their return values are used. Any functions added to an abnormal hook must follow the hook's calling convention. By convention, abnormal hook names end in ‘-functions’. If the name of the variable ends in ‘-predicate’ or ‘-function’ (singular) then its value must be a function, not a list of functions. As with abnormal hooks, the expected arguments and meaning of the return value vary across such _single function hooks_. The details are explained in each variable's docstring. the old name was unconventional in that it ended in "-hooks", so we renamed it. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-21 15:00 ` Uwe Brauer via Emacs development discussions. 2024-07-21 15:52 ` Eli Zaretskii @ 2024-07-23 3:42 ` Richard Stallman 2024-07-23 4:32 ` Stefan Kangas 1 sibling, 1 reply; 19+ messages in thread From: Richard Stallman @ 2024-07-23 3:42 UTC (permalink / raw) To: Uwe Brauer; +Cc: emacs-devel [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] The renaming may be good, but there was a reason I did not change that before: to avoid breaking user code. Should we make the old name `find-file-not-found-hooks' an alias for `find-file-not-found-functions'? Perhaps make it obsolete now, and rename it in version 32? -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 3:42 ` Richard Stallman @ 2024-07-23 4:32 ` Stefan Kangas 2024-07-23 6:52 ` Uwe Brauer 0 siblings, 1 reply; 19+ messages in thread From: Stefan Kangas @ 2024-07-23 4:32 UTC (permalink / raw) To: rms, Uwe Brauer; +Cc: emacs-devel Richard Stallman <rms@gnu.org> writes: > Should we make the old name `find-file-not-found-hooks' an alias for > `find-file-not-found-functions'? Perhaps make it obsolete now, and > rename it in version 32? It was declared obsolete (with `define-obsolete-variable-alias') already in Emacs version 22.1, and it was subsequently removed in Emacs 29.1. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 4:32 ` Stefan Kangas @ 2024-07-23 6:52 ` Uwe Brauer 2024-07-23 8:41 ` Philip Kaludercic 2024-07-23 21:45 ` replacement of find-file-not-found-hooks Björn Bidar 0 siblings, 2 replies; 19+ messages in thread From: Uwe Brauer @ 2024-07-23 6:52 UTC (permalink / raw) To: Stefan Kangas; +Cc: rms, Uwe Brauer, emacs-devel [-- Attachment #1: Type: text/plain, Size: 1788 bytes --] >>> "SK" == Stefan Kangas <stefankangas@gmail.com> writes: > Richard Stallman <rms@gnu.org> writes: >> Should we make the old name `find-file-not-found-hooks' an alias for >> `find-file-not-found-functions'? Perhaps make it obsolete now, and >> rename it in version 32? > It was declared obsolete (with `define-obsolete-variable-alias') already > in Emacs version 22.1, and it was subsequently removed in Emacs 29.1. Let me add some comments, as a very-long-time user. The problem I encountered has to do with auto-insert-tkld.el a package that dates back to 1988, and still works and does the job it was designed for. Now renaming a functionality breaks down older packages (and in this particular case I would have preferred if that hook (or function) had been called find-file-not-found-hook-functions, or something like this, because it makes it easier for the user to pin down the problem. I recently slowed down in trying out the latest emacs versions (that is master), just because of this issue: renaming functions and variables will cause me to spend maybe a couple of days fixing things. Don't get me wrong, if there is a new exciting feature, like full BIDI support or prettify-symbols-mode, I will try it out. But nowadays I only upgrade if the packages I use most, like auctex and orgmode require it. I wished there was compatibility file, in which old for some reason obsolete variables, functions etc would go so that the user you upgrade more swiftly. Regards Uwe Brauer -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5684 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 6:52 ` Uwe Brauer @ 2024-07-23 8:41 ` Philip Kaludercic 2024-07-23 11:36 ` Eli Zaretskii 2024-07-23 21:45 ` replacement of find-file-not-found-hooks Björn Bidar 1 sibling, 1 reply; 19+ messages in thread From: Philip Kaludercic @ 2024-07-23 8:41 UTC (permalink / raw) To: Uwe Brauer; +Cc: Stefan Kangas, rms, emacs-devel Uwe Brauer <oub@mat.ucm.es> writes: >>>> "SK" == Stefan Kangas <stefankangas@gmail.com> writes: > >> Richard Stallman <rms@gnu.org> writes: >>> Should we make the old name `find-file-not-found-hooks' an alias for >>> `find-file-not-found-functions'? Perhaps make it obsolete now, and >>> rename it in version 32? > >> It was declared obsolete (with `define-obsolete-variable-alias') already >> in Emacs version 22.1, and it was subsequently removed in Emacs 29.1. > > Let me add some comments, as a very-long-time user. > > The problem I encountered has to do with auto-insert-tkld.el a package > that dates back to 1988, and still works and does the job it was > designed for. When loading or compiling this file, did you encounter warnings that it was using obsolete variables? > Now renaming a functionality breaks down older packages (and in this > particular case I would have preferred if that hook (or function) had > been called find-file-not-found-hook-functions, or something like this, > because it makes it easier for the user to pin down the problem. > > I recently slowed down in trying out the latest emacs versions (that is > master), just because of this issue: renaming functions and variables will > cause me to spend maybe a couple of days fixing things. > > Don't get me wrong, if there is a new exciting feature, like full BIDI > support or prettify-symbols-mode, I will try it out. > > But nowadays I only upgrade if the packages I use most, like auctex and > orgmode require it. > > I wished there was compatibility file, in which old for some reason > obsolete variables, functions etc would go so that the user you upgrade > more swiftly. > > Regards > > Uwe Brauer -- Philip Kaludercic on peregrine ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 8:41 ` Philip Kaludercic @ 2024-07-23 11:36 ` Eli Zaretskii 2024-07-23 19:34 ` Uwe Brauer 0 siblings, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2024-07-23 11:36 UTC (permalink / raw) To: Philip Kaludercic; +Cc: oub, stefankangas, rms, emacs-devel > From: Philip Kaludercic <philipk@posteo.net> > Cc: Stefan Kangas <stefankangas@gmail.com>, rms@gnu.org, emacs-devel@gnu.org > Date: Tue, 23 Jul 2024 08:41:12 +0000 > > Uwe Brauer <oub@mat.ucm.es> writes: > > >>>> "SK" == Stefan Kangas <stefankangas@gmail.com> writes: > > > >> Richard Stallman <rms@gnu.org> writes: > >>> Should we make the old name `find-file-not-found-hooks' an alias for > >>> `find-file-not-found-functions'? Perhaps make it obsolete now, and > >>> rename it in version 32? > > > >> It was declared obsolete (with `define-obsolete-variable-alias') already > >> in Emacs version 22.1, and it was subsequently removed in Emacs 29.1. > > > > Let me add some comments, as a very-long-time user. > > > > The problem I encountered has to do with auto-insert-tkld.el a package > > that dates back to 1988, and still works and does the job it was > > designed for. > > When loading or compiling this file, did you encounter warnings that it > was using obsolete variables? Indeed. We leave these obsolete aliases for several major releases to give people enough time to pay attention to those obsolescence warnings, and change their code before the obsolete variables/functions are actually deleted. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 11:36 ` Eli Zaretskii @ 2024-07-23 19:34 ` Uwe Brauer 2024-07-23 20:38 ` Stefan Kangas 2024-07-24 11:13 ` Eli Zaretskii 0 siblings, 2 replies; 19+ messages in thread From: Uwe Brauer @ 2024-07-23 19:34 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Philip Kaludercic, oub, stefankangas, rms, emacs-devel [-- Attachment #1: Type: text/plain, Size: 1615 bytes --] > Indeed. We leave these obsolete aliases for several major releases to > give people enough time to pay attention to those obsolescence > warnings, and change their code before the obsolete > variables/functions are actually deleted. Several comments, 1. I «load» via require and I therefore those message are somewhat difficult to notice. 2. When I compile I of course see the warnings, but do you suggest that I just byte compile all my files after installing a new Emacs version? 3. I still find the naming «find-file-not-found-functions» and therefore the call (add-hook 'find-file-not-found-functions 'insert-auto-insert-files 'append) counterintuitive, (now it is too late, but why wasn't this called «find-file-not-found-hook-functions» or something like this). 4. BTW (define-obsolete-variable-alias 'find-file-not-found-hooks 'find-file-not-found-functions "22.1") works for me (defalias 'find-file-not-found-hooks 'find-file-not-found-functions) does not. 5. I still don't gasp the advantage of renaming functions and variables. I understand the benefit of introducing new functions and variables but the benefit of renaming variables and functions I fail to see. -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5684 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 19:34 ` Uwe Brauer @ 2024-07-23 20:38 ` Stefan Kangas 2024-07-24 11:13 ` Eli Zaretskii 1 sibling, 0 replies; 19+ messages in thread From: Stefan Kangas @ 2024-07-23 20:38 UTC (permalink / raw) To: Uwe Brauer, Eli Zaretskii; +Cc: Philip Kaludercic, rms, emacs-devel Uwe Brauer <oub@mat.ucm.es> writes: > 2. When I compile I of course see the warnings, but do you suggest > that I just byte compile all my files after installing a new > Emacs version? These days, "most" packages are installed via some ELPA archive, so users get them byte-compiled automatically. The warnings can then, at least in theory, be reported to an active upstream which would fix them. Of course, some of us do still keep some old/unmaintained .el libraries from way back when lying around, and for those packages we have to rely on more manual processes. Byte-compiling them is not too hard to do from Dired (press `B'), for example. > 3. I still find the naming «find-file-not-found-functions» > and therefore the call > (add-hook 'find-file-not-found-functions > 'insert-auto-insert-files 'append) > counterintuitive, (now it is too late, but why wasn't this called > «find-file-not-found-hook-functions» or something like this). I think these are just our conventions, basically. For example, I can't find any variable matching "-hook-functions$", but we have many matching either "-hook$" or "-functions$". > 4. BTW (define-obsolete-variable-alias 'find-file-not-found-hooks > 'find-file-not-found-functions "22.1") works for me (defalias > 'find-file-not-found-hooks 'find-file-not-found-functions) does not. You probably want defvaralias instead of defalias (which is for functions). > 5. I still don't gasp the advantage of renaming functions and > variables. I understand the benefit of introducing new functions and > variables but the benefit of renaming variables and functions I > fail to see. The main benefit is that it helps keep Emacs interfaces, variables, etc. more consistent, which in turn makes Emacs easier to maintain and use. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 19:34 ` Uwe Brauer 2024-07-23 20:38 ` Stefan Kangas @ 2024-07-24 11:13 ` Eli Zaretskii 2024-07-24 12:33 ` [toggle-read-only] (was: replacement of find-file-not-found-hooks) Uwe Brauer 1 sibling, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2024-07-24 11:13 UTC (permalink / raw) To: Uwe Brauer; +Cc: philipk, oub, stefankangas, rms, emacs-devel > From: Uwe Brauer <oub@mat.ucm.es> > Cc: Philip Kaludercic <philipk@posteo.net>, oub@mat.ucm.es, > stefankangas@gmail.com, rms@gnu.org, emacs-devel@gnu.org > Date: Tue, 23 Jul 2024 21:34:22 +0200 > > > Indeed. We leave these obsolete aliases for several major releases to > > give people enough time to pay attention to those obsolescence > > warnings, and change their code before the obsolete > > variables/functions are actually deleted. > > Several comments, > > 1. I «load» via require and I therefore those message are somewhat > difficult to notice. I understand, but you are encouraged to pay attention to these warnings, if you don't want surprises. > 2. When I compile I of course see the warnings, but do you suggest > that I just byte compile all my files after installing a new > Emacs version? Yes, I'd definitely recommend that. I do it myself on my systems, FWIW. > 3. I still find the naming «find-file-not-found-functions» > and therefore the call > (add-hook 'find-file-not-found-functions > 'insert-auto-insert-files 'append) > counterintuitive, (now it is too late, but why wasn't this called > «find-file-not-found-hook-functions» or something like this). Longer names are harder to type and read. > 5. I still don't gasp the advantage of renaming functions and > variables. I understand the benefit of introducing new functions and > variables but the benefit of renaming variables and functions I > fail to see. It makes Emacs easier to learn and use. ^ permalink raw reply [flat|nested] 19+ messages in thread
* [toggle-read-only] (was: replacement of find-file-not-found-hooks) 2024-07-24 11:13 ` Eli Zaretskii @ 2024-07-24 12:33 ` Uwe Brauer 2024-07-24 12:47 ` Eli Zaretskii 0 siblings, 1 reply; 19+ messages in thread From: Uwe Brauer @ 2024-07-24 12:33 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Uwe Brauer, philipk, stefankangas, rms, emacs-devel [-- Attachment #1: Type: text/plain, Size: 2281 bytes --] >>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes: >> From: Uwe Brauer <oub@mat.ucm.es> >> Cc: Philip Kaludercic <philipk@posteo.net>, oub@mat.ucm.es, >> stefankangas@gmail.com, rms@gnu.org, emacs-devel@gnu.org >> Date: Tue, 23 Jul 2024 21:34:22 +0200 >> >> > Indeed. We leave these obsolete aliases for several major releases to >> > give people enough time to pay attention to those obsolescence >> > warnings, and change their code before the obsolete >> > variables/functions are actually deleted. >> >> Several comments, >> >> 1. I «load» via require and I therefore those message are somewhat >> difficult to notice. > I understand, but you are encouraged to pay attention to these > warnings, if you don't want surprises. >> 2. When I compile I of course see the warnings, but do you suggest >> that I just byte compile all my files after installing a new >> Emacs version? > Yes, I'd definitely recommend that. I do it myself on my systems, > FWIW. Oh my god, that will also end up taking me days. BTW, code, that worked in emacs 28 now gave an error because toggle-read-only is no longer known to be defined and here no hint was given what to use So I boldly replaced - (toggle-read-only nil)) by + (read-only-mode nil)) It worked >> 3. I still find the naming «find-file-not-found-functions» >> and therefore the call >> (add-hook 'find-file-not-found-functions >> 'insert-auto-insert-files 'append) >> counterintuitive, (now it is too late, but why wasn't this called >> «find-file-not-found-hook-functions» or something like this). > Longer names are harder to type and read. Yeah but maybe easier to find via apropos! >> 5. I still don't gasp the advantage of renaming functions and >> variables. I understand the benefit of introducing new functions and >> variables but the benefit of renaming variables and functions I >> fail to see. > It makes Emacs easier to learn and use. And it breaks backward compatibility. -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5684 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [toggle-read-only] (was: replacement of find-file-not-found-hooks) 2024-07-24 12:33 ` [toggle-read-only] (was: replacement of find-file-not-found-hooks) Uwe Brauer @ 2024-07-24 12:47 ` Eli Zaretskii 2024-07-24 15:50 ` [toggle-read-only] Uwe Brauer 0 siblings, 1 reply; 19+ messages in thread From: Eli Zaretskii @ 2024-07-24 12:47 UTC (permalink / raw) To: Uwe Brauer; +Cc: philipk, stefankangas, rms, emacs-devel > From: Uwe Brauer <oub@mat.ucm.es> > Cc: Uwe Brauer <oub@mat.ucm.es>, philipk@posteo.net, > stefankangas@gmail.com, rms@gnu.org, emacs-devel@gnu.org > Date: Wed, 24 Jul 2024 14:33:35 +0200 > > >> 2. When I compile I of course see the warnings, but do you suggest > >> that I just byte compile all my files after installing a new > >> Emacs version? > > > Yes, I'd definitely recommend that. I do it myself on my systems, > > FWIW. > > Oh my god, that will also end up taking me days. Why "days"? how many Lisp files do you have that it could take "days" top byte-compile them? > BTW, code, that worked in emacs 28 now gave an error because > toggle-read-only is no longer known to be defined and here no hint > was given what to use > > So I boldly > replaced > - (toggle-read-only nil)) > by > + (read-only-mode nil)) > > It worked toggle-read-only is obsolete since Emacs 24, i.e. for the last 12 years. > >> 3. I still find the naming «find-file-not-found-functions» > >> and therefore the call > >> (add-hook 'find-file-not-found-functions > >> 'insert-auto-insert-files 'append) > >> counterintuitive, (now it is too late, but why wasn't this called > >> «find-file-not-found-hook-functions» or something like this). > > > Longer names are harder to type and read. > > Yeah but maybe easier to find via apropos! No, not easier. > >> 5. I still don't gasp the advantage of renaming functions and > >> variables. I understand the benefit of introducing new functions and > >> variables but the benefit of renaming variables and functions I > >> fail to see. > > > It makes Emacs easier to learn and use. > > And it breaks backward compatibility. Which is why we do it very sparingly and always after a very long period of obsolescence. Many people think we are too conservative. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [toggle-read-only] 2024-07-24 12:47 ` Eli Zaretskii @ 2024-07-24 15:50 ` Uwe Brauer 2024-07-24 16:41 ` [toggle-read-only] Eli Zaretskii 0 siblings, 1 reply; 19+ messages in thread From: Uwe Brauer @ 2024-07-24 15:50 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Uwe Brauer, philipk, stefankangas, rms, emacs-devel [-- Attachment #1: Type: text/plain, Size: 1133 bytes --] > Why "days"? how many Lisp files do you have that it could take "days" > top byte-compile them? Days to make everything work, not days to compile, but yes I do have quite a bit of additional files more than 300 I would say, that includes old pkg like bbdb-2.35, for which I have written various hacks, that do not work in more modern bbdb version mostly because of renaming variables and functions. > toggle-read-only is obsolete since Emacs 24, i.e. for the last 12 > years. > No, not easier. > Which is why we do it very sparingly and always after a very long > period of obsolescence. Many people think we are too conservative. For me this is not too conservative. But why, instead of deleting after a while the defalias, define-obsolete-variable-alias, defvaralias etc not moving them into a file compat-obsolete.el or something like this? -- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine. [-- Attachment #2: smime.p7s --] [-- Type: application/pkcs7-signature, Size: 5684 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [toggle-read-only] 2024-07-24 15:50 ` [toggle-read-only] Uwe Brauer @ 2024-07-24 16:41 ` Eli Zaretskii 0 siblings, 0 replies; 19+ messages in thread From: Eli Zaretskii @ 2024-07-24 16:41 UTC (permalink / raw) To: Uwe Brauer; +Cc: philipk, stefankangas, rms, emacs-devel > From: Uwe Brauer <oub@mat.ucm.es> > Cc: Uwe Brauer <oub@mat.ucm.es>, philipk@posteo.net, > stefankangas@gmail.com, rms@gnu.org, emacs-devel@gnu.org > Date: Wed, 24 Jul 2024 17:50:00 +0200 > > > Why "days"? how many Lisp files do you have that it could take "days" > > top byte-compile them? > Days to make everything work, not days to compile If they work without byte-compiling, they will also work the same when byte-compiled, I think. > but yes I do have > quite a bit of additional files more than 300 I would say, that includes > old pkg like bbdb-2.35, for which I have written various hacks, that do > not work in more modern bbdb version mostly because of renaming > variables and functions. The Emacs source tree has more than 2300 Lisp files, and they can all be compiled in under 5 minutes. That's a far cry from "days". In any case, feel free not to recompile your files when you upgrade Emacs, and instead wait with fixing till things break. But then please don't come back complaining that something that was obsolete for the past 15 years suddenly doesn't work, because we gave you 15 years to adapt, and you have chosen to ignore that. > But why, instead of deleting after a while the > defalias, define-obsolete-variable-alias, defvaralias etc > not moving them into a file compat-obsolete.el or something like this? Because it's an extra maintenance burden, and a serious one at that. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: replacement of find-file-not-found-hooks 2024-07-23 6:52 ` Uwe Brauer 2024-07-23 8:41 ` Philip Kaludercic @ 2024-07-23 21:45 ` Björn Bidar 1 sibling, 0 replies; 19+ messages in thread From: Björn Bidar @ 2024-07-23 21:45 UTC (permalink / raw) To: Uwe Brauer; +Cc: Stefan Kangas, rms, emacs-devel Uwe Brauer <oub@mat.ucm.es> writes: > I wished there was compatibility file, in which old for some reason > obsolete variables, functions etc would go so that the user you upgrade > more swiftly. There is a package that goes the other way around by providing compatibility features that allow packages to update newer feature of new Emacs version faster without breaking old packages and thous make them move on faster. https://github.com/emacs-compat/compat ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2024-07-24 16:41 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-07-20 14:52 replacement of find-file-not-found-hooks Uwe Brauer via Emacs development discussions. 2024-07-20 15:08 ` [Solved] (was: replacement of find-file-not-found-hooks) Uwe Brauer via Emacs development discussions. 2024-07-20 15:10 ` replacement of find-file-not-found-hooks Eli Zaretskii 2024-07-20 17:37 ` Andreas Schwab 2024-07-21 15:00 ` Uwe Brauer via Emacs development discussions. 2024-07-21 15:52 ` Eli Zaretskii 2024-07-23 3:42 ` Richard Stallman 2024-07-23 4:32 ` Stefan Kangas 2024-07-23 6:52 ` Uwe Brauer 2024-07-23 8:41 ` Philip Kaludercic 2024-07-23 11:36 ` Eli Zaretskii 2024-07-23 19:34 ` Uwe Brauer 2024-07-23 20:38 ` Stefan Kangas 2024-07-24 11:13 ` Eli Zaretskii 2024-07-24 12:33 ` [toggle-read-only] (was: replacement of find-file-not-found-hooks) Uwe Brauer 2024-07-24 12:47 ` Eli Zaretskii 2024-07-24 15:50 ` [toggle-read-only] Uwe Brauer 2024-07-24 16:41 ` [toggle-read-only] Eli Zaretskii 2024-07-23 21:45 ` replacement of find-file-not-found-hooks Björn Bidar
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).