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 22:17:00 +0200 Message-ID: <87seztht1f.fsf@gmx.net> References: <86wmp5e4j4.fsf@p200300d6270a69e321a604e6fd40b4e6.dip0.t-ipconnect.de> <87wmp5huwy.fsf@gmx.net> 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="37883"; 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 22:17:59 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 1rueON-0009Zz-0A for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 10 Apr 2024 22:17:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rueNi-0000I1-SB; Wed, 10 Apr 2024 16:17:18 -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 1rueNe-0000HU-Mo for help-gnu-emacs@gnu.org; Wed, 10 Apr 2024 16:17:14 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rueNY-000257-Md for help-gnu-emacs@gnu.org; Wed, 10 Apr 2024 16:17:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1712780221; x=1713385021; i=stephen.berman@gmx.net; bh=LU4eRWPyY6UQShXq6NsTEsE2vnyivTm0xAik0S4Cy5E=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=uFZhSn4pn+ugjnxrP3H5i/J3uf4TQrd8wdmle7VqWokIom4grolda6YtphIDqsd2 hW+coRjblXms8laBN7eWmwHbQo3YBvlxv0+hk/2V8ZsskbFqPiQWx94cIEZBbBBc8 grj4zeITEQy2UaFC8yqh0QzL3zU4GCAOrth8RbPyawuq0arzT6o2voHwGE2H0Fq3J rEOhZZMldlUWbCBOE+uB6VKrJMOn1OTLWYAEZs8uuL7Mva9EzafTUaXU8sGxVJCdJ wJXdhvZC9ZVX7wA+6at34t8wyEfqREHKI38ya0hXV9k/t2MMPgKCjL7S09VHYIZG0 sZEODE2qAu2tJn7QZw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.94.133]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M2O2Q-1rvD8d0tsU-003wwW; Wed, 10 Apr 2024 22:17:01 +0200 In-Reply-To: (Heime's message of "Wed, 10 Apr 2024 20:09:44 +0000") X-Provags-ID: V03:K1:A2FLyyPEbXUutCE5ZlMT8S5YceoKyiPYuP8AwbFrS/O9llldl+s Mlj1djwB1gKEP/kPSWgXZSGUJf3PAXJFUoZfCPgXxdsLuRQqFzaPP7O11SJVChOclR9Px6u q70nPybllYzwXns6Gt/Lt0o5XoWD5/Ivldp8jHgjcx+GzktyBRkSxZ8w+E7kDty5uBVcuK7 vmk2Lg0IIAv2qlXZk9ASQ== UI-OutboundReport: notjunk:1;M01:P0:IbMbDfc0kUU=;/ctLXBptyF+u1fkVz+RJJOGcS6H u9iUKg4TZltPzwjiWsBZ6Z5I0xK4WPcTtg77ktPrabPvBSl+5NxJ8wjj92DWijffBITVFfZGB CiE0HmDYd+/et0g/c2qAqNtoO1qiKOJjZX6TWWrySG+duygTppk6hXkK6z+DEElBvodYvHoOw cG1WO5/SgSSnZv6wHCu+LReaQEh2kHqHfst0D6mqWkyJ52qqKF+3r2ov9U3vDMY170NfBzE/s 5XbyUn01WcFyEwHGXRyKWYFcvAmNZEf5lV5J2h1mNEhDcpBwyuitJEsopi8V1m+8nMKJ+HIVX d927lWDHxzegS3KpDGhi9iBNNbm0pwcR6F/JZwuIbdF9fIV8+7JjaHZOELYeCNY1kryc++nMj v1BywxF7Qp1DTu2aHn0+LDU4VDudsRbOagU5Xg+RY3FW1cBNedZ7pcNfydp0fSkzc8v5WnNIp +wu6wW4StHg+uN+ZXeHWoXrphl1uP43Ycz2ao6S0s4iIc/OdLtbq+mU2jhs6jEQ9CTAcf1clu 970q39wW5vmSEsW0hJEfGufi1CgXMKLHlt8LeiiLrZc9moOxZnHA49oK4Yu3gpGFcTT0AZtHA ZxWZwLgMzFOSPnq79FJHVN/G+2fJ1bqL0qjy9dnuhZJ4Hi4Ir28kD2v9XGGwGO61lTNKF2ogK UC46vUTfCmOq5eUnj9Poyf6ZKMgJ9UhhRgrzZxjkMrqzcr0yBSdRx1rZCCVxnSsCTu9rNz5RC nSKmBiK974KFDQECGYzERXUtO20j1wJSjQQPuioIOcu7/BC+oS25hmlT0PPfqdI047jR04hS Received-SPF: pass client-ip=212.227.17.22; 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:146299 Archived-At: On Wed, 10 Apr 2024 20:09:44 +0000 Heime wrot= e: > On Thursday, April 11th, 2024 at 7:36 AM, Stephen Berman > wrote: > >> On Wed, 10 Apr 2024 17:17:00 +0000 Heime heimeborgia@protonmail.com wro= te: >> >> > With the following implementation, I cannot get the documentation str= ing >> > 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 > > I want to print in the usual documentation buffer as doing > C-h f avus-greek or C-h f avus-flokki (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")))) (describe-function (pcase seltr ("Greek" 'avus-greek) ("Flokki" 'avus-flokki)))) Steve Berman