all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Chris Moore" <christopher.ian.moore@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: Re: auto-mode-alist doesn't match VC files file.c.~version~
Date: Wed, 10 Oct 2007 22:25:18 +0200	[thread overview]
Message-ID: <a9691ee20710101325r634dafcdx36d5fa841a3495e8@mail.gmail.com> (raw)
In-Reply-To: <a9691ee20710101321t39738cfcjeb345a88e4ca0262@mail.gmail.com>

On 10/10/07, Chris Moore <christopher.ian.moore@gmail.com> wrote:
> Using C-u C-x v ~ in VC I can request an old version of a file.
>
> The old version will be written to disk as file.~version~ where
> version is the version I've requested.
>
> If I then visit the file in Emacs, the mode isn't set correctly,
> unless 'version' is entirely numeric, and even then it only works by
> accident, since Emacs' file-name-sans-versions strips off .~[0-9]+~
> endings before auto-mode-alist gets to work on the filename.
>
> When I visit file.c.~version~, file-name-sans-versions strips off just
> the last '~', making my local .emacs customisation to deal with this
> situation fail:
>   (push '("\\.~[^~/]+~\\'" nil t) auto-mode-alist)
>
> I think it would be better if file-name-sans-versions wasn't called in
[I clicked 'send'?]

... set-auto-mode, allowing us to handle VC filenames as well as
backup filenames in auto-mode-alist.  This would also allow us to set
the mode of files with names like file.c.~1~.~1~ (made when I edit a
backup file) correctly, which currently doesn't happen.

Chris.

  reply	other threads:[~2007-10-10 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-10 20:21 auto-mode-alist doesn't match VC files file.c.~version~ Chris Moore
2007-10-10 20:25 ` Chris Moore [this message]
2007-10-10 21:12 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9691ee20710101325r634dafcdx36d5fa841a3495e8@mail.gmail.com \
    --to=christopher.ian.moore@gmail.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.