unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30281: list-matching-lines-jump-to-current-line inserts duplicate line
@ 2018-01-28 22:31 Juri Linkov
  2018-01-29 21:44 ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2018-01-28 22:31 UTC (permalink / raw)
  To: 30281

0. emacs -Q
1. Eval: (setq list-matching-lines-jump-to-current-line t)
2. M-<
3. M-s o text RET

Two identical lines are displayed in *Occur*.

As a possible solution, when the current line contains matches
I propose to use add-text-properties to add the face from
list-matching-lines-current-line-face over the matched current line.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#30281: list-matching-lines-jump-to-current-line inserts duplicate line
  2018-01-28 22:31 bug#30281: list-matching-lines-jump-to-current-line inserts duplicate line Juri Linkov
@ 2018-01-29 21:44 ` Juri Linkov
  2018-02-05 21:54   ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2018-01-29 21:44 UTC (permalink / raw)
  To: 30281

> 0. emacs -Q
> 1. Eval: (setq list-matching-lines-jump-to-current-line t)
> 2. M-<
> 3. M-s o text RET
>
> Two identical lines are displayed in *Occur*.
>
> As a possible solution, when the current line contains matches
> I propose to use add-text-properties to add the face from
> list-matching-lines-current-line-face over the matched current line.

Sorry, I meant add-face-text-property to add background from
list-matching-lines-current-line-face, while still keeping
highlighting of match faces over matches on the current line
in *Occur*.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#30281: list-matching-lines-jump-to-current-line inserts duplicate line
  2018-01-29 21:44 ` Juri Linkov
@ 2018-02-05 21:54   ` Juri Linkov
  0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2018-02-05 21:54 UTC (permalink / raw)
  To: 30281-done

>> 0. emacs -Q
>> 1. Eval: (setq list-matching-lines-jump-to-current-line t)
>> 2. M-<
>> 3. M-s o text RET
>>
>> Two identical lines are displayed in *Occur*.
>>
>> As a possible solution, when the current line contains matches
>> I propose to use add-text-properties to add the face from
>> list-matching-lines-current-line-face over the matched current line.
>
> Sorry, I meant add-face-text-property to add background from
> list-matching-lines-current-line-face, while still keeping
> highlighting of match faces over matches on the current line
> in *Occur*.

What is worse it's completely broken for context lines.

For example, with the buffer

a
b
c
z
a
b
c
z
a
b
c

go to the line with the second occurrence of "z" and type
C-u 1 M-s o z RET

The result:

2 matches for "z" in buffer: *scratch*
       :c
      4:z
      8:z
       :a
-------
       :c
      8:z
       :a

Now this is fixed in master.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-05 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-28 22:31 bug#30281: list-matching-lines-jump-to-current-line inserts duplicate line Juri Linkov
2018-01-29 21:44 ` Juri Linkov
2018-02-05 21:54   ` Juri Linkov

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