From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#35624: log-view-diff regression Date: Wed, 22 May 2019 00:32:01 +0300 Organization: LINKOV.NET Message-ID: <87y32zv6i6.fsf@mail.linkov.net> References: <87pnou2ak2.fsf@mail.linkov.net> <051f40d7-206b-e5b5-f0b7-2354d0552dcf@yandex.ru> <874l64raeu.fsf@mail.linkov.net> <87imujju04.fsf@mail.linkov.net> <7a87f334-1d60-9d39-959c-97dbad690fc3@yandex.ru> <875zqgaekq.fsf@mail.linkov.net> <9e4ac5c6-af62-f907-dc30-a85a1ba6bd23@yandex.ru> <87y33a3x6k.fsf@mail.linkov.net> <87bm04vky9.fsf@mail.linkov.net> <5a4d3875-5cb5-bc84-c72e-d1840aa8d7c3@yandex.ru> <87lfz7o05l.fsf@mail.linkov.net> <8c724814-923f-351a-686c-9f9c11468187@yandex.ru> <878sv6jhdm.fsf@mail.linkov.net> <8736laqk5e.fsf@mail.linkov.net> <5d7923e8-d39c-61cb-f1a6-fd9076fafae6@yandex.ru> <87lfyzy3c1.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="167963"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 35624@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 21 23:35:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTCPg-000hUs-US for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 May 2019 23:35:13 +0200 Original-Received: from localhost ([127.0.0.1]:59797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTCPf-0003bu-WE for geb-bug-gnu-emacs@m.gmane.org; Tue, 21 May 2019 17:35:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTCPZ-0003b5-09 for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 17:35:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTCPX-0001oj-9N for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 17:35:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55835) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTCPW-0001nD-5x for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 17:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTCPV-0005bm-UF for bug-gnu-emacs@gnu.org; Tue, 21 May 2019 17:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 May 2019 21:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35624 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35624-submit@debbugs.gnu.org id=B35624.155847447021519 (code B ref 35624); Tue, 21 May 2019 21:35:01 +0000 Original-Received: (at 35624) by debbugs.gnu.org; 21 May 2019 21:34:30 +0000 Original-Received: from localhost ([127.0.0.1]:41146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTCP0-0005b1-4a for submit@debbugs.gnu.org; Tue, 21 May 2019 17:34:30 -0400 Original-Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:64636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTCOx-0005ar-UU for 35624@debbugs.gnu.org; Tue, 21 May 2019 17:34:28 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id F179521E59; Tue, 21 May 2019 21:34:25 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a9.g.dreamhost.com (100-96-38-7.trex.outbound.svc.cluster.local [100.96.38.7]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 595B121808; Tue, 21 May 2019 21:34:25 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a9.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Tue, 21 May 2019 21:34:25 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Unite-Bubble: 6e8a33e100ab5372_1558474465759_465485739 X-MC-Loop-Signature: 1558474465759:2757318879 X-MC-Ingress-Time: 1558474465758 Original-Received: from pdx1-sub0-mail-a9.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTP id EF92480459; Tue, 21 May 2019 14:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=NXDI+4qzd8zILPFIqfwAyzofWSQ=; b= BL18yQCiH7IDU/pWLGjC78ZFTXEvDpctmYT3LQomo4D3OwfUKUdWw6XJZl66rQKu 3XAM2mfQ5i3UAjGz5teH+SMqLuVm2FxDa5n6gHaRg4ZhbjLOJiJywXU2dqeGeMXb HgEyJ+36DTYAGT+NlU474zvfqusdMH6yQUGd/cLS1q4= Original-Received: from mail.jurta.org (m91-129-96-230.cust.tele2.ee [91.129.96.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a9.g.dreamhost.com (Postfix) with ESMTPSA id 9B3C68045B; Tue, 21 May 2019 14:34:20 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a9 In-Reply-To: (Dmitry Gutov's message of "Tue, 21 May 2019 23:39:28 +0300") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddruddutddgudeigecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddvfedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddvfedtpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepughguhhtohhvseihrghnuggvgidrrhhunecuvehluhhsthgvrhfuihiivgeptd 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: 209.51.188.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:159622 Archived-At: --=-=-= Content-Type: text/plain > Not to mention that most users would not simply think to create an active > region before pressing 'd'. This feature is documented. > It's better, but a) it shifts the buffer text by 1 pixel, which I actually > find annoying now that I look at the bottom entry that fits in that window, My bottom line is partially visible in all buffers anyway. > b) from your side, it should look suboptimal as well, because the cursor is > basically invisible when it's on the top line (speaking of WYSIWYG). Maybe just set window-start to the first non-empty line initially, thus moving the empty line out of screen? > If you really must have it this way, do we have an example of invisible > text expanding when cursor moves inside, and then contracting when it's out > again? Meaning if would look like an empty line you wanted after you press > 'C-p', but not visible at all otherwise. Yes, this is possible: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=vc-git-print-log-cursor-sensor.patch diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b6feb3b8d1..29acb047c6 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1018,7 +1018,11 @@ vc-git-print-log ;; read-only. (let ((inhibit-read-only t)) (with-current-buffer buffer - (insert "\n") + (insert (propertize "\n" + 'invisible t + 'cursor-sensor-functions + (list #'(lambda (_w _p dir) + (visible-mode (if (eq dir 'entered) 1 0)))))) (apply 'vc-git-command buffer 'async files (append @@ -1122,7 +1126,8 @@ vc-git-log-view-mode (1 'change-log-acknowledgment) (2 'change-log-acknowledgment)) ("^Date: \\(.+\\)" (1 'change-log-date)) - ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))) + ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))) + (cursor-sensor-mode 1)) (defun vc-git-show-log-entry (revision) --=-=-=--