emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for Emacs 25.2


From: Michael Albinus
Subject: Re: Patch for Emacs 25.2
Date: Mon, 16 Jan 2017 22:49:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

Hi Eli,

> Do I understand correctly that fixing the bug introduced by e3a0f3d
> requires only the change in tramp.el?

That's correct.

> Regarding the other bug and its fix in files.el, can you tell more
> about the bug?  A change in files.el affects a very broad class of use
> cases, so I'd like to know more before I make up my mind about it.

In `make-auto-save-file-name', there is twice a test for ang-ftp file names:

--8<---------------cut here---------------start------------->8---
(not (string-match "^/address@hidden:" result)))
--8<---------------cut here---------------end--------------->8---

The regexp matches ange-ftp file names like "/address@hidden:". It does not
match general Tramp syntax, like "/method:address@hidden:" or "/host:". As
result, on MS Windows there is an error like

--8<---------------cut here---------------start------------->8---
(let ((buffer-file-name "/method:address@hidden:/path/to/file")
      tramp-auto-save-directory auto-save-file-name-transforms)
  (make-auto-save-file-name))

=> "address@hidden"
--8<---------------cut here---------------end--------------->8---

The patch replaces this regexp by 

--8<---------------cut here---------------start------------->8---
(not (file-remote-p result)))
--8<---------------cut here---------------end--------------->8---

Then it works as expected:

--8<---------------cut here---------------start------------->8---
(let ((buffer-file-name "/method:address@hidden:/path/to/file")
      tramp-auto-save-directory auto-save-file-name-transforms)
  (make-auto-save-file-name))

=> "/method:address@hidden:/path/to/#file#"
--8<---------------cut here---------------end--------------->8---

The patch is harmless enough that I propose it for Emacs 25.2.

> Thanks.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]