From: Eli Zaretskii <eliz@gnu.org>
To: Zhiwei Chen <chenzhiwei03@kuaishou.com>
Cc: larsi@gnus.org, condy0919@gmail.com, emacs-devel@gnu.org
Subject: Re: Highlight current line when using gud
Date: Wed, 30 Jun 2021 18:50:48 +0300 [thread overview]
Message-ID: <83bl7nmjvr.fsf@gnu.org> (raw)
In-Reply-To: <62662FDA-8D67-459B-8F03-662010FB96EB@kuaishou.com> (message from Zhiwei Chen on Wed, 30 Jun 2021 14:26:33 +0000)
> From: Zhiwei Chen <chenzhiwei03@kuaishou.com>
> CC: Lars Ingebrigtsen <larsi@gnus.org>,
> "condy0919@gmail.com"
> <condy0919@gmail.com>,
> "emacs-devel@gnu.org" <emacs-devel@gnu.org>
> Date: Wed, 30 Jun 2021 14:26:33 +0000
>
> Personally, hl-line-mode is used to show the approximate position of my point so the face defined in
> doom-one is fine to me. It needn’t to be too contrast as it hurts my eyes in daily use.
> But when debugging, I need to know where the line as if I step over the interesting line I will blame myself.
> Debugging is more serious than coding/writing, so I would like to
> make the line highlighted/contrast.
>
> (defun make-hl-line-face-contrast ()
> (setq-local hl-line-face ‘a-more-contrast-one))
> (add-hook gdb-mode-hook #’make-hl-line-face-contrast)
>
> But when I select the source buffer and move the point, forward a page, I can’t tell which line I’m debugging.
> So I need to seek for the arrow in fringe but it’s too small to be discovered.
> I imagine that if there is a sticky overlay what will happen. I will never lose my debug point…
>
> > Why remove hl-line-mode? It has gobs of users.
>
> Specifically, the 8 lines in gud.el rather than the hl-line-mode itself.
>
> ;; If they turned on hl-line, move the hl-line highlight to
> ;; the arrow's line.
> (when (featurep 'hl-line)
> (cond
> (global-hl-line-mode
> (global-hl-line-highlight))
> ((and hl-line-mode hl-line-sticky-flag)
> (hl-line-highlight)))))
Thanks. It all looks to me as differences in personal preferences. I
have no doubt that some of us (myself included) have no problems
finding the current line in the source buffer, and others use
hl-line-mode with the above code and have no problems at all. So I
wonder what would be the best way of adding the feature you want
without disappointing those who like the existing behavior.
next prev parent reply other threads:[~2021-06-30 15:50 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83bl7nmjvr.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=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 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).