From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions Date: Thu, 05 Jan 2023 08:20:21 +0000 Message-ID: <877cy1ie9m.fsf@localhost> References: <87fscpifdw.fsf@localhost> <83a62xxuzs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60568@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 05 09:21:19 2023 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 1pDLV0-0004rL-TW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Jan 2023 09:21:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDLUn-0002Vb-5f; Thu, 05 Jan 2023 03:21:05 -0500 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 1pDLUl-0002SB-5c for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 03:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDLUk-0000G6-QV for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 03:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDLUk-0002SE-6h for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 03:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jan 2023 08:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60568 X-GNU-PR-Package: emacs Original-Received: via spool by 60568-submit@debbugs.gnu.org id=B60568.16729068049334 (code B ref 60568); Thu, 05 Jan 2023 08:21:02 +0000 Original-Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 08:20:04 +0000 Original-Received: from localhost ([127.0.0.1]:50192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDLTn-0002QU-VR for submit@debbugs.gnu.org; Thu, 05 Jan 2023 03:20:04 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:41121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDLTm-0002Pn-9F for 60568@debbugs.gnu.org; Thu, 05 Jan 2023 03:20:03 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 086FB240448 for <60568@debbugs.gnu.org>; Thu, 5 Jan 2023 09:19:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672906795; bh=iDthDmc5ujRrlOAVCtixY2FcRDAga+iYdv1N+aa3u3k=; h=From:To:Cc:Subject:Date:From; b=WyqDvjOKsZlFFGyaDIgQr38LYfnWYpFw8/Our/L91UJQYOHyaDRrmtWrFxACtHGtq TI/VgtEL+C607VY9LbsP28S/E3XIUbJv1VOgQR3Y+sUgBNCeLZUIRuzjCJ1aouZAvy VVBxqalo5OmeMccL1OoPW+bL7MekXm1WvQNgrwzupMTrGLCsJjq39f+c+JdGXQ+PXd CH+mgGVVeSbydbOLfaNr+98WmGh7vAOWML439evTBa+A/N6zF3hGPYA7J2zksb7rqe ZtfzJJVNU5nMNpKACseYAn9MmX4hyoggahI3Amqs7CvQifqUhbJ1ZsA60VmeaFGSw3 KmJ//oEGG1WTA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NnfXR60Hxz6tmF; Thu, 5 Jan 2023 09:19:49 +0100 (CET) In-Reply-To: <83a62xxuzs.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252570 Archived-At: Eli Zaretskii writes: >> Would it be possible to provide function body info via *Help* system in >> Emacs? > > Provide how? For example, clicking source code link for function without definition may display a new separate buffer with function body stored in the function symbol. > You basically ignore the valid objections voiced against such a > feature, and present a specific case where (a) the source code is > extremely short, and (b) the existing Help facilities are less than > helpful because they have a deficiency. How does it follow from the > specific use case you present that we must show the source code in > Help buffers? Sorry, I did not imply that the function body will be _displayed_ in *Help* buffers. Just accessible via some means. As an alternative to my above suggestion, the function body might be displayed upon clicking on some button in help buffer. Maybe using outlines to fold/unfold the definition as necessary. (BTW, don't *Help* buffer already suffer from too long variable values being displayed? I don't mean it as an argument to add function body - rather pointing that we might want some ideas how to deal with long sexps displayed in *Help*) > An alternative solution would be to teach Help > functions to find the place where the source code is generated and let > users examine that if they want. I could even argue that this > alternative is better, because with your proposal we will show a > source code that doesn't actually exist anywhere in the form we show > it. Yes, for the particular use case I mentioned here. But how? I do not see any obvious ways how to know where the function was generated unless `defun' stores some extra auxiliary information when defining a function. > If we do decide to show the source code in some circumstances, we need > to do that selectively and in a way that doesn't display unnecessarily > large Help buffers that would then run the risk of "drowning" useful > information, making it easy to miss. So any such proposal should > suggest how to avoid the downsides, at least. I agree that too long function bodies, similar to too long variable values are objectively degrading readability. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at