From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#43543: 28.0.50; Supress truncate notice in eldoc Date: Sun, 04 Oct 2020 12:16:52 +0100 Message-ID: <87sgaugs0r.fsf@gmail.com> References: <5B68C681-36E8-419D-B395-E5C798696387@gmail.com> <871rivqpzp.fsf@gnus.org> <836F59AA-C67D-4A73-A0D8-C4E5C8F838C1@gmail.com> <22F4D0C4-3075-47BD-A073-F0D0E98E8F59@gmail.com> <87h7rpj3km.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13006"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43543@debbugs.gnu.org, Yuan Fu To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 04 13:18:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1kP21r-0003IR-Ed for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Oct 2020 13:18:11 +0200 Original-Received: from localhost ([::1]:38886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kP21q-0000Ly-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Oct 2020 07:18:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kP21j-0000Kv-0J for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2020 07:18:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kP21i-0004sm-NZ for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2020 07:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kP21i-0006lw-JW for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2020 07:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Oct 2020 11:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43543 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 43543-submit@debbugs.gnu.org id=B43543.160181022425933 (code B ref 43543); Sun, 04 Oct 2020 11:18:02 +0000 Original-Received: (at 43543) by debbugs.gnu.org; 4 Oct 2020 11:17:04 +0000 Original-Received: from localhost ([127.0.0.1]:45026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kP20l-0006kD-Ud for submit@debbugs.gnu.org; Sun, 04 Oct 2020 07:17:04 -0400 Original-Received: from mail-wm1-f48.google.com ([209.85.128.48]:55013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kP20k-0006je-3C for 43543@debbugs.gnu.org; Sun, 04 Oct 2020 07:17:02 -0400 Original-Received: by mail-wm1-f48.google.com with SMTP id p15so1269574wmi.4 for <43543@debbugs.gnu.org>; Sun, 04 Oct 2020 04:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=5Nwdwb3LOMnBSQgmIXYOGNFZ0yIBCL5n7nllDjuQtm0=; b=blGdDdvdWafSjUOMOxoxaBjrMRDxz1W3s0gRKp+6vytSUS3+wldS+DpHm6zsuCt22k ZH7VK721mPj4zKYONcIAlHzUSmYCFk+2cRljjBwUN7JMXtX8jKmedw5w3ORPwZeJQCWH Z2teh66Ik87n1Ow2Z8KT1cKmjkD/ucZahMpsdAzUdBR+qnKIdP+pgpallUXloXrR/unF nrcHwOvauvW2C5wp9lgCMLGngNSoFHDgZapnZZ9HX2r7/0Yc5XaEuyo21jDdFZdqYhi4 aX1QZzQPA8fQcMDtHTjTz0nE/NlVi15KOpgcm09N5Y9cRCcxDo9snIABRAQ7IJQRXHmR XOmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=5Nwdwb3LOMnBSQgmIXYOGNFZ0yIBCL5n7nllDjuQtm0=; b=Yx8FxLYSLrV7s8hb64garbGwg74GL7WDSB2MwHHd43M0aip71xHBCJw/tHJAnYgG7D jIdjP+Gs3PUWOp7JW8CqacZB1iet4Pj1DiM+LwWUn/Z1yYdvqIvMAAlGS3odqNGWpGlL EMXQyXWXOK5vnFvQf+iSEgQNn0BkKdjhlrMBdDxKTK6BkhMBOFI3U472axuzq8J7Yhze 5bB6AdD53QJ4ij4ITb0q+Zj5MoeLTwKzz/R2fihTyYW8fXw+jTsRBNLIU2f/F6he5F9O fLeLqgPbZkr3IMmkGMn5bcoPQAtlTX2O12yo/VLphJaqXe8nWU6OYXZ7RfRUX25eZRaR bbEQ== X-Gm-Message-State: AOAM532Pjgm4NnY0KjRFfbvr+WUjLid4rJhXlzyE3oks9699VTMT8H0q sqgv0JIv/cCsX8kAkNz4nhfho8itfyE= X-Google-Smtp-Source: ABdhPJzeDvSrObzOi/wJEJpgf7it1oP0ch7AzdedcruuGHeE+bE0fLdM9ArseHjunn1kF7rq08TTpA== X-Received: by 2002:a1c:2905:: with SMTP id p5mr11948561wmp.187.1601810215969; Sun, 04 Oct 2020 04:16:55 -0700 (PDT) Original-Received: from krug ([89.180.149.154]) by smtp.gmail.com with ESMTPSA id j10sm8436283wrn.2.2020.10.04.04.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2020 04:16:55 -0700 (PDT) In-Reply-To: <87h7rpj3km.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 22 Sep 2020 16:20:25 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189749 Archived-At: Lars Ingebrigtsen writes: > Yuan Fu writes: > >> Actually, when I set line number to 2, eldoc only shows one line with >> an ending =E2=80=9C=E2=80=A6=E2=80=9D, and if I set to 3 lines, eldoc sh= ows two lines with an >> ending =E2=80=9C=E2=80=A6=E2=80=9D. > > This should now be fixed on the trunk. Hi Lars and Yuan. I've been working a bit more on ElDoc recently in the scratch/eldoc-display-functions branch. There, a clean separation between different outlets of doc display is achieved. The echo area is just one of them, handled by eldoc-display-in-echo-area. So I think this new variable should be better named eldoc-echo-area-display-truncation-message, so we have some consistency in the names of variables that affect this display tactic: - eldoc-echo-area-display-truncation-message - eldoc-echo-area-use-multiline-p - eldoc-echo-area-prefer-doc-buffer Path after my sig. I don't think we need a backward compatibility alias, since the user option has been around for a relatively short time in master only. Jo=C3=A3o diff --git a/etc/NEWS b/etc/NEWS index d1db797eb3..b6f99067dd 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -591,7 +591,7 @@ definition. ** ElDoc =20 +++ -*** New user option 'eldoc-display-truncation-message'. +*** New user option 'eldoc-echo-area-display-truncation-message'. If non-nil (the default), eldoc will display a message saying something like "(Documentation truncated. Use `M-x eldoc-doc-buffer' to see rest)" when a message has been truncated. If nil, truncated diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 9573dac6d7..f7a624f9ae 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -67,7 +67,7 @@ eldoc-print-after-edit Changing the value requires toggling `eldoc-mode'." :type 'boolean) =20 -(defcustom eldoc-display-truncation-message t +(defcustom eldoc-echo-area-display-truncation-message t "If non-nil, provide verbose help when a message has been truncated. If nil, truncated messages will just have \"...\" appended." :type 'boolean @@ -535,7 +535,7 @@ eldoc-display-in-echo-area ((> available 1) ;; The message takes one extra line, so if we don't ;; display that, we have one extra line to use. - (unless eldoc-display-truncation-message + (unless eldoc-echo-area-display-truncation-message (setq available (1+ available))) ;; Else we format the *eldoc* buffer, then use some of ;; its contents top section. I'm pretty sure smarter @@ -561,7 +561,7 @@ eldoc-display-in-echo-area (buffer-substring (point-min) (point)) (and truncated - (if eldoc-display-truncation-message + (if eldoc-echo-area-display-truncation-message (format "\n(Documentation truncated. Use `%s' to see r= est)" (substitute-command-keys "\\[eldoc-doc-buffer]= "))