From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Printing documentation string of another function Date: Wed, 10 Apr 2024 21:36:29 +0200 Message-ID: <87wmp5huwy.fsf@gmx.net> References: <86wmp5e4j4.fsf@p200300d6270a69e321a604e6fd40b4e6.dip0.t-ipconnect.de> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26728"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Joost Kremers , Zhengyi Fu , Heime via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 10 21:37:15 2024 Return-path: Envelope-to: geh-help-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 1rudkx-0006ht-G2 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 10 Apr 2024 21:37:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rudkO-0007A1-Da; Wed, 10 Apr 2024 15:36:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rudkN-00079n-0A for help-gnu-emacs@gnu.org; Wed, 10 Apr 2024 15:36:39 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rudkL-00037u-9P for help-gnu-emacs@gnu.org; Wed, 10 Apr 2024 15:36:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1712777790; x=1713382590; i=stephen.berman@gmx.net; bh=sBNt6MW+MzwRaEzqI8XPzh3ldPaCRtAivApiogDoWu8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=es3bikdo9xAfDmEqluSak+mkMFpa5OQNuH9i+6FXKgIJeA8vAtKJdjafVReVGUq3 x5/ZhQRc8IXmxE3pMVUWaDxdj8Tcyg1eVLdy3VkCsJW/ZT1Fq5FwUqh5b2wDSa7z0 URGqODBGcCzJFR2DQ08HbL5ov0DCJTAwfqFsYzYhN8AjKNeDyNCobW3kUQ4t4qaET Yi2+vrQEMIkIyExHWWmvaec1q8i8R9Xll1D3BzKiu28Wf02vmtb/Dixhz0UXnLhoN 39+X7mzsfyszImVNLKfYp3UyZXWUL2Vpfsm3iB6iuc3X10JS3+2RdGW34DnK/DwSD OY49J5tGlWa8kRLfoA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.94.133]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQMuR-1s841U3XrF-00MLuu; Wed, 10 Apr 2024 21:36:29 +0200 In-Reply-To: (Heime's message of "Wed, 10 Apr 2024 17:17:00 +0000") X-Provags-ID: V03:K1:hMe9MJoB0pycI9ll1hi4ACjUUXN9JYBqZUUQHUQZvfHWSiRarV4 QJsp61pd+lRRu0OnClin6ZwUp/AYOSBVjp8A4zkqWkx/+h7C13PXUrgo4L6HqFxnK9bCxKv 6QTJGN5jPwbw8N5E7MEvL1svnVIoNB5xoPpn7l/eqdTm7HLUWIgkMNH2DV2T03efkcXLNQP 7SbLbbOLAwWLkDadYqliA== UI-OutboundReport: notjunk:1;M01:P0:vvu20HzLCs0=;l8XiDhHG12FpsjN+Z7FFH1CeuW3 eisiq8I/rZQDik5Z6u2VRZKWpVsoRhbrMS+xLqI0efv9785a4EffZHCa7TxikdMG4V44zox/z fDbQvW2aB6Q4byXGS1LCiy45LP7HVm9LQjoh/IJxI0MehRehfNC1i8a9yPsMu5Ir4OyVvHj+7 GPJL6aJJKgWNV3XcicOiKZ6/JLUl4BVfqDFzLRzxio/OFDd4DSnvAs/LLNDbSVnd6a3O0IZTf 6xduazxMm3n82rkBkOm+6Qs8FDSXS5a1rUMeqwOMcH+ST055GfYhTYvXvGqFr6D2OLDfymJvJ T1XlmBHRAhxcCVq2P18bJuVO2EEzbx8fVWqwra77Lz4wV5I7cuPGnpvA+7wDhe+8STnjkK+VX atyOdIK1+Ltu2/kQLPCuFn+uKGOlAeox1qNew92z+qVxtkMPPyiJ3r0AyFXkooY6LZPnL8Xcq GzkaluFnCeeruvOpgRnXrw+RpnlnmZPLfsSi8sXkK2nmqV8MyFZ0Qp0W4AEMNfWAOGb5GGQmw 0QDokazDKttRN3LBVLxHnG7j6GfhqLzUtxWRsCaeG5bl+Z7BfBkoSpBKMMqg8UX2VSFwDQLP0 h0Ry5i4x6y+r0Fdw2UQgeWTB6OHoiaqoQ3KfPg7TXdlS2aj4O9sb6xUA+gYs3jejpKFu60FDI htO4aXTW/SQL8bs5iaphmTTINKm+KPWZqDiL2OYIjKNTzzmbyDhdrLSoLaWIgNu1yd8LdlZVu shG6xEGW1ms8A/JHPegPZt+1XN6UmA4DYsM5GM/P8bsiUDrsiOjzHG+QmS6In53gKa4Tittw Received-SPF: pass client-ip=212.227.15.15; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146297 Archived-At: On Wed, 10 Apr 2024 17:17:00 +0000 Heime wrot= e: > With the following implementation, I cannot get the documentation string > of the appropriate function to display. > > (defun avus-doc (seltr) > "Print the documentation string of a particular function." > > (interactive > (list > (let ( (cseq '("Greek" "Flokki")) ) > (completing-read "Doc: " cseq nil t "Greek")))) > > (pcase seltr > ("Greek" (documentation 'avus-greek)) > ("Flokki" (documentation 'avus-flokki))) ) `(documentation 'avus-greek)' just returns the doc string, it does not display it. You have to add code to do that, e.g.: (defun avus-doc (seltr) "Print the documentation string of a particular function." (interactive (list (let ((cseq '("Greek" "Flokki"))) (completing-read "Doc: " cseq nil t "Greek")))) (let ((doc (pcase seltr ("Greek" (documentation 'avus-greek)) ("Flokki" (documentation 'avus-flokki))))) (tooltip-show doc))) Steve Berman