From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24372: 25.1.50; After losing focus, cursor is hidden when moving point Date: Sun, 11 Sep 2016 22:18:38 +0300 Message-ID: <83twdm9re9.fsf@gnu.org> References: <83a8flaud3.fsf@gnu.org> <831t0t83br.fsf@gnu.org> <83mvjg8bk2.fsf@gnu.org> <8360q2be2b.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473621621 28510 195.159.176.226 (11 Sep 2016 19:20:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2016 19:20:21 +0000 (UTC) Cc: 24372@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 11 21:20:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjAIZ-0006hn-Im for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Sep 2016 21:20:15 +0200 Original-Received: from localhost ([::1]:38795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjAIX-0007Or-Mu for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Sep 2016 15:20:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjAIS-0007NO-Pa for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 15:20:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjAIM-0007IO-8c for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 15:20:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjAIM-0007IA-5P for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 15:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bjAIL-0008Lp-Hk for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 15:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2016 19:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24372 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24372-submit@debbugs.gnu.org id=B24372.147362154532023 (code B ref 24372); Sun, 11 Sep 2016 19:20:01 +0000 Original-Received: (at 24372) by debbugs.gnu.org; 11 Sep 2016 19:19:05 +0000 Original-Received: from localhost ([127.0.0.1]:56772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjAHQ-0008KR-Nj for submit@debbugs.gnu.org; Sun, 11 Sep 2016 15:19:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjAHP-0008Jx-2D for 24372@debbugs.gnu.org; Sun, 11 Sep 2016 15:19:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjAHE-00074A-R3 for 24372@debbugs.gnu.org; Sun, 11 Sep 2016 15:18:57 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjAHE-00073v-Nz; Sun, 11 Sep 2016 15:18:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1358 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bjAHA-0001YY-RV; Sun, 11 Sep 2016 15:18:51 -0400 In-reply-to: (message from Philipp Stephani on Sun, 11 Sep 2016 17:37:36 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123191 Archived-At: > From: Philipp Stephani > Date: Sun, 11 Sep 2016 17:37:36 +0000 > Cc: 24372@debbugs.gnu.org > > Using the maximum of blink-cursor-delay and blink-cursor-interval > effectively removes the user's ability of controlling the delay before > the cursor starts blinking when Emacs becomes idle, doesn't it? > > Yes. I tried to figure out what the intention of blink-cursor-delay was, but couldn't find anything (the commit > where it was introduced doesn't provide any motivation). I don't think that blink-cursor-delay < > blink-cursor-interval ever makes sense. The other way round (delay > interval) is useful if you want to keep the > cursor visible for a bit longer after a command. I don't understand the nature of your difficulty. blink-cursor-delay is obviously how soon the user want the cursor to start blinking after Emacs becomes idle. That is orthogonal to the blink interval, which is in effect once the blinking begins. > Plus, if the user sets the interval to a very small value, we have the > same problem again. > > True, but so far that hasn't happened. Also it seems less surprising: if you increase the frequency, the cursor > blinks faster, as expected. The problem is not with a faster blinking, the problem is with the cursor almost invisible. E.g., try to set blink-cursor-delay to a very small, but non-zero value with today's sources, and then repeat your recipe, with and without the focus-out/in dance. > How about a variant of this below? It uses a fixed limitation from > below on the delay, but only for the first blink. (The value 0.2 was > found by experimentation, not sure if we need to add yet another > defcustom for that.) > > I don't think we should introduce magic numbers or further customization options. It solves the problem, doesn't it? I don't mind very much if it were a defcustom, I just think no one would want to change it. > > I've attached another patch with the change I have in mind. > > This has a disadvantage of creating a new timer object each time, > which I think we'd like to avoid: too much consing. (Also, don't you > need to set the timer variable to nil when the timer is disabled?) > > I don't understand - the patch doesn't create any additional timers, it only changes the initial delay of the > idle-timer. Each time blink-cursor--start-timer or blink-cursor--start-idle-timer is called, they create a new timer, right? And your patch makes us call these functions each time blinking is started or ended, right? > My patch is identical, except is uses blink-cursor-interval as lower bound. Of course. That's why I said it's a minor variant. There's another difference, though: in my patch we only limit the first argument to run-with-timer/run-with-idle-timer, not the second. So only the first blink cycle is affected.