From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Putting auto-image-file-mode in Options menu Date: Sun, 20 Mar 2005 19:22:45 +0100 Message-ID: References: <87acp8i6f1.fsf@jurta.org> <87wtsbbrlt.fsf-monnier+emacs@gnu.org> <87ll8qap2h.fsf@jurta.org> <87mzt3h43k.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111343363 15233 80.91.229.2 (20 Mar 2005 18:29:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Mar 2005 18:29:23 +0000 (UTC) Cc: juri@jurta.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 20 19:29:23 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DD5Ap-0002gb-Di for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2005 19:29:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DD5Rl-0002z4-MI for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2005 13:46:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DD5RX-0002yC-Js for emacs-devel@gnu.org; Sun, 20 Mar 2005 13:46:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DD5RU-0002x2-Vl for emacs-devel@gnu.org; Sun, 20 Mar 2005 13:46:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DD5RU-0002uV-NZ for emacs-devel@gnu.org; Sun, 20 Mar 2005 13:46:28 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DD54n-0005Yl-Ta for emacs-devel@gnu.org; Sun, 20 Mar 2005 13:23:01 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DD54h-00076n-9d; Sun, 20 Mar 2005 13:22:55 -0500 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun, 20 Mar 2005 13:01:32 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34836 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34836 Richard Stallman writes: > If you used an overlay instead of text properties, there would be no > necessity to modify the buffer. > > That is true. However, copying the image to another buffer would only > get you text. Which is what would be appropriate when copying an XPM icon into a C source file. And since the C source file would not be in auto-image-mode to start with, I could not remove the imagery by turning auto-image-mode off. Other buffers are unlikely to retain the image when being saved and reloaded, unless their file name would also imply auto-image-mode. But I think it reasonable that you have to reload in that case. > That's why I decided to make it a text property. Funny. That's exactly the reason why I would have made the decision the other way round (and in fact, the preview-latex project uses overlays instead of text properties for this reason). I think that without special yank properties that would, say, cause the image to be included as an image in a HTML buffer and other locations, it is pointless to have this as a text property since the image will not usually survive saving and reloading in a different buffer. And since the image actually is the outcome of a _mode_, it would appear that the "is-an-image" state, being coupled with the mode, belongs to the buffer instead of the text. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum