From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19045: 25.0.50; [PATCH] vc-git-print-log use --follow Date: Mon, 05 Feb 2018 23:31:12 +0200 Organization: LINKOV.NET Message-ID: <87607bunrz.fsf@mail.linkov.net> References: <87d28rt4jl.fsf@telefonica.net> <874lmxloo1.fsf@mail.linkov.net> <87d11kquw2.fsf@mail.linkov.net> <9c8f9d73-af0d-fdc7-7935-1a8a904c5c15@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1517866498 9488 195.159.176.226 (5 Feb 2018 21:34:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2018 21:34:58 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 19045@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 05 22:34:53 2018 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 1eioP1-0000Mr-Ti for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Feb 2018 22:34:16 +0100 Original-Received: from localhost ([::1]:39520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eioR3-0002fT-7F for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Feb 2018 16:36:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eioQo-0002dF-9x for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 16:36:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eioQk-0005ID-QS for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 16:36:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51207) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eioQk-0005I3-Mf for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 16:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eioQk-0006RL-EE for bug-gnu-emacs@gnu.org; Mon, 05 Feb 2018 16:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Feb 2018 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19045 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19045-submit@debbugs.gnu.org id=B19045.151786655424735 (code B ref 19045); Mon, 05 Feb 2018 21:36:02 +0000 Original-Received: (at 19045) by debbugs.gnu.org; 5 Feb 2018 21:35:54 +0000 Original-Received: from localhost ([127.0.0.1]:59103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eioQc-0006Qs-EB for submit@debbugs.gnu.org; Mon, 05 Feb 2018 16:35:54 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:42280 helo=homiemail-a20.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eioQZ-0006Qj-OM for 19045@debbugs.gnu.org; Mon, 05 Feb 2018 16:35:51 -0500 Original-Received: from homiemail-a20.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a20.g.dreamhost.com (Postfix) with ESMTP id 466A87EC064; Mon, 5 Feb 2018 13:35:51 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-107-8.cust.tele2.ee [91.129.107.8]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a20.g.dreamhost.com (Postfix) with ESMTPSA id 6E86D7EC063; Mon, 5 Feb 2018 13:35:50 -0800 (PST) In-Reply-To: <9c8f9d73-af0d-fdc7-7935-1a8a904c5c15@yandex.ru> (Dmitry Gutov's message of "Mon, 5 Feb 2018 02:31:14 +0300") 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:142950 Archived-At: > Could we use message-truncate-lines and just one message call instead? Maybe. But currently what is truncated is not the whole command line, but each of the command switches. I don't know how important this is. > The 20 characters limit seems arbitrary, we just need to avoid resizing the > echo area. And if the "in background... done" part being truncated is > a worry, we can rephrase them to go at the beginning of the sentence. Indeed, truncating "in background... done" is not nice, and I have no idea how to rephrase it. Anyway, this is the current patch to try: diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index b0d2221..21f2b98 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -290,16 +290,12 @@ vc-do-command (let* ((files (mapcar (lambda (f) (file-relative-name (expand-file-name f))) (if (listp file-or-list) file-or-list (list file-or-list)))) + (message-truncate-lines t) (full-command - ;; What we're doing here is preparing a version of the command - ;; for display in a debug-progress message. If it's fewer than - ;; 20 characters display the entire command (without trailing - ;; newline). Otherwise display the first 20 followed by an ellipsis. (concat (if (string= (substring command -1) "\n") (substring command 0 -1) command) - " " - (vc-delistify (mapcar (lambda (s) (if (> (length s) 20) (concat (substring s 0 2) "...") s)) flags)) + " " (vc-delistify flags) " " (vc-delistify files)))) (save-current-buffer (unless (or (eq buffer t) @@ -332,7 +328,8 @@ vc-do-command (setq status proc) (when vc-command-messages (vc-run-delayed - (message "Running %s in background... done" full-command)))) + (let ((message-truncate-lines t)) + (message "Running %s in background... done" full-command))))) ;; Run synchronously (when vc-command-messages (message "Running %s in foreground..." full-command))