From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [patch] Run occur command restricted to a region Date: Mon, 23 Jan 2017 01:50:21 +0200 Organization: LINKOV.NET Message-ID: <87h94qu01u.fsf@mail.linkov.net> References: <87vau3jl6f.fsf@gmail.com> <87shp6uwvj.fsf@mail.linkov.net> <83h95lua2f.fsf@gnu.org> <878tqxm1wh.fsf@mail.linkov.net> <87r34ozq20.fsf@gmail.com> <87inq0xhiw.fsf@mail.linkov.net> <87d1g55h8d.fsf@mail.linkov.net> <87r33ywquz.fsf@mail.linkov.net> <87ziilc05e.fsf@gmail.com> <8760l9wcci.fsf@mail.linkov.net> <87fukb2xmk.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1485129147 13048 195.159.176.226 (22 Jan 2017 23:52:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Jan 2017 23:52:27 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu) Cc: Emacs developers To: Tino Calancha Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 23 00:52:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cVRvV-0001Mj-TD for ged-emacs-devel@m.gmane.org; Mon, 23 Jan 2017 00:52:02 +0100 Original-Received: from localhost ([::1]:38181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVRvb-000428-0s for ged-emacs-devel@m.gmane.org; Sun, 22 Jan 2017 18:52:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVRvU-000423-IL for emacs-devel@gnu.org; Sun, 22 Jan 2017 18:52:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVRvN-0004wA-6j for emacs-devel@gnu.org; Sun, 22 Jan 2017 18:52:00 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:58844 helo=homiemail-a22.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cVRvN-0004vv-0v for emacs-devel@gnu.org; Sun, 22 Jan 2017 18:51:53 -0500 Original-Received: from homiemail-a22.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTP id 138D0114066; Sun, 22 Jan 2017 15:51:50 -0800 (PST) Original-Received: from localhost.linkov.net (m212-107-62-58.cust.tele2.ee [212.107.62.58]) (Authenticated sender: jurta@jurta.org) by homiemail-a22.g.dreamhost.com (Postfix) with ESMTPA id 3F48B114065; Sun, 22 Jan 2017 15:51:49 -0800 (PST) In-Reply-To: <87fukb2xmk.fsf@gmail.com> (Tino Calancha's message of "Sun, 22 Jan 2017 19:32:35 +0900") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 69.163.253.7 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:211567 Archived-At: >>> **) The second patch add your suggestion on showing highlighted the >>> current line. When there are matches after the current line, the >>> point in *Occur* is set right after such line. >>> >>> I am fine with just adding *). In case we also want **), >>> an option to enable/disable that behaviour might be desirable. >> >> Keeping traditional behaviour means not jumping to the middle of the >> *Occur* output by default. Then maybe we could use the same option >> to highlight the current line and to jump to it? Like the existing >> =E2=80=98list-matching-lines-buffer-name-face=E2=80=99, adding a nil/f= ace choice for >> =E2=80=98list-matching-lines-current-line-face=E2=80=99, so when it's = nil then don't >> highlight/jump? > OK, why not? Thanks. > +(defface occur-current-line-face > + '((t (:inherit lazy-highlight))) > + "Face for highlighting the current line in *Occur* buffer." I'm not sure about the new face =E2=80=98occur-current-line-face=E2=80=99= . Looking at the list of faces from =E2=80=98M-x list-faces-display=E2=80=99= , there are no other occur faces. It would be confusing for the users to see a single occur-related face in this list, whereas all other occur-related faces are customized by =E2=80=98list-matching-lines-*=E2=80=99 variables= only. For consistency with other occur faces, maybe better to have a variable (defcustom list-matching-lines-current-line-face 'lazy-highlight and another boolean customizable variable list-matching-lines-jump-to-cur= rent-line to enable locating the current line.