[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes
From: |
Ihor Radchenko |
Subject: |
bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes |
Date: |
Wed, 25 Jan 2023 13:37:03 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> > . given "foo.org.~10~" return the list ("foo" org-mode backup)
>> > . given "foo.org.gpg.gz" return ("foo" org-mode epa-file compress)
>>
>> I do not think that you can deterministically associate file extension
>> with major mode. Alternative major modes do exist for some file
>> extensions (like built-in python.el vs. python-mode.el). Just extension
>> list may suffice in the simplest scenarios.
>
> The intent was to use auto-mode-alist, of course. Or are you saying
> that you'd like, for example, to treat *.org files as Org files even
> if the user customized auto-mode-alist to use a different mode?
Fair point. But then the extension information will be lost.
"backup" may mean multiple different things, including "bak" or "~10~"
or "~". "compress" may also involve different algorithms.
>> In addition, given "foo.txt.org.gpg.gz" may return
>> ("foo.txt" "org" "gpg" "gz") not stripping the first .txt as it never
>> affects how Emacs opens the file.
>
> Talking about "opening the file" again narrows the scope of the
> requested feature, IMO. We don't want to assume that the application
> would like to open the file. Besides, Text mode does affect how Emacs
> treats the file.
Agree.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, (continued)
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ruijie Yu, 2023/01/18
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Eli Zaretskii, 2023/01/18
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ihor Radchenko, 2023/01/18
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Eli Zaretskii, 2023/01/18
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ihor Radchenko, 2023/01/23
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Eli Zaretskii, 2023/01/23
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ihor Radchenko, 2023/01/24
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Eli Zaretskii, 2023/01/24
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ihor Radchenko, 2023/01/25
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Eli Zaretskii, 2023/01/25
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes,
Ihor Radchenko <=
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ruijie Yu, 2023/01/25
- bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Ihor Radchenko, 2023/01/25
bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes, Eli Zaretskii, 2023/01/18