From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.devel Subject: Re: Bug in highlight-lines-matching-regexp? Date: Mon, 20 Apr 2009 17:59:37 +0200 Message-ID: <7b501d5c0904200859r664fa48cg34b65cd0af65305a@mail.gmail.com> References: <7b501d5c0904200725r5f2590d6p4ca430c44abd007c@mail.gmail.com> <49EC9A78.6040709@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1240243201 8030 80.91.229.12 (20 Apr 2009 16:00:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2009 16:00:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 20 18:01:20 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lvvvr-0006Y4-Vr for ged-emacs-devel@m.gmane.org; Mon, 20 Apr 2009 18:01:20 +0200 Original-Received: from localhost ([127.0.0.1]:44944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvvuT-0004mK-8L for ged-emacs-devel@m.gmane.org; Mon, 20 Apr 2009 11:59:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvvuO-0004ld-Kf for emacs-devel@gnu.org; Mon, 20 Apr 2009 11:59:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvvuK-0004jg-5c for emacs-devel@gnu.org; Mon, 20 Apr 2009 11:59:48 -0400 Original-Received: from [199.232.76.173] (port=40600 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvvuK-0004jb-35 for emacs-devel@gnu.org; Mon, 20 Apr 2009 11:59:44 -0400 Original-Received: from mail-fx0-f166.google.com ([209.85.220.166]:38900) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LvvuJ-0007Du-EJ for emacs-devel@gnu.org; Mon, 20 Apr 2009 11:59:43 -0400 Original-Received: by fxm10 with SMTP id 10so2181567fxm.42 for ; Mon, 20 Apr 2009 08:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=G01SyRJdj9VmgVMWueaNvm2TMVo0NwDV4BITCEFLZtw=; b=FiyHdDct765ws/DsnDvE9kYj2hMipFRo3ErNcBRtkFiCjxDSjQ8Z4Q21j19tBlPhlB sDotwnr8/FjMnPRjhfNtYH9ysAMJaaiQIIZRiPGZrByf6jZT63aiZIh8mcFatWXQnlcW BNJNYhhggaKMEqQ/NEfLq2xv4kYlZYE0E2rAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YLnF1YEAdVsQ8QZ3PsVX3jugKyZgJwb3Ii/zkQNu7QnT+8y8O5hTL1TVNYTIWt/BAb VLpMqKHJi1OvSQmdqP/wXKjFQAOniciAEx3V5NOt8eB/JIDOXadykC+NZYl58U3A1mGq 98qtBJTaeU7zCD3xIaf13D8hMA54OGMcb59ws= Original-Received: by 10.86.60.15 with SMTP id i15mr4049898fga.5.1240243181649; Mon, 20 Apr 2009 08:59:41 -0700 (PDT) In-Reply-To: <49EC9A78.6040709@gmx.at> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110369 Archived-At: 2009/4/20 martin rudalics : >> 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. =A0You 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. =A0I'm not sure which behavior is preferable. > > For non-font-locked buffers all hi-lock overlays should probably be > removed (and possibly regenerated) too. FWIW, personally, I would expect the highlighting to preserved (or rather "repeated") even after revert-buffer. -- Deniz Dogan