unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Oliver Scholz <alkibiades@gmx.de>
Subject: Re: Controling modifications and cuting invisible ?
Date: Fri, 23 May 2003 14:07:05 +0200	[thread overview]
Message-ID: <ur86p7tp2.fsf@ID-87814.user.dfncis.de> (raw)
In-Reply-To: 87d6icj5kk.fsf@noos.fr

François Fleuret <francois.fleuret@noos.fr> 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é!

      parent reply	other threads:[~2003-05-23 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ur86p7tp2.fsf@ID-87814.user.dfncis.de \
    --to=alkibiades@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).