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: Mon, 05 Oct 2020 00:10:57 +0100 Message-ID: <87lfglh9j2.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> <87sgaugs0r.fsf@gmail.com> <87r1qerstf.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="37067"; 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 , felician.nemeth@gmail.com, andreyk.mad@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 05 01:12:10 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 1kPDAo-0009ZJ-1c for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 01:12:10 +0200 Original-Received: from localhost ([::1]:60478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPDAn-0000FX-4P for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Oct 2020 19:12:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPDAg-0000FM-U7 for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2020 19:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPDAg-0007qR-LQ for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2020 19:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPDAg-0000mr-GL for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2020 19:12: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 23:12: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.16018530702964 (code B ref 43543); Sun, 04 Oct 2020 23:12:02 +0000 Original-Received: (at 43543) by debbugs.gnu.org; 4 Oct 2020 23:11:10 +0000 Original-Received: from localhost ([127.0.0.1]:46989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPD9q-0000lk-EF for submit@debbugs.gnu.org; Sun, 04 Oct 2020 19:11:10 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:51791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPD9m-0000lD-NU for 43543@debbugs.gnu.org; Sun, 04 Oct 2020 19:11:08 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id d81so1708171wmc.1 for <43543@debbugs.gnu.org>; Sun, 04 Oct 2020 16:11:06 -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=eIsxGRIerZfPlQtpWDgY7WtUVqtETJXZbUi2ubUpgCE=; b=WkOLK+xtrkNJ4rXMfcemakaimBX2iYK9F6w6wMH8KYEsYecOmKdP9BUHBmBIe6rOoN LENGEQ69nW7axgq8wBtzfxXakdbbORp9XiTk9uhSfoXsKDj9eEvuSEYZWNb7U7lz74dx XQ/f3i7H6a9KEJ6tO8OqcizRbJWejPEY9LFXefrSNpQ9Sylgn4/h2w7RJyAAcvsteqhL f79w/lnkAuqrCdYV5UoU+PAKhQC2yClyyDyAQ516IPeGRPv3J6zezF3RYdbugGu1difU odk4xbkNCnnwU5YXP8FOZEzaNZzPPMEjzI7xhwfPTMpWu/GB3eFPy8D8BUKY3GsEBYti /CVg== 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=eIsxGRIerZfPlQtpWDgY7WtUVqtETJXZbUi2ubUpgCE=; b=A0+MG1Xe2x8bmMJK1NktLj9TlLm2HC1l3CXDjzEVjOA8iP6m/HSKqsGqJV+zNnucRy qXuCGHoMWT+xgcTUIRGZ9vbaT3QASti4h/9UdVUmnfw8jFM595B825H/my1qYuz9GCez TlzJfVdC668zHVulSBkZh4DtdJ8tmdTFiFDukixZVuipvTBuCL6rcIoYAqfjFFh4Galf oaUghy5B3NfZ2jr7E3U6kaq1HtHCLt0mh6u776byQMiNxHJEfEPf/OhnSX8xU+XQiVbO 64IhNZI00btZFyHDONt7GGsaihUOhHpBaNnWiBtbrl+T/SYjVRQaQcbyeZfQTDFFS3nI bnkg== X-Gm-Message-State: AOAM530ZJFAwSHNjjHiRGQXD9c6gSjxBBg4Pat4pKxVZ7o+YJPL+SCfc UbUaevD6SPojlgtQtwjZP4o= X-Google-Smtp-Source: ABdhPJy7AJeVf+l/ur+OMrRoPUxj3F2Hvtrqqc2DLga6nvHy6a1gd2JD7dXBf6EqN/PmH5G61hviwg== X-Received: by 2002:a1c:7c1a:: with SMTP id x26mr587866wmc.4.1601853060894; Sun, 04 Oct 2020 16:11:00 -0700 (PDT) Original-Received: from krug ([89.180.153.119]) by smtp.gmail.com with ESMTPSA id m10sm10491763wmc.9.2020.10.04.16.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Oct 2020 16:11:00 -0700 (PDT) In-Reply-To: <87r1qerstf.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 04 Oct 2020 16:04:12 +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:189774 Archived-At: Lars Ingebrigtsen writes: > Jo=C3=A3o T=C3=A1vora writes: > >> 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. > > Yup; sounds good to me. While on this topic, I found a bug in this variable's implementation. To reproduce, just evaluate these three forms in some scratch Elisp buffer. (setq-local eldoc-documentation-strategy (lambda () (format "one\ntwo\nth= ree")) eldoc-echo-area-use-multiline-p 2 eldoc-echo-area-display-truncation-message nil) For the last one remember to use the old name if you haven't the latest patch yet. Anyway, as you'll see, the constant dummy docstring will always be displayed in a 3-line-high echo area even though the user specified 2 in eldoc-echo-area-use-multiline-p. I fixed this in the latest commit to the scratch/eldoc-display-functions branch. To do so, I much simplified the semantics of a numeric value given to eldoc-echo-area-use-multiline-p. When I first idealized them around three months ago, I thought it should count screen lines -- not logical lines. But now I changed my mind and switched to logical lines, for a number of reasons: - estimating screen lines is complicated (which probably led to the aforementioned bug); - using screen lines overlaps in meaning with the existing variable max-mini-window-height, which is honoured by the display engine; - I had at least one request by one user of Eglot (Andrii, in CC) to use the "logical lines" behaviour.=20 We can always enhance the code later on to bring-back the screen lines behaviour (maybe controlled by a separate variable), in case anyone was already very fond of it. Also keep in mind that setting the variable to `nil' already mandates a single screen line (a meaning which it has always had). Let me know what you think, Jo=C3=A3o