From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Need help with eldoc: Date: Thu, 24 Mar 2022 16:39:00 -0700 Message-ID: <25149.276.56904.499053@retriever.mtv.corp.google.com> References: 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="39226"; mail-complaints-to="usenet@ciao.gmane.io" Cc: raman@google.com, emacs-devel@gnu.org To: joaotavora@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 25 00:42:54 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nXX6T-000A0J-Ma for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Mar 2022 00:42:53 +0100 Original-Received: from localhost ([::1]:48278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXX6R-0002FB-Jz for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Mar 2022 19:42:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXX2o-0001CX-MW for emacs-devel@gnu.org; Thu, 24 Mar 2022 19:39:08 -0400 Original-Received: from [2607:f8b0:4864:20::530] (port=41655 helo=mail-pg1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXX2m-00021V-O5 for emacs-devel@gnu.org; Thu, 24 Mar 2022 19:39:06 -0400 Original-Received: by mail-pg1-x530.google.com with SMTP id t13so3830488pgn.8 for ; Thu, 24 Mar 2022 16:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:mime-version:content-transfer-encoding:message-id:date:to:cc :subject:in-reply-to:references; bh=EwFFd3HWTqUxZBIDsdq7F7FahTZdZ1b68J9LWKSvVpE=; b=eIQsTsJvE59Tfdg0CmPfVAQUzQE443v77/kQLTsnX3hiUHHSsHfOJH9Wp4qCPvtKkc wA0XGabni8rErdZjuO9FKsm9paY57gbkpftIml2llxB9vzFChCSreDokU5MnPSVgdd5d UgmYOdpy+WN8hZIg58pOUVW/Z3L3FQbw3yr8JwuP0mTbp1Q+ZKuvJ1zSljkwutpevN58 lj/gz3kC01CAGU+zlzGvI9L/YO9YzvFu2nzuTs4NEq0bmtqT5qa1PCeqohrAPACArpvn pGxwWYqTL7TfVGtWo9L0Yd4J3bMESw4WuSRTqbo0qdfBys2LH2yWyh1s894M0zA4r1yh u35Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:mime-version:content-transfer-encoding :message-id:date:to:cc:subject:in-reply-to:references; bh=EwFFd3HWTqUxZBIDsdq7F7FahTZdZ1b68J9LWKSvVpE=; b=3WMGaPOHZmzsFAMG3sK0M8piKnyVJnQITCpXIjFP7UxzLtQMSdakjGMvJLLK3j5Y7H 771n2pVDdX3r2yA1H3Ua4HhZNCDFezIiUOInIUtRyP8UKdCz/rhjhApNtAi0tbHFsIrD ZDv2a0UTDU2ICuDw1QAZIBhCVHQRmTVN1l0jQt2L2jAJioJsCW50c1Q0OJTMje+Fpn7L ZhjRFN0102joTkEYBq+wzjXGPKsEjM4U0wLSmXfHq3m407uuLoQPiSuIJF9S5lyPs3Qh raJQPjEpV27BG7fZMI7W08EIFtYlvUjFK+bW0bPnPpZQUFxdIlUwKgq3OSiepLVa7NPU hp+A== X-Gm-Message-State: AOAM530AojhP0IhmrZJvtAL+jo/zw8Vewso7O1aF00rioa+6/iGyBuy7 7KelqK/bxMKXygQrfMxYxLxrpKH1426bfw== X-Google-Smtp-Source: ABdhPJysHqn2wVGGZU3gyDc+2nD6n/rYA5qJuB6QC7YTM2YmLr55QiBz+2QBeb3woGvmTs5+0N9CPQ== X-Received: by 2002:a05:6a00:a1d:b0:4f6:d122:cd08 with SMTP id p29-20020a056a000a1d00b004f6d122cd08mr7676506pfh.68.1648165141590; Thu, 24 Mar 2022 16:39:01 -0700 (PDT) Original-Received: from retriever.mtv.corp.google.com ([2620:0:1000:1510:feb0:2be9:334c:b4e9]) by smtp.gmail.com with ESMTPSA id f16-20020a056a00239000b004fa7103e13csm4854379pfc.41.2022.03.24.16.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 16:39:00 -0700 (PDT) In-Reply-To: X-Mailer: VM 8.1.1 under 29.0.50 (x86_64-pc-linux-gnu) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::530 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=raman@google.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -161 X-Spam_score: -16.2 X-Spam_bar: ---------------- X-Spam_report: (-16.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287425 Archived-At: thanks for reaching out and replying! So let me step back and explain what I want and I'm sure you'll know the answer. I use and maintain emacspeak (https://emacspeak.sf.net --- code is on github under https://github.com/tvraman/emacspeak Eldoc is extremely useful to the blind software engineer, perhaps even more so than to someone who can glance at the docs in another window. But eldoc spopping up and speaking based on an idel timer is suboptimal. So what I had implemented a few years ago was: 1. Turn off global eldoc mode. 2. Advice the eldoc-message machinery to cache the displayed message somewhre 3. Added an interactive command that spoke that cached value Result: a blind user could avoid the constant interruption from eldoc but ask for the documentation when needed with a single keystroke. Your explanation around how async updates works now explains my older solution broke, and I was naively trying to call what seemed to the closest equivalent which was clearly wrong. So to cut to the chase; could you provide me a simple mechanism that I could call from emacspeak (via a keybinding bound to an interactive command I write) where that command calls into the eldoc machinery and gets back the help that eldoc displays=3F =20 Jo=C3=A3o T=C3=A1vora writes: > > > > Could the current maintainer of eldoc give some pointers on what m= ight > > be breaking=3F > > >=20 > Hello Raman, >=20 > I'm not formally the maintainer of Eldoc (I think) but I have worked= on it > recently (read more than one year ago). The changes I introduced ma= ke it > so that the documentation-generating functions in > eldoc-documentation-functions > (plural!) can now be asynchronous (i.e. not return doc results immed= iately). >=20 > eldoc-documentation-default should not be called directly from elisp= > libraries other > than eldoc.el itself, which handles this possible asynchronicity. I= t is a > function value to > be put into eldoc-documentation-function which is then called by the= > eldoc.el machinery > (such as M-x eldoc) that gives it context. >=20 > So can you tell me what are you trying to accomplish=3F Maybe I can= help. >=20 > Jo=C3=A3o --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =E2=99=89 Id: kg:/m/0285kf1 =F0=9F=A6=AE -- Thanks, --Raman(I Search, I Find, I Misplace, I Research) ♉ Id: kg:/m/0285kf1 🦮