* bug#4533: i can reproduce this @ 2009-11-01 17:07 Jack Tanner 2009-11-02 8:11 ` Glenn Morris 0 siblings, 1 reply; 7+ messages in thread From: Jack Tanner @ 2009-11-01 17:07 UTC (permalink / raw) To: 4533 [-- Attachment #1: Type: text/plain, Size: 655 bytes --] Emacs 23.1.1 i386-mingw-nt5.1.2600 (from ftp.gnu.org) on WinXP SP3. - Start emacs -Q . - C-x C-f ~/foo.txt, creating a new file. - Enter text: Line 1 Line 2 - C-x C-s. - dos2unix ~/foo.txt - M-x revert-buffer Nothing changes in the mode line. Mousing over the \ in -1\--- shows "End-of-line style: DOS-style CRLF". - C-x k RET - C-x C-f ~/foo.txt Mode line shows --(Unix)---. _________________________________________________________________ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1 [-- Attachment #2: Type: text/html, Size: 876 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4533: i can reproduce this 2009-11-01 17:07 bug#4533: i can reproduce this Jack Tanner @ 2009-11-02 8:11 ` Glenn Morris 2009-11-02 8:20 ` Processed: " Emacs bug Tracking System 2009-11-02 8:57 ` bug#4533: reverting fails to update line ending mode line Glenn Morris 0 siblings, 2 replies; 7+ messages in thread From: Glenn Morris @ 2009-11-02 8:11 UTC (permalink / raw) To: Jack Tanner; +Cc: 4533 tags 4533 = stop Jack Tanner wrote: > - Start emacs -Q . > - C-x C-f ~/foo.txt, creating a new file. > - Enter text: > Line 1 > Line 2 > > - C-x C-s. > - dos2unix ~/foo.txt > - M-x revert-buffer Thanks for the recipe. Saving the file was the missing step. The issue seems to be that saving a file causes basic-save-buffer-1 to set buffer-file-coding-system-explicit. Eg for me on GNU/Linux, it is set to (iso-latin-1-unix). revert-buffer uses this to set coding-system-for-read before it inserts the file contents. So the change in line ending is ignored. If I manually set buffer-file-coding-system-explicit to nil before reverting the buffer, the change in line ending is noticed. I don't know what the right fix is though. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Processed: Re: bug#4533: i can reproduce this 2009-11-02 8:11 ` Glenn Morris @ 2009-11-02 8:20 ` Emacs bug Tracking System 2009-11-02 8:57 ` bug#4533: reverting fails to update line ending mode line Glenn Morris 1 sibling, 0 replies; 7+ messages in thread From: Emacs bug Tracking System @ 2009-11-02 8:20 UTC (permalink / raw) To: Glenn Morris; +Cc: Emacs Bugs Processing commands for control@emacsbugs.donarmstrong.com: > tags 4533 = Bug #4533 [emacs] 23.1: reverting fails to update line ending mode line Removed tag(s) unreproducible and moreinfo. > stop Stopping processing here. Please contact me if you need assistance. Don Armstrong (administrator, Emacs bugs database) ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4533: reverting fails to update line ending mode line 2009-11-02 8:11 ` Glenn Morris 2009-11-02 8:20 ` Processed: " Emacs bug Tracking System @ 2009-11-02 8:57 ` Glenn Morris 2009-11-05 3:28 ` Glenn Morris 1 sibling, 1 reply; 7+ messages in thread From: Glenn Morris @ 2009-11-02 8:57 UTC (permalink / raw) To: 4533 But http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1039#42 seems to say this is a feature? But, the problem is the case that you load "hello" by explicitly specifying dos coding system, or you once save the file by dos coding sytem before reverting. In this case, Emacs respects your specification, and thus revert-buffer loads the file as dos coding system, which results in seeing many CR charaters in the above case. We think this behaviour is not a bug but a feature. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4533: reverting fails to update line ending mode line 2009-11-02 8:57 ` bug#4533: reverting fails to update line ending mode line Glenn Morris @ 2009-11-05 3:28 ` Glenn Morris 2009-11-05 4:18 ` Kenichi Handa 0 siblings, 1 reply; 7+ messages in thread From: Glenn Morris @ 2009-11-05 3:28 UTC (permalink / raw) To: Kenichi Handa; +Cc: 4533 Hi, Could you comment on this http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4533#15 (it seems related to your final comment in bug#1039) The behaviour in this case seems odd to me, given that the coding system is never explicitly specified. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4533: reverting fails to update line ending mode line 2009-11-05 3:28 ` Glenn Morris @ 2009-11-05 4:18 ` Kenichi Handa 2009-11-05 18:47 ` Glenn Morris 0 siblings, 1 reply; 7+ messages in thread From: Kenichi Handa @ 2009-11-05 4:18 UTC (permalink / raw) To: Glenn Morris; +Cc: 4533 In article <wfiqdpd508.fsf@fencepost.gnu.org>, Glenn Morris <rgm@gnu.org> writes: > Could you comment on this > http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4533#15 I've just installed a fix, and replied to the above message. > (it seems related to your final comment in bug#1039) I don't think so. As I wrote in the mail, it's a simple bug in insert-file-contents. --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#4533: reverting fails to update line ending mode line 2009-11-05 4:18 ` Kenichi Handa @ 2009-11-05 18:47 ` Glenn Morris 0 siblings, 0 replies; 7+ messages in thread From: Glenn Morris @ 2009-11-05 18:47 UTC (permalink / raw) To: Kenichi Handa; +Cc: 4533 Kenichi Handa wrote: >> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4533#15 > > I've just installed a fix, and replied to the above message. Thanks, but it makes no difference for me on GNU/Linux. I use the same recipe as in the above message, but with "unix2dos" instead of "dos2unix". I just get "^M" appearing at the ends of lines on reverting. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-11-05 18:47 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-01 17:07 bug#4533: i can reproduce this Jack Tanner 2009-11-02 8:11 ` Glenn Morris 2009-11-02 8:20 ` Processed: " Emacs bug Tracking System 2009-11-02 8:57 ` bug#4533: reverting fails to update line ending mode line Glenn Morris 2009-11-05 3:28 ` Glenn Morris 2009-11-05 4:18 ` Kenichi Handa 2009-11-05 18:47 ` Glenn Morris
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).