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: Sat, 10 Sep 2016 10:21:33 +0300 Message-ID: <83mvjg8bk2.fsf@gnu.org> References: <83a8flaud3.fsf@gnu.org> <831t0t83br.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473492143 3816 195.159.176.226 (10 Sep 2016 07:22:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 10 Sep 2016 07:22:23 +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 Sat Sep 10 09:22:19 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 1biccC-0000AG-A7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Sep 2016 09:22:16 +0200 Original-Received: from localhost ([::1]:33467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biccA-00021W-DR for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Sep 2016 03:22:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bicc1-00020W-5A for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2016 03:22:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bicbx-0007O0-Se for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2016 03:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bicbx-0007Nu-Ou for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2016 03:22:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bicbx-00014O-L0 for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2016 03:22: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: Sat, 10 Sep 2016 07:22: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.14734921084093 (code B ref 24372); Sat, 10 Sep 2016 07:22:01 +0000 Original-Received: (at 24372) by debbugs.gnu.org; 10 Sep 2016 07:21:48 +0000 Original-Received: from localhost ([127.0.0.1]:55098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bicbk-00013x-4x for submit@debbugs.gnu.org; Sat, 10 Sep 2016 03:21:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bicbi-00013k-Nn for 24372@debbugs.gnu.org; Sat, 10 Sep 2016 03:21:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bicba-00079d-Du for 24372@debbugs.gnu.org; Sat, 10 Sep 2016 03:21:41 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bicba-00078Q-AX; Sat, 10 Sep 2016 03:21:38 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1928 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bicbW-0001jC-FG; Sat, 10 Sep 2016 03:21:35 -0400 In-reply-to: (message from Philipp Stephani on Fri, 09 Sep 2016 17:18:12 +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:123138 Archived-At: > From: Philipp Stephani > Date: Fri, 09 Sep 2016 17:18:12 +0000 > Cc: 24372@debbugs.gnu.org > > A simpler recipe that doesn't need explicit focus events is > > emacs -Q -eval '(progn (setq blink-cursor-delay 0.0) (blink-cursor-suspend) (blink-cursor-check))' > > and then start moving point. > > OK, I guess one issue is that setting blink-cursor-delay doesn't restart blink-cursor-idle-timer. (Similarly, > changing blink-cursor-interval doesn't restart blink-cursor-timer.) While obviously we can't fix that when using > setq, I'd suggest adding custom setters to the variables nevertheless. > > The direct cause of the issue seems to be that, when blink-cursor-delay is idle, after every command > blink-cursor-start is called immediately, which hides the cursor. Thanks. Does the patch below fix the issue, without introducing any adverse side effects? diff --git a/lisp/frame.el b/lisp/frame.el index cfd40bf..e10f0ce 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -2068,7 +2068,10 @@ blink-cursor-start (run-with-timer blink-cursor-interval blink-cursor-interval 'blink-cursor-timer-function)) (add-hook 'pre-command-hook 'blink-cursor-end) - (internal-show-cursor nil nil))) + ;; Start by showing the cursor, so that even if they set + ;; blink-cursor-delay to zero, they still see the cursor during + ;; the execution of the Emacs commands. + (internal-show-cursor nil t))) (defun blink-cursor-timer-function () "Timer function of timer `blink-cursor-timer'."