From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Need help with eldoc: Date: Fri, 25 Mar 2022 00:16:07 +0000 Message-ID: <87ee2qevjs.fsf@gmail.com> References: <25149.276.56904.499053@retriever.mtv.corp.google.com> 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="37100"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 25 01:16:37 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 1nXXd7-0009XM-0O for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Mar 2022 01:16:37 +0100 Original-Received: from localhost ([::1]:58486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXXd5-0002TQ-Fm for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Mar 2022 20:16:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXXbh-0001dl-O5 for emacs-devel@gnu.org; Thu, 24 Mar 2022 20:15:09 -0400 Original-Received: from [2a00:1450:4864:20::42a] (port=42714 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXXbg-0007Tm-84 for emacs-devel@gnu.org; Thu, 24 Mar 2022 20:15:09 -0400 Original-Received: by mail-wr1-x42a.google.com with SMTP id r13so8738626wrr.9 for ; Thu, 24 Mar 2022 17:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=g/ASjStkZ0We3T1Y6dVGxbVpPs/5z6k+JAax4otV7F8=; b=e+5Iegz+Upv8xVK2RnAV3Haa0moZKSeUNGjyVyZUyHxbVGpQoO4KvkbMBGS2oiKF0h uWXurtn1t2Q6wxNNyTddxJzBGqj5238KOSPD/f25t7hpES4HbuLrdYZtIl7Rhok3qhD0 fPHRnzugDSb3RyMOcZqLo6x3TztVnlzrSUmd7dbC7f7NILcGWXxJh74GuAWT6sSH/R5d sIHeEXZh3W8JKzRkbDtGxwfwlKHOcUyoKUEjmBWXZ0vc+yDoQqq5kS/ojTO0cTt52CA7 Yd48asvcZLpB0XhaoMKeLbAALLevZQz55cdsDEnFSFxNPKqJE7YyqFbh845qfGixIaTL rQgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=g/ASjStkZ0We3T1Y6dVGxbVpPs/5z6k+JAax4otV7F8=; b=mkew67gGYDrpWVol1+QNvs2g2FZRk1fmgd1dGe+74O03rtx+YXhPqM5Gwy6+sceRVZ +FoeCFr0kT1XuP9eXWjkwzCDjpapdr3e2oqMd6UsvYnQ0mE4KG/703xOVB0I04jtnBRv nz9GhxzVMmfsAiGDjwqhpBJ7dRxxgbLgHGo0d/C1nn4QozPD4lmq6mT4MN1/IifgUPhv L9SdFXQYRpr6qUfBhW2Qi90i9++37S5EqnQqIRJcDk4G+PpmBiBVU04gQpC/j3W4WTq6 aLMnleZ+LBNLLbb65mXy0bJUnhD6cdpxhufUHqrG2s6z6DPLsBjamXSnjbG6w3PkRcmH trPw== X-Gm-Message-State: AOAM533IKkbxoL02lVI6CzK3qhwZTnrlajsp67knSvz8sLXydXb+yWGx OuCHQGAAIsjt9Yq0JjMzs18RZk03sb4= X-Google-Smtp-Source: ABdhPJyAjeZsOi0WNXiNuL4g7vcUlSbr1/56Ox2cjDxUcIP+jO1dVQsmpY7EuwMsL/wkG+I+oZu8vw== X-Received: by 2002:a5d:47c5:0:b0:205:9248:817a with SMTP id o5-20020a5d47c5000000b002059248817amr5933833wrc.718.1648167306496; Thu, 24 Mar 2022 17:15:06 -0700 (PDT) Original-Received: from krug (87-196-72-45.net.novis.pt. [87.196.72.45]) by smtp.gmail.com with ESMTPSA id u11-20020a5d6acb000000b002058148822bsm5233282wrw.63.2022.03.24.17.15.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Mar 2022 17:15:06 -0700 (PDT) In-Reply-To: <25149.276.56904.499053@retriever.mtv.corp.google.com> (T. V. Raman's message of "Thu, 24 Mar 2022 16:39:00 -0700") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:287427 Archived-At: "T.V Raman" writes: > 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? Hello Raman, Yes, I think I have the solution for you. There is a new variable called eldoc-display-functions as well. My advice is that you attempt to write a member function for it. Call it, say emacsspeak-speak-out-docs and then add it to eldoc-display-functions via add-hook. Your new function emacsspeak-speak-out-docs will then receive two arguments: DOCS and INTERACTIVE. The first contains the pieces of documentation that have been gathered by the eldoc-documentation-functions (plural) and the second INTERACTIVE argument says if the request to "display" documentation came directly from the user or from ElDoc's automatic mechanisms (the timer that you are keen on turning off). The docstring has more details. Once that is done you need only call M-x eldoc and your problem, as you presented it, should be solved. And yes, it's fine to turn off global-eldoc-mode. Let me know if you need more help.=20 Jo=C3=A3o PS: I guess it should be called eldoc-presentation-functions instead of eldoc-display-functions since in this case it's not really "displaying" anything, but presenting it with sound. Also congratulations for Emacsspeak! I realize it's a very important project, and it's amazing that someone like you is making Emacs work for the visually impaired.