From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Changing of line format and undo
Date: Wed, 21 Jun 2006 18:47:27 +0200 [thread overview]
Message-ID: <4499781F.7090802@student.lu.se> (raw)
In-Reply-To: <858xnqxyg9.fsf@lola.goethe.zz>
David Kastrup wrote:
> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>
>
>> David Kastrup wrote:
>>
>>> Lennart Borgman <lennart.borgman.073@student.lu.se> writes:
>>>
>>>
>>>
>>>> Eli Zaretskii wrote:
>>>>
>>>>
>>>>>> Date: Wed, 21 Jun 2006 00:15:17 +0200
>>>>>> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
>>>>>>
>>>>>> If you change line endings this change is not saved to undo. Is
>>>>>> this the expected behaviour?
>>>>>>
>>>>>>
>>>>> If you mean "C-x RET f", then it doesn't really change anything. It
>>>>> just sets a buffer-local variable to some value. So there's nothing
>>>>> to undo.
>>>>>
>>>>>
>>>> That is an internal Emacs perpective. From a users point of view there
>>>> is truly a change. If you for example change the line endings the file
>>>> will be saved with this new line endings.
>>>>
>>>> BTW should not changes of this kind also set the buffer to modified?
>>>>
>>>>
>>> What makes you think they don't?
>>>
>>>
>>>
>> Test this for example:
>>
>> (defun test-set-eol()
>> (interactive)
>> (let* ((coding buffer-file-coding-system)
>> (new-coding (coding-system-change-eol-conversion coding 2)))
>> (setq buffer-file-coding-system new-coding)))
>>
>
> Very funny. setq most certainly does not trigger effects like a
> changed buffer modification flag. But setq is not a user-level
> command. Here is one that is:
>
Thanks, you are right ;-) Now I see what Eli meant. I still believe that
everything that can result in changing an external file should go into
the undo history but this is really a corner case of course.
next prev parent reply other threads:[~2006-06-21 16:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-20 22:15 Changing of line format and undo Lennart Borgman
2006-06-21 3:23 ` Eli Zaretskii
2006-06-21 15:12 ` Lennart Borgman
2006-06-21 15:14 ` David Kastrup
2006-06-21 15:50 ` Lennart Borgman
2006-06-21 16:31 ` David Kastrup
2006-06-21 16:47 ` Lennart Borgman [this message]
2006-06-21 17:31 ` Eli Zaretskii
2006-07-02 15:39 ` Stefan Monnier
2006-07-02 21:19 ` Kim F. Storm
2006-07-03 15:05 ` Richard Stallman
2006-07-03 21:30 ` Lennart Borgman
2006-07-04 12:55 ` Richard Stallman
2006-08-21 14:27 ` Kim F. Storm
2006-08-21 16:17 ` Stefan Monnier
2006-08-22 7:42 ` Richard Stallman
2006-08-22 9:26 ` Kim F. Storm
2006-08-22 9:39 ` Kim F. Storm
2006-08-23 4:06 ` Richard Stallman
2006-08-23 4:11 ` Lennart Borgman
2006-08-28 9:52 ` Richard Stallman
2006-06-21 21:54 ` Stuart D. Herring
2006-06-21 22:45 ` Lennart Borgman
2006-06-22 3:24 ` Eli Zaretskii
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=4499781F.7090802@student.lu.se \
--to=lennart.borgman.073@student.lu.se \
--cc=eliz@gnu.org \
--cc=emacs-devel@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.