all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* auto-mode-alist doesn't match VC files file.c.~version~
@ 2007-10-10 20:21 Chris Moore
  2007-10-10 20:25 ` Chris Moore
  2007-10-10 21:12 ` Andreas Schwab
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Moore @ 2007-10-10 20:21 UTC (permalink / raw)
  To: emacs-pretest-bug

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-10 21:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-10-10 21:12 ` Andreas Schwab

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.