From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Highlight current line when using gud Date: Wed, 30 Jun 2021 16:17:51 +0300 Message-ID: <83o8bnmqyo.fsf@gnu.org> References: <46933061-DFBC-406C-8489-F3DC7EE770BA@kuaishou.com> <87sg0z8t5t.fsf@gnus.org> <6F39630A-1FF8-45DE-9E3B-D9E8BE906BD7@kuaishou.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11902"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, condy0919@gmail.com, emacs-devel@gnu.org To: Zhiwei Chen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 30 15:19:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lya7m-0002tK-22 for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Jun 2021 15:19:30 +0200 Original-Received: from localhost ([::1]:44300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lya7k-0008FT-2c for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Jun 2021 09:19:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lya6C-00079J-Kv for emacs-devel@gnu.org; Wed, 30 Jun 2021 09:17:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37836) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lya69-0001TA-5p; Wed, 30 Jun 2021 09:17:50 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2855 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lya68-000373-Qd; Wed, 30 Jun 2021 09:17:49 -0400 In-Reply-To: <6F39630A-1FF8-45DE-9E3B-D9E8BE906BD7@kuaishou.com> (message from Zhiwei Chen on Wed, 30 Jun 2021 12:53:08 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271086 Archived-At: > From: Zhiwei Chen > Date: Wed, 30 Jun 2021 12:53:08 +0000 > Cc: Condy Chen , emacs-devel > > 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. But these are all user preferences, aren't they? You have your preferences, others have theirs. No one said everyone needs to have the current line highlighted in non-selected windows, even when debugging. It's up to the users whether they want it or not. The question most important to me is: can you, with your preferences, use hl-line-mode to produce the same effect as the patch you propose would? If yes, why do we need yet another user option? And if you cannot, can you explain why not? Thanks.