unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Deniz Dogan <deniz.a.m.dogan@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Bug in highlight-lines-matching-regexp?
Date: Mon, 20 Apr 2009 17:53:28 +0200	[thread overview]
Message-ID: <49EC9A78.6040709@gmx.at> (raw)
In-Reply-To: <7b501d5c0904200725r5f2590d6p4ca430c44abd007c@mail.gmail.com>

 > 1. Open a text file with any relevant contents.
 > 2. M-x highlight-lines-matching-regexp and highlight something in the file.
 > 3. M-x revert-buffer RET yes RET
 > 4. Now the highlighting is gone, which I can accept, however...
 > 5. M-x highlight-lines-matching-regexp RET RET
 > 6. Nothing is highlighted this second time!
 >
 > Is this a bug or expected behavior?

It's unexpected behavior.  You can, after reverting, turn _off_
`hi-lock-mode' and enter your pattern then, but that's clumsy.

Either `hi-lock-mode' should add a function to `before-revert-hook'
which resets `hi-lock-interactive-patterns' or add a function to
`after-revert-hook' which either resets `hi-lock-interactive-patterns'
or adds the interactive patterns to `font-lock-keywords' so that all
patterns are preserved.  I'm not sure which behavior is preferable.

For non-font-locked buffers all hi-lock overlays should probably be
removed (and possibly regenerated) too.

martin




  parent reply	other threads:[~2009-04-20 15:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 14:25 Bug in highlight-lines-matching-regexp? Deniz Dogan
2009-04-20 15:02 ` Tassilo Horn
2009-04-20 15:09   ` Deniz Dogan
2009-04-20 15:10     ` Deniz Dogan
2009-04-20 15:44       ` Tassilo Horn
2009-04-20 15:53 ` martin rudalics [this message]
2009-04-20 15:59   ` Deniz Dogan
2009-04-21  7:19     ` martin rudalics

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=49EC9A78.6040709@gmx.at \
    --to=rudalics@gmx.at \
    --cc=deniz.a.m.dogan@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).