emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] Run occur command restricted to a region


From: Juri Linkov
Subject: Re: [patch] Run occur command restricted to a region
Date: Mon, 23 Jan 2017 01:50:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu)

>>> **) 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
>> ‘list-matching-lines-buffer-name-face’, adding a nil/face choice for
>> ‘list-matching-lines-current-line-face’, 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 ‘occur-current-line-face’.
Looking at the list of faces from ‘M-x list-faces-display’, 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 ‘list-matching-lines-*’ 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-current-line
to enable locating the current line.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]