unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Controling modifications and cuting invisible ?
@ 2003-05-21 22:30 François Fleuret
  2003-05-21 23:08 ` Stefan Monnier
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: François Fleuret @ 2003-05-21 22:30 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-23 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-21 22:30 Controling modifications and cuting invisible ? François Fleuret
2003-05-21 23:08 ` Stefan Monnier
2003-05-21 23:12 ` Lute Kamstra
2003-05-22 16:33 ` Kai Großjohann
2003-05-23 11:23   ` François Fleuret
2003-05-23 11:40     ` Oliver Scholz
2003-05-23 14:58     ` Stefan Monnier
2003-05-23 12:07 ` Oliver Scholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).