bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#8780: 24.0.50; Coding system and eol style auto-detection after open


From: Eli Zaretskii
Subject: bug#8780: 24.0.50; Coding system and eol style auto-detection after opening remote files
Date: Thu, 09 Jun 2011 12:48:56 +0300

> Date: Wed, 8 Jun 2011 23:38:52 +0200
> From: Dani Moncayo <address@hidden>
> Cc: address@hidden
> 
>  1. C-x C-f /address@hidden:/sites/ctan.org/README.uploads

The "ftp@" part was the crucial detail that was missing from the
original report.  The bug was in ange-ftp.  It was a very old bug, but
it was exposed by fixing bug #7383 on the trunk: since now every file
is transferred in binary mode, that bug now affects many more files
than it did before.

I fixed it on the emacs-23 branch (revision 100596 there).  The
required one-line change is reproduced below, if you cannot wait for
it to be merged to the trunk.

I'm closing this bug report.

> Well, my knowledge of Tramp is quite limited.  I guess I'm using "ftp"
> method, because it is the value of the variable
> `tramp-default-method'.

"ftp" is the default only if you don't have PuTTY installed and on
PATH.

Here's the change to fix the bug:

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog      2011-06-05 00:32:23 +0000
+++ lisp/ChangeLog      2011-06-09 09:40:51 +0000
@@ -1,3 +1,10 @@
+2011-06-09  Eli Zaretskii  <address@hidden>
+
+       * net/ange-ftp.el (ange-ftp-insert-file-contents): Let-bind
+       buffer-file-type before setting its value, to avoid disastrous
+       global effects on decoding files for DOS/Windows systems.
+       (Bug#8780)
+
 2011-06-05  Juanma Barranquero  <address@hidden>
 
        * progmodes/python.el (python-after-info-look): Add autoload cookie.

=== modified file 'lisp/net/ange-ftp.el'
--- lisp/net/ange-ftp.el        2011-01-02 23:50:46 +0000
+++ lisp/net/ange-ftp.el        2011-06-09 09:40:51 +0000
@@ -3290,6 +3290,7 @@ system TYPE.")
                     (binary (or (ange-ftp-binary-file filename)
                                 (memq (ange-ftp-host-type host user)
                                       '(unix dumb-unix))))
+                    (buffer-file-type buffer-file-type)
                     (abbr (ange-ftp-abbreviate-filename filename))
                     (coding-system-used last-coding-system-used)
                     size)






reply via email to

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