From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: Changing of line format and undo Date: Wed, 21 Jun 2006 14:54:07 -0700 (PDT) Message-ID: <33003.128.165.123.239.1150926847.squirrel@webmail.lanl.gov> References: <44987375.2010000@student.lu.se> <449961F6.6020001@student.lu.se> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1150926887 31422 80.91.229.2 (21 Jun 2006 21:54:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Jun 2006 21:54:47 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 21 23:54:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FtAed-00061H-1V for ged-emacs-devel@m.gmane.org; Wed, 21 Jun 2006 23:54:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FtAec-0003ny-HV for ged-emacs-devel@m.gmane.org; Wed, 21 Jun 2006 17:54:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FtAeO-0003my-WD for emacs-devel@gnu.org; Wed, 21 Jun 2006 17:54:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FtAeM-0003kv-Nh for emacs-devel@gnu.org; Wed, 21 Jun 2006 17:54:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FtAeM-0003km-Jt for emacs-devel@gnu.org; Wed, 21 Jun 2006 17:54:14 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FtApC-0007GL-2U for emacs-devel@gnu.org; Wed, 21 Jun 2006 18:05:26 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailwasher-b.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k5LLs8w7021354 for ; Wed, 21 Jun 2006 15:54:08 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (8.13.6/8.13.6/(ccn-5)) with ESMTP id k5LLs7Ea027323; Wed, 21 Jun 2006 15:54:07 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k5LLs7eU009791; Wed, 21 Jun 2006 15:54:07 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k5LLs7Lb009789; Wed, 21 Jun 2006 14:54:07 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.239 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Wed, 21 Jun 2006 14:54:07 -0700 (PDT) In-Reply-To: <449961F6.6020001@student.lu.se> Original-To: "Lennart Borgman" User-Agent: SquirrelMail/1.4.3a-11.EL3 X-Mailer: SquirrelMail/1.4.3a-11.EL3 X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:56069 Archived-At: Lennart Borgman wrote: > Eli Zaretskii wrote: >> 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. Doing (add-hook 'local-write-file-functions 'erase-buffer) also would change how files were written out. Changing how Emacs works (via variables like the coding systems, hooks, or outright rewriting functions) is not within the scope of the undo mechanism, which is for modifications to text, not Emacs. > BTW should not changes of this kind also set the buffer to modified? If and only if they should be undoable (which they shouldn't, IMHO). It would be very odd to have a buffer unmodified before and after an undo, or to be marked modified with no way (via undo) to remove that marking. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.