From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?q?Fran=E7ois_Fleuret?= Newsgroups: gmane.emacs.help Subject: Controling modifications and cuting invisible ? Date: 22 May 2003 00:30:35 +0200 Organization: Noos Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87d6icj5kk.fsf@noos.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1053559071 13307 80.91.224.249 (21 May 2003 23:17:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 21 May 2003 23:17:51 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 22 01:17:48 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 19IcqC-0003SD-00 for ; Thu, 22 May 2003 01:17:48 +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 19IcBp-0005kD-Sc for gnu-help-gnu-emacs@m.gmane.org; Wed, 21 May 2003 18:36:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!noos.fr!not-for-mail Original-Newsgroups: gnu.emacs.help X-Attribution: FF X-Url: http://www-rocq.inria.fr/~fleuret User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Lines: 40 Original-NNTP-Posting-Date: 21 May 2003 22:32:07 GMT Original-NNTP-Posting-Host: 81.67.18.90 Original-X-Trace: 1053556327 news.noos.fr 18841 81.67.18.90 Original-X-Complaints-To: abuse@noos.fr Original-Xref: shelby.stanford.edu gnu.emacs.help:113488 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:9985 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9985 Hi people, My mode to control mpg321 is definitely usable now (I just posted it in gnu.emacs.sources), but several problems remain. The first one is: how to control precisely how the buffer can be modified ? So far, the only way I found was to clear the keymap with make-sparse-keymap, and redefine any single key remaining that can change something (i.e. ^j ^d etc.). This seems pretty dumb to me. What would be the "stylish" way ? 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 ? 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 ... Any piece of answer for any of those question will be welcome :) Regards, -- François Fleuret