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#43609: 28.0.50; eldoc-documentation-function [vs new eldoc-display-functions] Date: Mon, 05 Oct 2020 10:29:50 +0100 Message-ID: <87362tggvl.fsf@gmail.com> References: <2e610c3f-6e5f-c7dd-af2e-aeb5e20d8664@gmx.at> <87r1qjjppu.fsf@gmail.com> <3fa6b315-7fc0-06ee-81e9-b68d164aec1b@gmx.at> <87a6x7jf9a.fsf@gmail.com> <874knbi0jc.fsf_-_@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8626"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: casouri@gmail.com, 43609@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 05 11:30:13 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 1kPMov-00029X-9r for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 11:30:13 +0200 Original-Received: from localhost ([::1]:42020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPMou-0002FP-9r for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 05:30:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPMok-0002FA-VH for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 05:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPMok-0007hp-Kg for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 05:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPMok-00023q-FY for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 05:30: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: Mon, 05 Oct 2020 09:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43609 X-GNU-PR-Package: emacs Original-Received: via spool by 43609-submit@debbugs.gnu.org id=B43609.16018902007893 (code B ref 43609); Mon, 05 Oct 2020 09:30:02 +0000 Original-Received: (at 43609) by debbugs.gnu.org; 5 Oct 2020 09:30:00 +0000 Original-Received: from localhost ([127.0.0.1]:47912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPMoh-00023F-NM for submit@debbugs.gnu.org; Mon, 05 Oct 2020 05:29:59 -0400 Original-Received: from mail-wr1-f50.google.com ([209.85.221.50]:34435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPMof-000233-UE for 43609@debbugs.gnu.org; Mon, 05 Oct 2020 05:29:58 -0400 Original-Received: by mail-wr1-f50.google.com with SMTP id t10so8721393wrv.1 for <43609@debbugs.gnu.org>; Mon, 05 Oct 2020 02:29:57 -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; bh=6U6G4/LmQVISBPutDsjWoAShZVWl0WrwBL8lNlsZooQ=; b=Np8jzyQTVvKUYz4b9JEAKUDBt7KD76p9yYWT9rqCY67aVd8dMZPRbB+v8KsPMdN11i dqX7/n292iEuM6kn+hdZohIQnh0ecsxMQ90LZGTsyEdp+Q9TIGukkvfebBJk+oxs2jLe eo33lOlH8GkTzugbABAz4PvWol6/rSO3U/Us5x3fL1kkvqM8Zklo0dW7xfA9zxFHKp7O 1XT1VOEuhtWeDD39QLH5CeobdT3+L5wRjKAnFuw4ZZQS3qrmOGJQcBaoTqXqfcsDNTS/ J9HlDimdlQtpBAc8Ahck+FIvxd5z2U9GcdJYDX8W7U4m6TaZd3kKdtkt+nCuxQ01fHyG IolA== 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; bh=6U6G4/LmQVISBPutDsjWoAShZVWl0WrwBL8lNlsZooQ=; b=ImdvWmTKEymor3f2fTIe2oE/SJ4i8ND7gK7AcLDxiUGlthr3fd+JzZhh0IbI5dQjfF Q03s1s7thdn491l+ATJrlaPA9rxkmmlPET/5nuPhi/tJg/vIOKZhM8BTalsthRNWeJwR Fcg8SsxBGrpAn/tlppnFlfTvPaQik8rc3+yCC4fNJaQFX5n55kZucKxrDJ2VlsLBTUm0 Rt+eY7ImslfU/En5a8nw5uqXxRMivOIXXzAX06dO0rLNSrJ9dohFIE6yP6+bY1XtuoR2 g/3+xGpxLesvEPM2vPwfR8RbZuZjZX68a0L56CYhL8qaM1wxfaMPnReydNCJ0gDExwX3 WVIQ== X-Gm-Message-State: AOAM531jgCq8sBTrvD7+qHhAC6UHJBtttAZJYkkMqvQRkBNplrLFSE0M LoS+OU3zUeCflDpzbbEpd5g= X-Google-Smtp-Source: ABdhPJzY2JItlYTJUbD60jLe9FKyQQFvBHfxu4FPTzv+EIuI6mWr5eMN4IRA/ONb09F7qyf12Q0Jig== X-Received: by 2002:a05:6000:12c3:: with SMTP id l3mr11272898wrx.164.1601890192055; Mon, 05 Oct 2020 02:29:52 -0700 (PDT) Original-Received: from krug ([89.180.147.115]) by smtp.gmail.com with ESMTPSA id q9sm9350331wrd.57.2020.10.05.02.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 02:29:51 -0700 (PDT) In-Reply-To: (martin rudalics's message of "Mon, 5 Oct 2020 10:35:52 +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:189812 Archived-At: martin rudalics writes: >> I just pushed a cleaned-up improved version of the >> eldoc-display-functions branch. >> >> To git.sv.gnu.org:/srv/git/emacs.git >> * [new branch] scratch/eldoc-display-functions -> >> scratch/eldoc-display-functions > > Thank you. I had some autoload problems ('ede-add-project-autoload' > had a void function definition) so I had to bootstrap Emacs here which > took some time. I had the same problem: it appeared in Emacs master recently. >> After a cursory reading of it, I managed to adapt your eldoc-tooltip.el >> library to use it. I didn't make many changes and didn't test it >> thoroughly, but I believe the adaptation works nicely. I attach it as >> file eldoc-tooltip-joao.el. It needs the eldoc-display-functions >> branch, obviously, which I will test for a few more than, then push to >> master (it's a straightforward planned change and seems pretty stable). > > I tried that now and it doesn't work here for two reasons: > > (1) It behaves like a solution that I worked out before you answered > my original report. Both omit the function name when point is on that > name: For example, with point on 'setq' in (setq foo 3) I just get > > ([SYM VAL]...) > > and no reference to the function itself as in the expected Right, as I said, this is to show you how eldoc-display-function works, not to fix your library definitely. Anyway, in the eldoc-tooltip-joao.el file I gave you, I passed the function #'car to mapconcat, right? This was just a quick and lazy solution: to get that augmented information you have to pass it a function that uses more properties of the list that represent a piece of documentation. But I think the previous 'martin' function I gave you should have exactly that string producing function inside it, right? > (2) My pop-up-mini window child frame pops up whenever a tooltip is > immanent and shows the _expected_ full eldoc text in the echo area. > > Now one aim of eldoc-tooltip is to show eldoc information in a separate > window near point and the other is to never show eldoc information in > the echo area so to avoid polluting the latter's contents and popping up > my minibuffer frame all the time. Makes perfect sense I guess. You should be able to (remove-hook 'eldoc-display-functions 'eldoc-display-in-echo-area) If you're not a fan of the echo area display. > But maybe also my set-up is wrong now - apparently I have to (1) enable > 'global-eldoc-mode' in order to produce eldoc text and (2) > 'eldoc-tooltip-mode' in order to show the text in a tooltip. Is that > right? Yes, it is. But do you really need a minor mode? I think activating your extension could be a matter of: (remove-hook 'eldoc-display-functions 'eldoc-display-in-martins-tooltip) instead of a global minor mode. Then you would let ElDoc mode _drive_ your extension.