Subject: Re: bug#60929: 30.0.50; [FR] `file-name-extension' and backup suffixes

From: Eli Zaretskii <[email-masked]>
Date: Tue, 24 Jan 2023 14:37:27 +0200

> From: Ihor Radchenko <[email-masked]>
> Cc: [email-masked]
> Date: Tue, 24 Jan 2023 11:12:56 +0000
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> Hmm... If we go further into generalization, what I am talking about is
> centralized API to "describe" current buffer file:
> 
>   1. What is already there:
> 
>      - `buffer-file-name'
>      - `buffer-file-truename'
>      - `buffer-file-number'
> 
>   2. What could be made available:
> 
>      - TRAMP mount point
>      - `buffer-effective-name'
>      - some info + callback to re-encrypt/re-archive/re-apply suffixes
>        for a given file buffer onto another file buffer.
> 
> > For example, if you want the file name so you could know the
> > appropriate major mode, perhaps a better interface would be to give
> > you a list of relevant major modes?
> 
> I am not sure what you refer to here.

I mean:

  . given "foo.org.~10~" return the list ("foo" org-mode backup)
  . given "foo.org.gpg.gz" return ("foo" org-mode epa-file compress)

etc.