all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Zhiwei Chen <chenzhiwei03@kuaishou.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Condy Chen <condy0919@gmail.com>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Highlight current line when using gud
Date: Wed, 30 Jun 2021 12:53:08 +0000	[thread overview]
Message-ID: <6F39630A-1FF8-45DE-9E3B-D9E8BE906BD7@kuaishou.com> (raw)
In-Reply-To: <87sg0z8t5t.fsf@gnus.org>



> On Jun 30, 2021, at 7:54 PM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> 
> 
> Condy Chen <condy0919@gmail.com> writes:
> 
>> Before this patch, dark theme users cannot distinguish the line from the
>> background even though hl-line-mode is enabled. Personally I can't.
> 
> I'm not sure I understand the problem here -- hl-line-mode works fine
> for me when using a dark background.

The problem can be categorized into 3 cases. See below.

> 
>> Furthermore, users must set hl-line-sticky-flag to t to enable
>> highlight in all windows or move the point to the source file buffer,
>> otherwise only the arrow in fringe is helpful for which line program
>> run to. It's too restricted in such a situation.
>> 
>> So I propose to add a new overlay of current line to make gud more
>> friendly and deprecate the old one.
> 
> The patch seems to add a new overlay mechanism for gud that's switched
> on for all people?  And is "the old one" you want to deprecate
> hl-line-mode?

Case 1: Users don't use hl-line-mode.
There will be no line highlighted in the source buffer.

Case 2: Users use `hl-line-mode' but set `hl-line-sticky-flag' to nil.
In that case, current line will be highlighted if and only if the point is in the source buffer. But if people type “n”, “bt”, “c” ... in the gud buffer, the line in the source buffer will not be highlighted due to the nil `hl-line-sticky-flag’.

Case 3: Users use `hl-line-mode’ and set `hl-line-sticky-flag’ to t.
It works well except that users should make sure `hl-line-face’ is distinguishable. For me (using doom-one theme), it’s hard to see the highlighted line.

It tries to improve the experience of gud in case 1 and case 2, and gives an another opportunity to customize. 

--
Zhiwei Chen


  parent reply	other threads:[~2021-06-30 12:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 12:43 Highlight current line when using gud Zhiwei Chen
2021-06-29 20:00 ` Condy Chen
2021-06-30 11:54   ` Lars Ingebrigtsen
2021-06-30 12:27     ` Eli Zaretskii
2021-06-30 13:07       ` Zhiwei Chen
2021-06-30 12:53     ` Zhiwei Chen [this message]
2021-06-30 12:59       ` Zhiwei Chen
2021-06-30 13:18         ` Eli Zaretskii
2021-06-30 13:17       ` Eli Zaretskii
2021-06-30 14:26         ` Zhiwei Chen
2021-06-30 15:50           ` Eli Zaretskii
2021-07-01  3:17             ` Zhiwei Chen
2021-07-01 11:26           ` Lars Ingebrigtsen
2021-07-01 11:35             ` Zhiwei Chen
2021-07-01 17:27               ` Condy Chen
2021-07-01 18:25             ` Zhiwei Chen
2021-07-02 11:01               ` Lars Ingebrigtsen
2021-07-02 11:39                 ` Eli Zaretskii
2021-07-04  0:12                   ` Zhiwei Chen
2021-07-04  4:30                     ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F39630A-1FF8-45DE-9E3B-D9E8BE906BD7@kuaishou.com \
    --to=chenzhiwei03@kuaishou.com \
    --cc=condy0919@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.