From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.help Subject: Re: Controling modifications and cuting invisible ? Date: Fri, 23 May 2003 14:07:05 +0200 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <87d6icj5kk.fsf@noos.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1053692604 13446 80.91.224.249 (23 May 2003 12:23:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 23 May 2003 12:23:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Fri May 23 14:23:21 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19JBXa-0003Kj-00 for ; Fri, 23 May 2003 14:20:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19JBNX-0004Kj-4f for gnu-help-gnu-emacs@m.gmane.org; Fri, 23 May 2003 08:10:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!dialin-145-254-193-238.arcor-ip.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: dialin-145-254-193-238.arcor-ip.net (145.254.193.238) Original-X-Trace: fu-berlin.de 1053691636 969670 145.254.193.238 (16 [87814]) X-Attribution: os X-Face: "HgH2sgK|bfH$; PiOJI6|qUCf.ve<51_Od(%ynHr?=>znn#~#oS>",F%B8&\vus),2AsPYb -n>PgddtGEn}s7kH?7kH{P_~vu?]OvVN^qD(L)>G^gDCl(U9n{:d>'DkilN!_K"eNzjrtI4Ya6;Td% IZGMbJ{lawG+'J>QXPZD&TwWU@^~A}f^zAb[Ru;CT(UA]c& User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:QpFYK7eANqFwJSC7DJN89Z+SG9o= Original-Xref: shelby.stanford.edu gnu.emacs.help:113614 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10111 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10111 François Fleuret writes: [...] > Also, I use the invisible attribute to hide data field in each line > (basically the filename associated to a mp3), so that I can use those > field when I invoke mpg321, while keeping a neat display for the > user. This works pretty well, but for a reason I do not understand, > cut/paste operation do not preserve this attribute ... Any clue ? I'd rather consider this as a feature. When I copy&paste ... erm ... kill-ring-save&yank something from a buffer, I don't want to be surprised by invisible text. > And the last one: I use an overlay to highlight the current mp3. This > is neat, but I was not able to find how to make the overlay to cover > the complete line (i.e. all the width, even if the line stops before), > without creating weird effect when the user modifies the > buffer. Basically, to make the overlay as large as the window, I used > something like: > > (move-overlay mp3play-current-overlay (point-at-bol) (1+ (point-at-eol))) > > the 1+ puting the \n in the overlay. This works as long as I do not > move a line accross the overlay with the following code: > > (transpose-regions (line-beginning-position) (1+ (line-end-position)) > (line-beginning-position 2) (1+ (line-end-position 2))) > > Doing that make the overlay include the line I am moving ... IIRC a overlay is implemented with markers or something similar. (But I have not read the code, so I may be wrong.) So there is no way but to update your overlay after `transpose-region', for example with `move-overlay'. Oliver -- 4 Prairial an 211 de la Révolution Liberté, Egalité, Fraternité!