Received: (at 60568) by debbugs.gnu.org; 7 Jan 2023 06:55:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 07 01:55:29 2023 Received: from localhost ([127.0.0.1]:56332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pE373-00033W-0q for submit <at> debbugs.gnu.org; Sat, 07 Jan 2023 01:55:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pE371-00033J-Cv for 60568 <at> debbugs.gnu.org; Sat, 07 Jan 2023 01:55:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pE36v-0007wG-D5; Sat, 07 Jan 2023 01:55:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OJJAPgM86tU2XgmRWSU+ITHL+f5osm3J7Q81NPkYCKc=; b=Fp3foI0/rqfW 0GKrHRO0/lboLFyzjm/xljs/q1iKS6mDkMDFSs6ol7KtV0QawiQGd82FIn1u+gKaseRiFXLkRgTx/ UTK2K9bOpYVv5ispa/gwjrEv/CSpr/uxDocah+DhplF+bSchqrowKArZ0q7x2el5CVvz7H09Zu6Vo sRk0YpwipuKgD73bLyirLLYVZdbqUqrcTVW33gW6cjtYsMYC6acBHV55qmVXSNha6r7dc73xW28QJ GD+R64EWsUD4r5BTt1VBdLNpfCtHrjFP1Af/Jig1pZxZA/GGRFT/X37w3x7QGMZLJ6Mtbe3xlcD2i JdZOf67YaGYLXy+fT8A+Jg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pE36s-00027m-Bk; Sat, 07 Jan 2023 01:55:18 -0500 Date: Sat, 07 Jan 2023 08:55:38 +0200 Message-Id: <83k01yu93p.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <jwvh6x3chox.fsf-monnier+emacs@HIDDEN> (message from Stefan Monnier on Fri, 06 Jan 2023 19:36:04 -0500) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> <8dea9f3e0ea1de84c49a@HIDDEN> <83cz7sw4q1.fsf@HIDDEN> <371ba1d0beb0ed44a9a6@HIDDEN> <jwvmt6vmwr5.fsf-monnier+emacs@HIDDEN> <371ba1d0be96347bdf60@HIDDEN> <jwvh6x3chox.fsf-monnier+emacs@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: gregory@HIDDEN, yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Stefan Monnier <monnier@HIDDEN> > Cc: 60568 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, > yantar92@HIDDEN, mardani29@HIDDEN > Date: Fri, 06 Jan 2023 19:36:04 -0500 > > >>>>> What about the attached patch? It seems to work well. > >>>> SGTM. With which cases did you test this? > >>>> Adding Stefan, in case he has any comments. > >> SGTM as well. > > TBH, I'm not sure this is useful anymore, if the 'definition-name' slot is > > supposed to be used for such functions (which I didn't know). WDYT? > > If you look at the code of `find-func.el` you'll see that we already > rely on heuristics, so it seems like a natural complement. > But I agree that `definition-name` is usually preferable since it's more > reliable. Still most people don't know `definition-name`, so it can > still be helpful. Maybe people will know better if definition-name would be documented.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 7 Jan 2023 00:36:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 19:36:16 2023 Received: from localhost ([127.0.0.1]:56167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDxC4-0000iG-IL for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 19:36:16 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44223) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1pDxC2-0000i2-Ep for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 19:36:14 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D0FDB805BA; Fri, 6 Jan 2023 19:36:07 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E8B7580172; Fri, 6 Jan 2023 19:36:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673051765; bh=k+oK9r/LZrEtlcdAqbgdYF9JWOF4xOfb06V8iNfTa7c=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aqXJ9E/B99KFtJmCrOV890QRyAqE2VI/4PAv/4Qr3gn2NRC7F0iCXxn+wnD8HXfMy /6nRiSom0r0p6Ny0mopnxt2zq4d9a2PT7jvDg2qYHsSIPJE6VPZu1cnlm/hfK4fb9C WcY7tv39iIpI3VxJWlov+oDnhGk0uZV8EweZkxZEmLNiKYHFRibK/lSVAj9t/tX6lx 62fwD9+jhYhHXjzMPYdjaTIQ63M/nCI6ztEaaJk3k8X6oSqys1kWPuVn1q3EovWaEt Zk/kMAb4wtqwbOhboZ7BRpFDArxSQ0kj03bGP1Tk1hNivfiTu/4pydW+9vgD5r8nen flAGpuY92JgAw== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A8F3A120C4B; Fri, 6 Jan 2023 19:36:05 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Gregory Heytings <gregory@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <371ba1d0be96347bdf60@HIDDEN> (Gregory Heytings's message of "Fri, 06 Jan 2023 22:52:32 +0000") Message-ID: <jwvh6x3chox.fsf-monnier+emacs@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> <8dea9f3e0ea1de84c49a@HIDDEN> <83cz7sw4q1.fsf@HIDDEN> <371ba1d0beb0ed44a9a6@HIDDEN> <jwvmt6vmwr5.fsf-monnier+emacs@HIDDEN> <371ba1d0be96347bdf60@HIDDEN> Date: Fri, 06 Jan 2023 19:36:04 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.312 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org, yantar92@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) >>>>> What about the attached patch? It seems to work well. >>>> SGTM. With which cases did you test this? >>>> Adding Stefan, in case he has any comments. >> SGTM as well. > TBH, I'm not sure this is useful anymore, if the 'definition-name' slot is > supposed to be used for such functions (which I didn't know). WDYT? If you look at the code of `find-func.el` you'll see that we already rely on heuristics, so it seems like a natural complement. But I agree that `definition-name` is usually preferable since it's more reliable. Still most people don't know `definition-name`, so it can still be helpful. >> - We probably want to use `advice-cd*r` so as to flatten the actual >> function definition rather than the combination of its definition with the >> various pieces of advice that are currently applied. > You mean, (flatten-tree (advice--cd*r (symbol-function fun))), right? Yes. >> - The above works for non-compiled functions but for byte-compiled >> functions we need an ad-hoc version of `flatten-tree` which extracts the >> constants from the constant vector of bytecode objects (also recursively >> since bytecode objects tend to contain other bytecode objects). >> >> For native-compiled functions, we may be able to get some kind of >> "constant vector" as well, but I don't think that's currently accessible >> from ELisp. We should ask Andrea. > > Are such dynamically defined functions not always non-compiled, by > definition? No. They can be defined by macros rather than functions in which case they'll usually be compiled. Or they may be closures defined locally within another defun, in which case again they'll usually be compiled. [ E.g. with the patch to `ob-shell.el` that I sent, the `org-babel-execute:sh` is byte-compiled. ] > At least with the original recipe in this feature request, > (symbol-file 'org-babel-execute:sh) returns "lisp/org/ob-shell.elc", so it > has been created by a byte-compiled function. The `ob-shell.el` code in master creates the functions at run time via `eval`, so they're created while loading `ob-shell.elc` but they're interpreted. With my patch, they're just closures so their body is compiled when `ob-shell.el` is compiled. Stefan
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 6 Jan 2023 22:52:36 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 17:52:36 2023 Received: from localhost ([127.0.0.1]:56016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDvZk-0006Ob-9h for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 17:52:36 -0500 Received: from heytings.org ([95.142.160.155]:33956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDvZi-0006OT-D4 for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 17:52:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673045553; bh=zECz0m3z+tK2Z0EcaJYDP2pw7gWRHiOuO0Jusv7vgyo=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=f8XTdY5itkJeOIoBCW6uQobSGIEtDlgc/NK6yH2flyzaFvRFYebJqogluPBsR/1gi oklXtIiKIfc0KkqNJRiiAnFX8euTkzEvRzuTtcmscYti/axUYWT/OC0VKsvw53QSHn KlURKGW2fePGpquw62WRbW8JEa1hkRi0l3lK1jsYey52VRLCi7M6dXbuYbfZDo/bB6 iv0ZzJVy2k0unUxzMNbsR2RO+UkGzMwSlvkdLFrLOgE+3z63FtO0HQXaduyiu5eXCB 7B/KQ7AyNZkSjDtvFj+HEAp7C/jtWUhpiSxHLy+DWE5lCGdvshJ8HYqsTcADOFcbS1 WQCibVcp8870Q== Date: Fri, 06 Jan 2023 22:52:32 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <jwvmt6vmwr5.fsf-monnier+emacs@HIDDEN> Message-ID: <371ba1d0be96347bdf60@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> <8dea9f3e0ea1de84c49a@HIDDEN> <83cz7sw4q1.fsf@HIDDEN> <371ba1d0beb0ed44a9a6@HIDDEN> <jwvmt6vmwr5.fsf-monnier+emacs@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org, yantar92@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >>>> What about the attached patch? It seems to work well. >>> >>> SGTM. With which cases did you test this? >>> Adding Stefan, in case he has any comments. > > SGTM as well. > TBH, I'm not sure this is useful anymore, if the 'definition-name' slot is supposed to be used for such functions (which I didn't know). WDYT? >> +(defun help-function-def--find-probable-definition-place (fun) > > Can we shorten the name using "guess" i.s.o "find-probable"? > > Also, this should be in `find-func.el` rather than in `help-mode.el`, > no? > Yes and yes. >> + (flatten-tree (symbol-function fun)))) > > - We probably want to use `advice-cd*r` so as to flatten the actual > function definition rather than the combination of its definition with > the various pieces of advice that are currently applied. > You mean, (flatten-tree (advice--cd*r (symbol-function fun))), right? > > - The above works for non-compiled functions but for byte-compiled > functions we need an ad-hoc version of `flatten-tree` which extracts the > constants from the constant vector of bytecode objects (also recursively > since bytecode objects tend to contain other bytecode objects). > > For native-compiled functions, we may be able to get some kind of > "constant vector" as well, but I don't think that's currently accessible > from ELisp. We should ask Andrea. > Are such dynamically defined functions not always non-compiled, by definition? At least with the original recipe in this feature request, (symbol-file 'org-babel-execute:sh) returns "lisp/org/ob-shell.elc", so it has been created by a byte-compiled function. >> + ;; Exclude symbols that are 3 characters or less. >> + (when (> (length el) 9) > > If we filter them out when constructing `names`, we can use a comment > where the number matches the number used in the code :-) > Oh yes ;-) >> + ;; Determine the beginning position of that >> + ;; function. >> + (goto-char (point-min)) >> + (when (catch 'found >> + (while (re-search-forward >> + (concat "\\_<" >> + (regexp-quote result) >> + "\\_>")) >> + (when (string= (lisp-current-defun-name) >> + result) >> + (throw 'found t))) >> + (throw 'found nil)) >> + (beginning-of-defun) >> + (cons result (point))))))))))))) > > Can't we use `find-function-noselect` here? Or maybe just return the > function name and let the caller then use `find-function-noselect`. > Indeed! >> @@ -281,7 +366,31 @@ help-function-def--button-function >> (unless (= (point) position) >> (push-mark nil t)) >> (goto-char position)) >> - (message "Unable to find location in file"))))) >> + (let ((probable-definition-place >> + (help-function-def--find-probable-definition-place fun))) >> + (when probable-definition-place >> + (goto-char (cdr probable-definition-place))) >> + (let ((help-buffer-under-preparation t)) >> + (help-setup-xref (list #'help-function-def--button-function >> + fun file) >> + (called-interactively-p 'interactive)) >> + (with-help-window (help-buffer) >> + (insert (substitute-command-keys >> + (format "Function %s could not be found in `%s'.\n\n" >> + fun (file-name-nondirectory file)))) >> + (setq help-mode--current-data (list :symbol fun >> + :file file)) >> + (save-excursion >> + (re-search-backward >> + (substitute-command-keys "`\\([^`']+\\)'") >> + nil t) >> + (help-xref-button 1 'help-function-def fun file)) >> + (when probable-definition-place >> + (insert (substitute-command-keys >> + (format "It was probably defined by `%s'.\n\n" >> + (car probable-definition-place))))) >> + (insert "Function definition:\n\n") >> + (insert (pp-to-string (symbol-function fun)))))))))) > > Please move this to a separate function. > Sure. > > Also, I'm not completely convinced what you do with the *Help* buffer > here is the UI we'll want, really. But I don't have a good idea for > what to replace it with (yet), so we can start with that and tweak it > later. > Okay.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 6 Jan 2023 17:27:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 12:27:42 2023 Received: from localhost ([127.0.0.1]:55748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDqVK-0005hL-5w for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 12:27:42 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1pDqVI-0005h6-GO for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 12:27:40 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AF1F34414AE; Fri, 6 Jan 2023 12:27:34 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 879CB4410C4; Fri, 6 Jan 2023 12:27:32 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673026052; bh=GyiYrOicC7G2j6DOGstV9xBMs+9KP3wHFEeCdTZlj8U=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WwFdGSviyI+lKIn4EN0vpo8WSlvtoH741kvarQBJJ1yo/K2zTSiC2MS2451BFkde4 C4FC80EJcclbZg3rjB3Fd+aKFmZqYZNEaw5TK2uOOwqTyO/CAjRlK8PeAhjwsR5jOI Pib83D0gFnVQMRfYXU9OSf7fVRy+T0RGjD78g/aZO1dNJjN7jJAxx6SrwHSph8k5cq 15RYceY21vseWIGU6Gc8eFGziEywNxeHpp942i/poV66ZmrdEcbjctE10llf5dry5q cQvx6s7Zfl8Ei5QHS0S6vqOl6MGe3QcmFo8qJbDOgrPZSDDdQL7LkO8DeW8zKLMbll 5TzzSAVq/I+vQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 617481203CF; Fri, 6 Jan 2023 12:27:32 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Gregory Heytings <gregory@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <371ba1d0beb0ed44a9a6@HIDDEN> (Gregory Heytings's message of "Fri, 06 Jan 2023 09:11:02 +0000") Message-ID: <jwvmt6vmwr5.fsf-monnier+emacs@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> <8dea9f3e0ea1de84c49a@HIDDEN> <83cz7sw4q1.fsf@HIDDEN> <371ba1d0beb0ed44a9a6@HIDDEN> Date: Fri, 06 Jan 2023 12:27:30 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.180 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>, yantar92@HIDDEN, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) >>> Not always, I can imagine functions defined with fset for example. I'd consider that an error. `defalias` on the other hand is indeed a normal and common case. >>> What about the attached patch? It seems to work well. >> SGTM. With which cases did you test this? >> Adding Stefan, in case he has any comments. SGTM as well. I do have some comments, see below. > +(defun help-function-def--find-probable-definition-place (fun) Can we shorten the name using "guess" i.s.o "find-probable"? Also, this should be in `find-func.el` rather than in `help-mode.el`, no? > + (save-excursion > + ;; Build a list of strings with the symbols (and strings) of FUN. > + (let ((names > + (mapcar (lambda (el) > + (concat > + "\\_<" > + (regexp-quote (format "%s" el)) I think you want "%S" rather than "%s". > + "\\_>")) > + (flatten-tree (symbol-function fun)))) - We probably want to use `advice-cd*r` so as to flatten the actual function definition rather than the combination of its definition with the various pieces of advice that are currently applied. - The above works for non-compiled functions but for byte-compiled functions we need an ad-hoc version of `flatten-tree` which extracts the constants from the constant vector of bytecode objects (also recursively since bytecode objects tend to contain other bytecode objects). For native-compiled functions, we may be able to get some kind of "constant vector" as well, but I don't think that's currently accessible from ELisp. We should ask Andrea. > + ;; Exclude symbols that are 3 characters or less. > + (when (> (length el) 9) If we filter them out when constructing `names`, we can use a comment where the number matches the number used in the code :-) > + ;; Determine the beginning position of that > + ;; function. > + (goto-char (point-min)) > + (when (catch 'found > + (while (re-search-forward > + (concat "\\_<" > + (regexp-quote result) > + "\\_>")) > + (when (string= (lisp-current-defun-name) > + result) > + (throw 'found t))) > + (throw 'found nil)) > + (beginning-of-defun) > + (cons result (point))))))))))))) Can't we use `find-function-noselect` here? Or maybe just return the function name and let the caller then use `find-function-noselect`. > @@ -281,7 +366,31 @@ help-function-def--button-function > (unless (= (point) position) > (push-mark nil t)) > (goto-char position)) > - (message "Unable to find location in file"))))) > + (let ((probable-definition-place > + (help-function-def--find-probable-definition-place fun))) > + (when probable-definition-place > + (goto-char (cdr probable-definition-place))) > + (let ((help-buffer-under-preparation t)) > + (help-setup-xref (list #'help-function-def--button-function > + fun file) > + (called-interactively-p 'interactive)) > + (with-help-window (help-buffer) > + (insert (substitute-command-keys > + (format "Function %s could not be found in `%s'.\n\n" > + fun (file-name-nondirectory file)))) > + (setq help-mode--current-data (list :symbol fun > + :file file)) > + (save-excursion > + (re-search-backward > + (substitute-command-keys "`\\([^`']+\\)'") > + nil t) > + (help-xref-button 1 'help-function-def fun file)) > + (when probable-definition-place > + (insert (substitute-command-keys > + (format "It was probably defined by `%s'.\n\n" > + (car probable-definition-place))))) > + (insert "Function definition:\n\n") > + (insert (pp-to-string (symbol-function fun)))))))))) Please move this to a separate function. Also, I'm not completely convinced what you do with the *Help* buffer here is the UI we'll want, really. But I don't have a good idea for what to replace it with (yet), so we can start with that and tweak it later. Stefan
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 6 Jan 2023 16:44:21 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 11:44:21 2023 Received: from localhost ([127.0.0.1]:55702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDppM-0002F5-SD for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 11:44:21 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1pDppK-0002Eq-TA for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 11:44:19 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 07B1F8001A; Fri, 6 Jan 2023 11:44:13 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 325E380172; Fri, 6 Jan 2023 11:44:11 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1673023451; bh=FB+qJneo6YtOVd3qfhUZwgMrPcq6cQbbHYwx9VxRhq0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UACM/+klAiMCSakiyMMHGeGhCLtCThQ6D7Df/mhDZ7SCchNOT5eaw+CzyM8dslRcD qLFu6Yl+/5FafneR5iABK7kmrQ8JuulvUeNdSqZkMYqmj/iUqOBJPnFbwIKfrbJZhQ F9xxaKC7gN+1AY4CMw4fh7s+xtAsET9mlOxwLt7sBY0OoubRedAaA5FcSz1J9s1T9v +ox+AkN4XkyV4Jkay3xFELloZ7nbS3rgNmt94itoYkQaOetsK8LIzv/KUD/I7kFtAI AkIpxDKtVfoQwDQ7LJzFnAoqThPc+pdEKvuuLRePYUQk1SRmYgi1RnyF1dtIn5HTvG AYr5SjuOSjMEQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 11BE41209C7; Fri, 6 Jan 2023 11:44:11 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <87fscpifdw.fsf@localhost> (Ihor Radchenko's message of "Thu, 05 Jan 2023 07:56:11 +0000") Message-ID: <jwvsfgnmxev.fsf-monnier+emacs@HIDDEN> References: <87fscpifdw.fsf@localhost> Date: Fri, 06 Jan 2023 11:44:10 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.056 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > One of the discussed features was displaying function source code right > in *Help* buffers. This feature usefulness have been objected at that > time, on the grounds that showing function code may be too long and > cause large *Help* buffers. FWIW, I find myself regularly jumping to `M-x ielm` to look at the `symbol-function`, so I would actually appreciate a button in the *Help* buffer to display the actual value in the `symbol-function` slot. This would also bring `describe-function` a bit closer to `describe-variable`, which I think is good. > 1. emacs -Q > 2. M-: (require 'ob-shell) > 3. <F1> f org-babel-execute:sh <RET> > 4. Click on the source code link in *Help* buffer > 5. Observe point jumping to (point-min) with no obvious way to find the > function definition. We have `definition-name` for that. I.e. `org-babel-shell-initialize` should arguably do (put 'org-babel-execute:sh 'definition-name 'org-babel-shell-initialize) so that step 4 above jumps to `org-babel-shell-initialize`. The patch below does that, along with saving some kittens. Stefan diff --git a/lisp/org/ob-shell.el b/lisp/org/ob-shell.el index 4a60186cd5d..5f7373c3faa 100644 --- a/lisp/org/ob-shell.el +++ b/lisp/org/ob-shell.el @@ -74,20 +74,25 @@ org-babel-shell-initialize is modified outside the Customize interface." (interactive) (dolist (name org-babel-shell-names) - (eval `(defun ,(intern (concat "org-babel-execute:" name)) - (body params) - ,(format "Execute a block of %s commands with Babel." name) - (let ((shell-file-name ,name) - (org-babel-prompt-command - (or (alist-get ,name org-babel-shell-set-prompt-commands) - (alist-get t org-babel-shell-set-prompt-commands)))) - (org-babel-execute:shell body params)))) - (eval `(defalias ',(intern (concat "org-babel-variable-assignments:" name)) - 'org-babel-variable-assignments:shell - ,(format "Return list of %s statements assigning to the block's \ + (let ((fname (intern (concat "org-babel-execute:" name)))) + (defalias fname + (lambda (body params) + (:documentation + (format "Execute a block of %s commands with Babel." name)) + (let ((shell-file-name name) + (org-babel-prompt-command + (or (alist-get name org-babel-shell-set-prompt-commands) + (alist-get t org-babel-shell-set-prompt-commands)))) + (org-babel-execute:shell body params)))) + (put fname 'definition-name 'org-babel-shell-initialize)) + (defalias (intern (concat "org-babel-variable-assignments:" name)) + #'org-babel-variable-assignments:shell + (format "Return list of %s statements assigning to the block's \ variables." - name))) - (eval `(defvar ,(intern (concat "org-babel-default-header-args:" name)) '())))) + name)) + (funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29 + (intern (concat "org-babel-default-header-args:" name)) + '()))) (defcustom org-babel-shell-names '("sh" "bash" "zsh" "fish" "csh" "ash" "dash" "ksh" "mksh" "posh")
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 6 Jan 2023 09:11:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 04:11:05 2023 Received: from localhost ([127.0.0.1]:53800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDiki-00068K-Lj for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 04:11:05 -0500 Received: from heytings.org ([95.142.160.155]:32916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDikh-00068D-Cr for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 04:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672996262; bh=JmEdXDjp3IaSmyswjEAlFVPM5Ov2rkHYviHv7dQIKGg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=mV4p0K958n6s7+JATlWUNsNXMaQi0+aomy3RDLZqAXbvX5LDfEUX6uwvGjXDWhGZe oeOL2J32LPODHU6YIUL0wIgvMYXZT83170M9/jP48BgJ0vJI/5EV0GoMPYpBKlu8RQ enwSCT5fQcCuOUQf4uQLpPeWyAKCKnZ9/YQo0R3rmhwLQPmfgy4qc9Uk8VOY3wEUYS ++EjqHd8DJ2CQiFsxl0LkJgYtfh62vSmXl26aUGqOGrOwkCs6k7TnfZjEeiwWH+DaZ C8e0dsHlLS1NjevqQX6r/Frzpg1ApCG7ZzH7iiOHTWyzZ/hXktvVCsZ0KOyfsNMDFF Ku5ry0QERsphQ== Date: Fri, 06 Jan 2023 09:11:02 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <83cz7sw4q1.fsf@HIDDEN> Message-ID: <371ba1d0beb0ed44a9a6@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> <8dea9f3e0ea1de84c49a@HIDDEN> <83cz7sw4q1.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="fvTIG9ynrp" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, mardani29@HIDDEN, Stefan Monnier <monnier@HIDDEN>, 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --fvTIG9ynrp Content-Type: text/plain; charset=us-ascii; format=flowed >>> I hope that in a more general case we could use something similar, >>> since every definition of a function should start from "defun " >>> followed by some part of its name, right? >> >> Not always, I can imagine functions defined with fset for example. >> >> What about the attached patch? It seems to work well. > > SGTM. With which cases did you test this? > > Adding Stefan, in case he has any comments. > Mainly with the original recipe and some variants of it. I attach a slightly improved version of the patch. --fvTIG9ynrp Content-Type: text/x-diff; name=Try-to-find-where-dynamically-defined-functions-were.patch Content-Transfer-Encoding: base64 Content-ID: <371ba1d0bec903e3e0b2@HIDDEN> Content-Disposition: attachment; filename=Try-to-find-where-dynamically-defined-functions-were.patch RnJvbSA4NDFhZDY4MGRiYmZhM2E0YTk1YTNiMDlhNzQwOWZjZDljZTZjZGQ3 IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBGcmksIDYgSmFu IDIwMjMgMDg6NTQ6MzQgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gVHJ5IHRv IGZpbmQgd2hlcmUgZHluYW1pY2FsbHkgZGVmaW5lZCBmdW5jdGlvbnMgd2Vy ZSBkZWZpbmVkDQoNCiogbGlzcC9oZWxwLW1vZGUuZWwNCihoZWxwLWZ1bmN0 aW9uLWRlZi0tZmluZC1wcm9iYWJsZS1kZWZpbml0aW9uLXBsYWNlKTogTmV3 IGZ1bmN0aW9uLg0KKGhlbHAtZnVuY3Rpb24tZGVmLS1idXR0b24tZnVuY3Rp b24pOiBVc2UgaXQuICBTZWUgYnVnIzYwNTY4Lg0KLS0tDQogbGlzcC9oZWxw LW1vZGUuZWwgfCAxMTEgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrLQ0KIDEgZmlsZSBjaGFuZ2VkLCAxMTAgaW5zZXJ0 aW9ucygrKSwgMSBkZWxldGlvbigtKQ0KDQpkaWZmIC0tZ2l0IGEvbGlzcC9o ZWxwLW1vZGUuZWwgYi9saXNwL2hlbHAtbW9kZS5lbA0KaW5kZXggYmY2NGQw MzJiNi4uMTVmZDIzYzFjZCAxMDA2NDQNCi0tLSBhL2xpc3AvaGVscC1tb2Rl LmVsDQorKysgYi9saXNwL2hlbHAtbW9kZS5lbA0KQEAgLTI1Miw2ICsyNTIs OTEgQEAgJ2hlbHAtY3VzdG9taXplLWZhY2UNCiAJCSAgIChjdXN0b21pemUt ZmFjZSB2KSkNCiAgICdoZWxwLWVjaG8gKHB1cmVjb3B5ICJtb3VzZS0yLCBS RVQ6IGN1c3RvbWl6ZSBmYWNlIikpDQogDQorKGRlZnVuIGhlbHAtZnVuY3Rp b24tZGVmLS1maW5kLXByb2JhYmxlLWRlZmluaXRpb24tcGxhY2UgKGZ1bikN CisgICJGaW5kIHRoZSBmdW5jdGlvbiBpbiB3aGljaCBGVU4gd2FzIGxpa2Vs eSBkZWZpbmVkLg0KK0ZVTiBpcyB0aGUgc3ltYm9sIG9mIGEgZnVuY3Rpb24u DQorVGhlIGN1cnJlbnQgYnVmZmVyIG11c3QgYmUgdmlzaXRpbmcgdGhlIGZp bGUgaW4gd2hpY2ggdGhlDQorZnVuY3Rpb24gd2FzIGRlZmluZWQgKHNlZSBg c3ltYm9sLWZpbGUnKS4NCitJZiB0aGUgZnVuY3Rpb24gaW4gd2hpY2ggRlVO IHdhcyBsaWtlbHkgZGVmaW5lZCBpcyBmb3VuZCwgcmV0dXJuDQorYSBjb25z IHdpdGggaXRzIG5hbWUgYW5kIGl0cyBiZWdpbm5pbmcgcG9zaXRpb24uDQor T3RoZXJ3aXNlLCByZXR1cm4gbmlsLiINCisgIChzYXZlLWV4Y3Vyc2lvbg0K KyAgICA7OyBCdWlsZCBhIGxpc3Qgb2Ygc3RyaW5ncyB3aXRoIHRoZSBzeW1i b2xzIChhbmQgc3RyaW5ncykgb2YgRlVOLg0KKyAgICAobGV0ICgobmFtZXMN CisgICAgICAgICAgIChtYXBjYXIgKGxhbWJkYSAoZWwpDQorICAgICAgICAg ICAgICAgICAgICAgKGNvbmNhdA0KKyAgICAgICAgICAgICAgICAgICAgICAi XFxfPCINCisgICAgICAgICAgICAgICAgICAgICAgKHJlZ2V4cC1xdW90ZSAo Zm9ybWF0ICIlcyIgZWwpKQ0KKyAgICAgICAgICAgICAgICAgICAgICAiXFxf PiIpKQ0KKyAgICAgICAgICAgICAgICAgICAoZmxhdHRlbi10cmVlIChzeW1i b2wtZnVuY3Rpb24gZnVuKSkpKQ0KKyAgICAgICAgICByZXN1bHRzKQ0KKyAg ICAgIChkZWxldGUtZHVwcyBuYW1lcykNCisgICAgICAod2hlbiBuYW1lcw0K KyAgICAgICAgOzsgQnVpbGQgYW4gYWxpc3Qgd2l0aCBhbGwgZnVuY3Rpb25z IGluIHdoaWNoIGVhY2ggc3ltYm9sIGlzDQorICAgICAgICA7OyBmb3VuZC4N CisgICAgICAgIChkb2xpc3QgKGVsIG5hbWVzKQ0KKyAgICAgICAgICA7OyBF eGNsdWRlIHN5bWJvbHMgdGhhdCBhcmUgMyBjaGFyYWN0ZXJzIG9yIGxlc3Mu DQorICAgICAgICAgICh3aGVuICg+IChsZW5ndGggZWwpIDkpDQorICAgICAg ICAgICAgKGxldCAocmVzdWx0KQ0KKyAgICAgICAgICAgICAgKGdvdG8tY2hh ciAocG9pbnQtbWluKSkNCisgICAgICAgICAgICAgICh3aGlsZSAocmUtc2Vh cmNoLWZvcndhcmQgZWwgbmlsIHQpDQorICAgICAgICAgICAgICAgIChwdXNo IChsaXNwLWN1cnJlbnQtZGVmdW4tbmFtZSkgcmVzdWx0KSkNCisgICAgICAg ICAgICAgIChkZWxldGUtZHVwcyByZXN1bHQpDQorICAgICAgICAgICAgICAo d2hlbiByZXN1bHQNCisgICAgICAgICAgICAgICAgKHB1c2ggKGNvbnMgZWwg cmVzdWx0KSByZXN1bHRzKSkpKSkNCisgICAgICAgICh3aGVuIHJlc3VsdHMN CisgICAgICAgICAgOzsgRmlyc3QgY2hlY2sgaWYgb25lIG9mIHRoZSBzeW1i b2xzIGlzIGZvdW5kIGluIGEgc2luZ2xlDQorICAgICAgICAgIDs7IGZ1bmN0 aW9uLg0KKyAgICAgICAgICAobGV0ICgoZWwgKGNhdGNoICdmb3VuZA0KKyAg ICAgICAgICAgICAgICAgICAgICAocHJvZ24NCisgICAgICAgICAgICAgICAg ICAgICAgKG1hcGNhcg0KKyAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJk YSAoZWwpDQorICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoPSAobGVu Z3RoIGVsKSAyKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRo cm93ICdmb3VuZCAoY2FyIGVsKSkpKQ0KKyAgICAgICAgICAgICAgICAgICAg ICAgcmVzdWx0cykpKSkpDQorICAgICAgICAgICAgKGlmIChzdHJpbmdwIGVs KQ0KKyAgICAgICAgICAgICAgICA7OyBJZiBvbmUgc3VjaCBmdW5jdGlvbiB3 YXMgZm91bmQsIGl0J3MgdGhlIGZ1bmN0aW9uDQorICAgICAgICAgICAgICAg IDs7IHdlIGFyZSBhZnRlci4NCisgICAgICAgICAgICAgICAgKHByb2duDQor ICAgICAgICAgICAgICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkNCisg ICAgICAgICAgICAgICAgICAocmUtc2VhcmNoLWZvcndhcmQgZWwgbmlsIHQp DQorICAgICAgICAgICAgICAgICAgKGJlZ2lubmluZy1vZi1kZWZ1bikNCisg ICAgICAgICAgICAgICAgICAoY29ucyAobGlzcC1jdXJyZW50LWRlZnVuLW5h bWUpIChwb2ludCkpKQ0KKyAgICAgICAgICAgICAgOzsgT3RoZXJ3aXNlLCBm aW5kIHdoaWNoIGZ1bmN0aW9uIGNvbnRhaW5zIHRoZSBtb3N0DQorICAgICAg ICAgICAgICA7OyBzeW1ib2xzIGluIEZVTi4NCisgICAgICAgICAgICAgIChs ZXQgKHBsYWNlcykNCisgICAgICAgICAgICAgICAgKGRvbGlzdCAoZWwgcmVz dWx0cykNCisgICAgICAgICAgICAgICAgICAoZG9saXN0IChlIChjZHIgZWwp KQ0KKyAgICAgICAgICAgICAgICAgICAgKHB1c2ggZSBwbGFjZXMpKSkNCisg ICAgICAgICAgICAgICAgKGxldCogKChzb3J0ZWQtcGxhY2VzIChzb3J0IHBs YWNlcyAjJ3N0cmluZzwpKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgKHB0 ciBzb3J0ZWQtcGxhY2VzKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgKGNv dW50IDEpDQorICAgICAgICAgICAgICAgICAgICAgICAobWF4IDApDQorICAg ICAgICAgICAgICAgICAgICAgICByZXN1bHQpDQorICAgICAgICAgICAgICAg ICAgKHdoaWxlIHB0cg0KKyAgICAgICAgICAgICAgICAgICAgKGlmIChzdHJp bmc9IChjYXIgcHRyKSAoY2FkciBwdHIpKQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgIChzZXRxIGNvdW50ICgxKyBjb3VudCkpDQorICAgICAgICAgICAg ICAgICAgICAgICh3aGVuICg+IGNvdW50IG1heCkNCisgICAgICAgICAgICAg ICAgICAgICAgICAoc2V0cSBtYXggY291bnQpDQorICAgICAgICAgICAgICAg ICAgICAgICAgKHNldHEgcmVzdWx0IChjYXIgcHRyKSkpDQorICAgICAgICAg ICAgICAgICAgICAgIChzZXRxIGNvdW50IDEpKQ0KKyAgICAgICAgICAgICAg ICAgICAgKHNldHEgcHRyIChjZHIgcHRyKSkpDQorICAgICAgICAgICAgICAg ICAgKHdoZW4gcmVzdWx0DQorICAgICAgICAgICAgICAgICAgICA7OyBEZXRl cm1pbmUgdGhlIGJlZ2lubmluZyBwb3NpdGlvbiBvZiB0aGF0DQorICAgICAg ICAgICAgICAgICAgICA7OyBmdW5jdGlvbi4NCisgICAgICAgICAgICAgICAg ICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpDQorICAgICAgICAgICAgICAg ICAgICAod2hlbiAoY2F0Y2ggJ2ZvdW5kDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICh3aGlsZSAocmUtc2VhcmNoLWZvcndhcmQNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29uY2F0ICJcXF88Ig0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KHJlZ2V4cC1xdW90ZSByZXN1bHQpDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAiXFxfPiIpKQ0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICh3aGVuIChzdHJpbmc9IChsaXNwLWN1cnJl bnQtZGVmdW4tbmFtZSkNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICByZXN1bHQpDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAodGhyb3cgJ2ZvdW5kIHQpKSkNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHRocm93ICdmb3VuZCBuaWwpKQ0KKyAgICAg ICAgICAgICAgICAgICAgICAoYmVnaW5uaW5nLW9mLWRlZnVuKQ0KKyAgICAg ICAgICAgICAgICAgICAgICAoY29ucyByZXN1bHQgKHBvaW50KSkpKSkpKSkp KSkpKQ0KKw0KIChkZWZ1biBoZWxwLWZ1bmN0aW9uLWRlZi0tYnV0dG9uLWZ1 bmN0aW9uIChmdW4gJm9wdGlvbmFsIGZpbGUgdHlwZSkNCiAgIChvciBmaWxl DQogICAgICAgKHNldHEgZmlsZSAoZmluZC1saXNwLW9iamVjdC1maWxlLW5h bWUgZnVuIHR5cGUpKSkNCkBAIC0yODEsNyArMzY2LDMxIEBAIGhlbHAtZnVu Y3Rpb24tZGVmLS1idXR0b24tZnVuY3Rpb24NCiAgICAgICAgICAgICAodW5s ZXNzICg9IChwb2ludCkgcG9zaXRpb24pDQogICAgICAgICAgICAgICAocHVz aC1tYXJrIG5pbCB0KSkNCiAgICAgICAgICAgICAoZ290by1jaGFyIHBvc2l0 aW9uKSkNCi0gICAgICAgIChtZXNzYWdlICJVbmFibGUgdG8gZmluZCBsb2Nh dGlvbiBpbiBmaWxlIikpKSkpDQorICAgICAgICAobGV0ICgocHJvYmFibGUt ZGVmaW5pdGlvbi1wbGFjZQ0KKyAgICAgICAgICAgICAgIChoZWxwLWZ1bmN0 aW9uLWRlZi0tZmluZC1wcm9iYWJsZS1kZWZpbml0aW9uLXBsYWNlIGZ1bikp KQ0KKyAgICAgICAgICAod2hlbiBwcm9iYWJsZS1kZWZpbml0aW9uLXBsYWNl DQorICAgICAgICAgICAgKGdvdG8tY2hhciAoY2RyIHByb2JhYmxlLWRlZmlu aXRpb24tcGxhY2UpKSkNCisgICAgICAgICAgKGxldCAoKGhlbHAtYnVmZmVy LXVuZGVyLXByZXBhcmF0aW9uIHQpKQ0KKyAgICAgICAgICAgIChoZWxwLXNl dHVwLXhyZWYgKGxpc3QgIydoZWxwLWZ1bmN0aW9uLWRlZi0tYnV0dG9uLWZ1 bmN0aW9uDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBm dW4gZmlsZSkNCisJCSAgICAgICAgICAgICAoY2FsbGVkLWludGVyYWN0aXZl bHktcCAnaW50ZXJhY3RpdmUpKQ0KKwkgICAgKHdpdGgtaGVscC13aW5kb3cg KGhlbHAtYnVmZmVyKQ0KKwkgICAgICAoaW5zZXJ0IChzdWJzdGl0dXRlLWNv bW1hbmQta2V5cw0KKyAgICAgICAgICAgICAgICAgICAgICAgKGZvcm1hdCAi RnVuY3Rpb24gJXMgY291bGQgbm90IGJlIGZvdW5kIGluIGAlcycuXG5cbiIN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW4gKGZpbGUtbmFt ZS1ub25kaXJlY3RvcnkgZmlsZSkpKSkNCisgICAgICAgICAgICAgIChzZXRx IGhlbHAtbW9kZS0tY3VycmVudC1kYXRhIChsaXN0IDpzeW1ib2wgZnVuDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6ZmlsZSBmaWxlKSkNCisJICAgICAgKHNhdmUtZXhjdXJzaW9uDQor CSAgICAgICAgKHJlLXNlYXJjaC1iYWNrd2FyZA0KKyAgICAgICAgICAgICAg ICAgKHN1YnN0aXR1dGUtY29tbWFuZC1rZXlzICJgXFwoW15gJ10rXFwpJyIp DQorICAgICAgICAgICAgICAgICBuaWwgdCkNCisJICAgICAgICAoaGVscC14 cmVmLWJ1dHRvbiAxICdoZWxwLWZ1bmN0aW9uLWRlZiBmdW4gZmlsZSkpDQor ICAgICAgICAgICAgICAod2hlbiBwcm9iYWJsZS1kZWZpbml0aW9uLXBsYWNl DQorICAgICAgICAgICAgICAgIChpbnNlcnQgKHN1YnN0aXR1dGUtY29tbWFu ZC1rZXlzDQorICAgICAgICAgICAgICAgICAgICAgICAgIChmb3JtYXQgIkl0 IHdhcyBwcm9iYWJseSBkZWZpbmVkIGJ5IGAlcycuXG5cbiINCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChjYXIgcHJvYmFibGUtZGVmaW5p dGlvbi1wbGFjZSkpKSkpDQorCSAgICAgIChpbnNlcnQgIkZ1bmN0aW9uIGRl ZmluaXRpb246XG5cbiIpDQorCSAgICAgIChpbnNlcnQgKHBwLXRvLXN0cmlu ZyAoc3ltYm9sLWZ1bmN0aW9uIGZ1bikpKSkpKSkpKSkNCiANCiAoZGVmaW5l LWJ1dHRvbi10eXBlICdoZWxwLWZ1bmN0aW9uLWRlZg0KICAgOnN1cGVydHlw ZSAnaGVscC14cmVmDQotLSANCjIuMzkuMA0KDQo= --fvTIG9ynrp--
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 6 Jan 2023 08:39:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 03:39:13 2023 Received: from localhost ([127.0.0.1]:53772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDiFt-0005Hq-3Z for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 03:39:13 -0500 Received: from mout01.posteo.de ([185.67.36.65]:58907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1pDiFq-0005HZ-L0 for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 03:39:11 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 73A462403F0 for <60568 <at> debbugs.gnu.org>; Fri, 6 Jan 2023 09:39:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672994344; bh=1iy+pRbuBGNazZLCq0QBRDGt/yCJ4p0YGtQEXj5/lDE=; h=From:To:Cc:Subject:Date:From; b=VqKA6gxedFQsJFnvGJ9GzmG+X53HDcqK0xfadfdRg8A8qnxqYK+illMzCYq20FrhM 810yW1/JTpcEgzDBJHPRYfXeiDvKq54DhIZD6l5UqwoDT13D3BbK1xnV4vfNguOdu7 9sRsRkULR9PLtablF6fl955muonWAXElWxZcwmSQ3J+ajrx7jn918vuJl/mEYDdURk hBIZ5ovuRko3xMApU/a3EH/9ZOqtvsS8dVNpbMm2IRVTSQIzym+h+2LcvAOYq50t+c Ej4/6b31aN8Vd9z6s9kiPQmpJINM2g0/InYtjv9kgQ4EtIJKf735PPLNKlOCqlQJPd 2x/LRRBbcxZog== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NpGw65Gwsz6tnh; Fri, 6 Jan 2023 09:39:02 +0100 (CET) From: Ihor Radchenko <yantar92@HIDDEN> To: Jean Louis <bugs@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <Y7cCQnkU6ZyZSDZ0@HIDDEN> References: <87fscpifdw.fsf@localhost> <Y7cCQnkU6ZyZSDZ0@HIDDEN> Date: Fri, 06 Jan 2023 08:39:30 +0000 Message-ID: <87a62wdpkt.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Jean Louis <bugs@HIDDEN> writes: > with body being: > > (defun hyperscope-add-new-note-hyperdocument nil (interactive) (let* ((parent (hyperscope-set-parent-or-select)) (markup (hyperscope-markup-select)) (related-person-by-parent (if parent (progn (hyperscope-related-person-id parent)))) (related-person (if (and related-person-by-parent (y-or-n-p (format "Is Hyperdocument related to `%s'? " (cf-people-name related-person-by-parent)))) (progn related-person-by-parent))) (prompt (format "New `%s' hyperdocument name: " type-name)) (name (rcd-ask prompt)) (hyperdocument (hyperscope-add-generic name "" markup id nil parent nil nil nil related-person))) (hyperscope-ring hyperdocument) (hyperscope-revert hyperdocument))) > > Which I know is not very readable, but is still something useful. Try `pp' to auto-format the body. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 6 Jan 2023 06:34:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 06 01:34:59 2023 Received: from localhost ([127.0.0.1]:53598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDgJe-00023h-S6 for submit <at> debbugs.gnu.org; Fri, 06 Jan 2023 01:34:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDgJc-00023V-JV for 60568 <at> debbugs.gnu.org; Fri, 06 Jan 2023 01:34:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDgJV-0000N3-Fp; Fri, 06 Jan 2023 01:34:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YNK3TCD35t5RtoYufivfVSrtWhX3wLXZsLmZv+pb3Vo=; b=YEXqfr3xpiSz 9e/ccwg3Hw93Z6/t7l+AgDlHJNCctM8elhkKckdMp4/Up+itt1ROSIbIkLsYl3wKrv2x3kvzdPzGE VDf8eI29Ish5BTmGnJZjA3j0C2uWSo3M2CxlSk+u6dpVklHy9zv2jGZVUBQPwSuo2cgUmaxE3xC3d CkvhToA2v1po6uAKMPikd7e/uPUBwCGeC4opCiOKZuTFKSU3/AaDxKXf/CSF11KjuN9tF0x69Pk4w w9QVCiLdA6N2fyhJLJN5L4S+unFEeA4Yp1ZZMpGQWJodQj8tyI6w8QJPaY2Li7ntjLQ76Er+aEvWy I+WuyGDLV6VuOtacZVXDxw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDgJS-0005jg-Ux; Fri, 06 Jan 2023 01:34:49 -0500 Date: Fri, 06 Jan 2023 08:35:02 +0200 Message-Id: <83cz7sw4q1.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Gregory Heytings <gregory@HIDDEN>, Stefan Monnier <monnier@HIDDEN> In-Reply-To: <8dea9f3e0ea1de84c49a@HIDDEN> (message from Gregory Heytings on Thu, 05 Jan 2023 20:44:21 +0000) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> <8dea9f3e0ea1de84c49a@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Thu, 05 Jan 2023 20:44:21 +0000 > From: Gregory Heytings <gregory@HIDDEN> > cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN > > > I hope that in a more general case we could use something similar, since > > every definition of a function should start from "defun " followed by > > some part of its name, right? > > > > Not always, I can imagine functions defined with fset for example. > > What about the attached patch? It seems to work well. SGTM. With which cases did you test this? Adding Stefan, in case he has any comments.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 20:44:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 15:44:25 2023 Received: from localhost ([127.0.0.1]:53045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDX68-0004No-HK for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 15:44:24 -0500 Received: from heytings.org ([95.142.160.155]:60418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDX66-0004Nd-Sb for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 15:44:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672951461; bh=PwXiqOO2EkVoAl+cGJOX/LzCrPymok+JHVVSxxTlJHo=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=8n6BbLfCWUlPicZ6/ryMm3AbJlf4IUjB9BlQFDluT8zM/gvLscsPmsWf5WlFL/8BA thSFxVXWnm0Jn4G/F6ZvjxkMLv2gRy3yzeSFE7LFnPPjcIMjL9KZbeB/0br+ZSB5TG tA0eCSwXmoIQ9hmdTW9nPtYur540WRiGIwK4Sl9Uxwt9BYBOCzJ15z7EGJ/KwO27g6 QV8pef0Lpckm7NiNWvq5eFOg1M2SXZX4c4YWv/nymG2fj4uKIOukwDIhSpgoHYJqnt M4EjBQah9CGRFnj9XIHo6gWHfFxEnee1lWr0wGmMRxrQc3fwsUESATUvL/m4ZsLOHq Lotyo82CUBbzw== Date: Thu, 05 Jan 2023 20:44:21 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <83mt6xvsct.fsf@HIDDEN> Message-ID: <8dea9f3e0ea1de84c49a@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> <83mt6xvsct.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="AgRskj2K88" Content-ID: <8dea9f3e0ece614cf680@HIDDEN> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --AgRskj2K88 Content-Type: text/plain; charset=us-ascii; format=flowed Content-ID: <8dea9f3e0e77b69b38ab@HIDDEN> >>> Well, searching for the regexp "defun .*org-babel-execute:" would have >>> done that, right? >> >> In this specific case, yes. But in general? > > I hope that in a more general case we could use something similar, since > every definition of a function should start from "defun " followed by > some part of its name, right? > Not always, I can imagine functions defined with fset for example. What about the attached patch? It seems to work well. --AgRskj2K88 Content-Type: text/x-diff; name=Try-to-find-where-dynamically-defined-functions-were.patch; charset=us-ascii Content-Transfer-Encoding: base64 Content-ID: <8dea9f3e0e7c5aa74f2f@HIDDEN> Content-Disposition: attachment; filename=Try-to-find-where-dynamically-defined-functions-were.patch RnJvbSAzOGQwOTQxYmI4N2MwYjQ2ZjI3ZWI0Y2Y0OTZmMjRiYmEwNzFkOTgy IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBUaHUsIDUgSmFu IDIwMjMgMjA6NDE6MzcgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gVHJ5IHRv IGZpbmQgd2hlcmUgZHluYW1pY2FsbHkgZGVmaW5lZCBmdW5jdGlvbnMgd2Vy ZSBkZWZpbmVkDQoNCiogbGlzcC9oZWxwLW1vZGUuZWwNCihoZWxwLWZ1bmN0 aW9uLWRlZi0tZmluZC1wcm9iYWJsZS1kZWZpbml0aW9uLXBsYWNlKTogTmV3 IGZ1bmN0aW9uLg0KKGhlbHAtZnVuY3Rpb24tZGVmLS1idXR0b24tZnVuY3Rp b24pOiBVc2UgaXQuICBTZWUgYnVnIzYwNTY4Lg0KLS0tDQogbGlzcC9oZWxw LW1vZGUuZWwgfCA5NCArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrLQ0KIDEgZmlsZSBjaGFuZ2VkLCA5MyBpbnNlcnRp b25zKCspLCAxIGRlbGV0aW9uKC0pDQoNCmRpZmYgLS1naXQgYS9saXNwL2hl bHAtbW9kZS5lbCBiL2xpc3AvaGVscC1tb2RlLmVsDQppbmRleCBiZjY0ZDAz MmI2Li41NDJjNDc3Nzg5IDEwMDY0NA0KLS0tIGEvbGlzcC9oZWxwLW1vZGUu ZWwNCisrKyBiL2xpc3AvaGVscC1tb2RlLmVsDQpAQCAtMjUyLDYgKzI1Miw4 NyBAQCAnaGVscC1jdXN0b21pemUtZmFjZQ0KIAkJICAgKGN1c3RvbWl6ZS1m YWNlIHYpKQ0KICAgJ2hlbHAtZWNobyAocHVyZWNvcHkgIm1vdXNlLTIsIFJF VDogY3VzdG9taXplIGZhY2UiKSkNCiANCisoZGVmdW4gaGVscC1mdW5jdGlv bi1kZWYtLWZpbmQtcHJvYmFibGUtZGVmaW5pdGlvbi1wbGFjZSAoZnVuKQ0K KyAgIkZpbmQgdGhlIGZ1bmN0aW9uIGluIHdoaWNoIEZVTiB3YXMgbGlrZWx5 IGRlZmluZWQuDQorRlVOIGlzIHRoZSBib2R5IG9mIGEgZnVuY3Rpb24sIHJl dHVybmVkIGJ5IGBzeW1ib2wtZnVuY3Rpb24nLg0KK1RoZSBjdXJyZW50IGJ1 ZmZlciBtdXN0IGJlIHZpc2l0aW5nIHRoZSBmaWxlIGluIHdoaWNoIHRoZQ0K K2Z1bmN0aW9uIHdhcyBkZWZpbmVkIChzZWUgYHN5bWJvbC1maWxlJykuDQor SWYgdGhlIGZ1bmN0aW9uIGlzIGZvdW5kLCByZXR1cm4gYSBjb25zIHdpdGgg aXRzIG5hbWUgYW5kIGl0cw0KK2JlZ2lubmluZyBwb3NpdGlvbi4NCitPdGhl cndpc2UsIHJldHVybiBuaWwuIg0KKyAgKHNhdmUtZXhjdXJzaW9uDQorICAg IDs7IEJ1aWxkIGEgbGlzdCBvZiBzdHJpbmdzIHdpdGggdGhlIHN5bWJvbHMg KGFuZCBzdHJpbmdzKSBvZiBGVU4uDQorICAgIChsZXQgKChuYW1lcw0KKyAg ICAgICAgICAgKG1hcGNhciAobGFtYmRhIChlbCkNCisgICAgICAgICAgICAg ICAgICAgICAoY29uY2F0DQorICAgICAgICAgICAgICAgICAgICAgICJcXF88 Ig0KKyAgICAgICAgICAgICAgICAgICAgICAocmVnZXhwLXF1b3RlIChmb3Jt YXQgIiVzIiBlbCkpDQorICAgICAgICAgICAgICAgICAgICAgICJcXF8+Iikp DQorICAgICAgICAgICAgICAgICAgIChmbGF0dGVuLXRyZWUgKHN5bWJvbC1m dW5jdGlvbiBmdW4pKSkpDQorICAgICAgICAgIHJlc3VsdHMpDQorICAgICAg KGRlbGV0ZS1kdXBzIG5hbWVzKQ0KKyAgICAgICh3aGVuIG5hbWVzDQorICAg ICAgICA7OyBCdWlsZCBhbiBhbGlzdCB3aXRoIGFsbCBmdW5jdGlvbnMgaW4g d2hpY2ggZWFjaCBzeW1ib2wgaXMNCisgICAgICAgIDs7IGZvdW5kLg0KKyAg ICAgICAgKGRvbGlzdCAoZWwgbmFtZXMpDQorICAgICAgICAgIDs7IEV4Y2x1 ZGUgc3ltYm9scyB0aGF0IGFyZSAzIGNoYXJhY3RlcnMgb3IgbGVzcy4NCisg ICAgICAgICAgKHdoZW4gKD4gKGxlbmd0aCBlbCkgOSkNCisgICAgICAgICAg ICAobGV0IChyZXN1bHQpDQorICAgICAgICAgICAgICAoZ290by1jaGFyIChw b2ludC1taW4pKQ0KKyAgICAgICAgICAgICAgKHdoaWxlIChyZS1zZWFyY2gt Zm9yd2FyZCBlbCBuaWwgdCkNCisgICAgICAgICAgICAgICAgKHB1c2ggKGxp c3AtY3VycmVudC1kZWZ1bi1uYW1lKSByZXN1bHQpKQ0KKyAgICAgICAgICAg ICAgKGRlbGV0ZS1kdXBzIHJlc3VsdCkNCisgICAgICAgICAgICAgICh3aGVu IHJlc3VsdA0KKyAgICAgICAgICAgICAgICAocHVzaCAoY29ucyBlbCByZXN1 bHQpIHJlc3VsdHMpKSkpKQ0KKyAgICAgICAgKHdoZW4gcmVzdWx0cw0KKyAg ICAgICAgICA7OyBGaXJzdCBjaGVjayBpZiBvbmUgb2YgdGhlIHN5bWJvbHMg aXMgZm91bmQgaW4gYSBzaW5nbGUNCisgICAgICAgICAgOzsgZnVuY3Rpb24u DQorICAgICAgICAgIChsZXQgKChlbCAoY2F0Y2ggJ2ZvdW5kDQorICAgICAg ICAgICAgICAgICAgICAgIChtYXBjYXINCisgICAgICAgICAgICAgICAgICAg ICAgIChsYW1iZGEgKGVsKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAo aWYgKD0gKGxlbmd0aCBlbCkgMikNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICh0aHJvdyAnZm91bmQgKGNhciBlbCkpKSkNCisgICAgICAgICAg ICAgICAgICAgICAgIHJlc3VsdHMpKSkpDQorICAgICAgICAgICAgKGlmIChz dHJpbmdwIGVsKQ0KKyAgICAgICAgICAgICAgICA7OyBJZiBvbmUgc3VjaCBm dW5jdGlvbiB3YXMgZm91bmQsIGl0J3MgdGhlIGZ1bmN0aW9uDQorICAgICAg ICAgICAgICAgIDs7IHdlIGFyZSBhZnRlci4NCisgICAgICAgICAgICAgICAg KHByb2duDQorICAgICAgICAgICAgICAgICAgKGdvdG8tY2hhciAocG9pbnQt bWluKSkNCisgICAgICAgICAgICAgICAgICAocmUtc2VhcmNoLWZvcndhcmQg ZWwgbmlsIHQpDQorICAgICAgICAgICAgICAgICAgKGJlZ2lubmluZy1vZi1k ZWZ1bikNCisgICAgICAgICAgICAgICAgICAoY29ucyAobGlzcC1jdXJyZW50 LWRlZnVuLW5hbWUpIChwb2ludCkpKQ0KKyAgICAgICAgICAgICAgOzsgT3Ro ZXJ3aXNlLCBmaW5kIHdoaWNoIGZ1bmN0aW9uIGNvbnRhaW5zIHRoZSBtb3N0 DQorICAgICAgICAgICAgICA7OyBzeW1ib2xzIGluIEZVTi4NCisgICAgICAg ICAgICAgIChsZXQgKHBsYWNlcykNCisgICAgICAgICAgICAgICAgKGRvbGlz dCAoZWwgcmVzdWx0cykNCisgICAgICAgICAgICAgICAgICAoZG9saXN0IChl IChjZHIgZWwpKQ0KKyAgICAgICAgICAgICAgICAgICAgKHB1c2ggZSBwbGFj ZXMpKSkNCisgICAgICAgICAgICAgICAgKGxldCogKChzb3J0ZWQtcGxhY2Vz IChzb3J0IHBsYWNlcyAjJ3N0cmluZzwpKQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgKHB0ciBzb3J0ZWQtcGxhY2VzKQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgKGNvdW50IDEpDQorICAgICAgICAgICAgICAgICAgICAgICAobWF4 IDApDQorICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQpDQorICAgICAg ICAgICAgICAgICAgKHdoaWxlIHB0cg0KKyAgICAgICAgICAgICAgICAgICAg KGlmIChzdHJpbmc9IChjYXIgcHRyKSAoY2FkciBwdHIpKQ0KKyAgICAgICAg ICAgICAgICAgICAgICAgIChzZXRxIGNvdW50ICgxKyBjb3VudCkpDQorICAg ICAgICAgICAgICAgICAgICAgICh3aGVuICg+IGNvdW50IG1heCkNCisgICAg ICAgICAgICAgICAgICAgICAgICAoc2V0cSBtYXggY291bnQpDQorICAgICAg ICAgICAgICAgICAgICAgICAgKHNldHEgcmVzdWx0IChjYXIgcHRyKSkpDQor ICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGNvdW50IDEpKQ0KKyAgICAg ICAgICAgICAgICAgICAgKHNldHEgcHRyIChjZHIgcHRyKSkpDQorICAgICAg ICAgICAgICAgICAgKHdoZW4gcmVzdWx0DQorICAgICAgICAgICAgICAgICAg ICA7OyBEZXRlcm1pbmUgdGhlIGJlZ2lubmluZyBwb3NpdGlvbiBvZiB0aGF0 DQorICAgICAgICAgICAgICAgICAgICA7OyBmdW5jdGlvbi4NCisgICAgICAg ICAgICAgICAgICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpDQorICAgICAg ICAgICAgICAgICAgICAoY2F0Y2ggJ2ZvdW5kDQorICAgICAgICAgICAgICAg ICAgICAgICh3aGlsZSAocmUtc2VhcmNoLWZvcndhcmQNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoY29uY2F0ICJcXF88IiAocmVnZXhwLXF1 b3RlIHJlc3VsdCkgIlxcXz4iKSkNCisgICAgICAgICAgICAgICAgICAgICAg ICAod2hlbiAoc3RyaW5nPSAobGlzcC1jdXJyZW50LWRlZnVuLW5hbWUpDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0 KQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdmb3VuZCBu aWwpKSkpDQorICAgICAgICAgICAgICAgICAgICAoYmVnaW5uaW5nLW9mLWRl ZnVuKQ0KKyAgICAgICAgICAgICAgICAgICAgKGNvbnMgcmVzdWx0IChwb2lu dCkpKSkpKSkpKSkpKQ0KKw0KIChkZWZ1biBoZWxwLWZ1bmN0aW9uLWRlZi0t YnV0dG9uLWZ1bmN0aW9uIChmdW4gJm9wdGlvbmFsIGZpbGUgdHlwZSkNCiAg IChvciBmaWxlDQogICAgICAgKHNldHEgZmlsZSAoZmluZC1saXNwLW9iamVj dC1maWxlLW5hbWUgZnVuIHR5cGUpKSkNCkBAIC0yODEsNyArMzYyLDE4IEBA IGhlbHAtZnVuY3Rpb24tZGVmLS1idXR0b24tZnVuY3Rpb24NCiAgICAgICAg ICAgICAodW5sZXNzICg9IChwb2ludCkgcG9zaXRpb24pDQogICAgICAgICAg ICAgICAocHVzaC1tYXJrIG5pbCB0KSkNCiAgICAgICAgICAgICAoZ290by1j aGFyIHBvc2l0aW9uKSkNCi0gICAgICAgIChtZXNzYWdlICJVbmFibGUgdG8g ZmluZCBsb2NhdGlvbiBpbiBmaWxlIikpKSkpDQorICAgICAgICAobGV0ICgo cHJvYmFibGUtZGVmaW5pdGlvbi1wbGFjZQ0KKyAgICAgICAgICAgICAgICho ZWxwLWZ1bmN0aW9uLWRlZi0tZmluZC1wcm9iYWJsZS1kZWZpbml0aW9uLXBs YWNlIGZ1bikpKQ0KKyAgICAgICAgICAod2hlbiBwcm9iYWJsZS1kZWZpbml0 aW9uLXBsYWNlDQorICAgICAgICAgICAgKGdvdG8tY2hhciAoY2RyIHByb2Jh YmxlLWRlZmluaXRpb24tcGxhY2UpKSkNCisJICAod2l0aC1oZWxwLXdpbmRv dyAoaGVscC1idWZmZXIpDQorCSAgICAoaW5zZXJ0IChmb3JtYXQgIkZ1bmN0 aW9uICVzIGNvdWxkIG5vdCBiZSBmb3VuZCBpbiAlcy5cblxuIg0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICBmdW4gKGZpbGUtbmFtZS1ub25kaXJl Y3RvcnkgZmlsZSkpKQ0KKyAgICAgICAgICAgICh3aGVuIHByb2JhYmxlLWRl ZmluaXRpb24tcGxhY2UNCisgICAgICAgICAgICAgIChpbnNlcnQgKGZvcm1h dCAiSXQgd2FzIHByb2JhYmx5IGRlZmluZWQgYnkgJXMuXG5cbiINCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoY2FyIHByb2JhYmxlLWRlZmlu aXRpb24tcGxhY2UpKSkpDQorCSAgICAoaW5zZXJ0ICJGdW5jdGlvbiBkZWZp bml0aW9uOlxuXG4iKQ0KKwkgICAgKGluc2VydCAocHAtdG8tc3RyaW5nIChz eW1ib2wtZnVuY3Rpb24gZnVuKSkpKSkpKSkpDQogDQogKGRlZmluZS1idXR0 b24tdHlwZSAnaGVscC1mdW5jdGlvbi1kZWYNCiAgIDpzdXBlcnR5cGUgJ2hl bHAteHJlZg0KLS0gDQoyLjM5LjANCg0K --AgRskj2K88--
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 17:06:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 12:06:35 2023 Received: from localhost ([127.0.0.1]:52724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDThK-0006s1-SZ for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 12:06:35 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]:46419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bugs@HIDDEN>) id 1pDThJ-0006rA-84 for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 12:06:33 -0500 Received: from localhost ([::ffff:102.85.153.82]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055EB5.0000000063B7039B.00002222; Thu, 05 Jan 2023 10:06:35 -0700 Date: Thu, 5 Jan 2023 20:04:40 +0300 From: Jean Louis <bugs@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions Message-ID: <Y7cDKGdd45hVVo+H@HIDDEN> References: <87fscpifdw.fsf@localhost> <83a62xxuzs.fsf@HIDDEN> <877cy1ie9m.fsf@localhost> <835ydlxtyy.fsf@HIDDEN> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <835ydlxtyy.fsf@HIDDEN> User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: Ihor Radchenko <yantar92@HIDDEN>, 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * Eli Zaretskii <eliz@HIDDEN> [2023-01-05 11:33]: > > From: Ihor Radchenko <yantar92@HIDDEN> > > Cc: 60568 <at> debbugs.gnu.org > > Date: Thu, 05 Jan 2023 08:20:21 +0000 > > > > Eli Zaretskii <eliz@HIDDEN> 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. > > That is less desirable, IMO, then teaching Help commands to be smarter > with showing the source code. One of the main reasons to go to the > source code is to examine the surrounding code, and consider the > function in its context. This will be impossible with your proposal. It would be better to find the place where generated functions have been generated. But not bad, to show how function looks like in same time. 1. Help buffer, with button link 2. Link goes to source, but if it does not find function, it shows where it was generated and pops up temporary buffer with function definition using `symbol-function' -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 17:06:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 12:06:31 2023 Received: from localhost ([127.0.0.1]:52721 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDThH-0006rm-HW for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 12:06:31 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]:46419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bugs@HIDDEN>) id 1pDThF-0006rA-Rd for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 12:06:30 -0500 Received: from localhost ([::ffff:102.85.153.82]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D56.0000000063B70398.00002217; Thu, 05 Jan 2023 10:06:31 -0700 Date: Thu, 5 Jan 2023 20:03:03 +0300 From: Jean Louis <bugs@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions Message-ID: <Y7cCxzMUUtYDRFdH@HIDDEN> References: <87fscpifdw.fsf@localhost> <83a62xxuzs.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <83a62xxuzs.fsf@HIDDEN> User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: Ihor Radchenko <yantar92@HIDDEN>, 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * Eli Zaretskii <eliz@HIDDEN> [2023-01-05 11:11]: > 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? I have understood that as a button, hyperlink to source, like ignore is an interactive byte-compiled Lisp function in ‘subr.el’. whereby ‘subr.el’ would be the button to the source, and if it can't be found in the file, then temporary buffer may be displayed to tell what or how function is defined, like by using `symbol-function' function. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 17:06:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 12:06:28 2023 Received: from localhost ([127.0.0.1]:52718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDThE-0006rY-3d for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 12:06:28 -0500 Received: from stw1.rcdrun.com ([217.170.207.13]:46419) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bugs@HIDDEN>) id 1pDThC-0006rA-FL for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 12:06:27 -0500 Received: from localhost ([::ffff:102.85.153.82]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055EA2.0000000063B70395.0000220A; Thu, 05 Jan 2023 10:06:28 -0700 Date: Thu, 5 Jan 2023 20:00:50 +0300 From: Jean Louis <bugs@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions Message-ID: <Y7cCQnkU6ZyZSDZ0@HIDDEN> References: <87fscpifdw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87fscpifdw.fsf@localhost> User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * Ihor Radchenko <yantar92@HIDDEN> [2023-01-05 10:57]: > Recently, we have stumbled upon a situation when showing function code > is not only useful, but one of the few sane ways to examine it [3]. > Functions that are not directly written in the source but rather > generated programmatically cannot currently be easily examined using > built-in help functionality (using describe-function or other means). > The help buffer only links to the (point-min) in the library defining > the generated function - not very helpful. In contrast, helpful extracts > function body from symbol function slot. > Would it be possible to provide function body info via *Help* system in > Emacs? That would be helpful. When there is some on the fly defined function I have used `symbol-function' function to extract data and save the function in the file for later examination. ;;; SAVE FUNCTION (defun save-function () "Saves function at point" (interactive) (let ((function (function-called-at-point))) (when (and (symbolp function) (y-or-n-p (format "Save `%s'" (symbol-name function)))) (save-function-1 function)))) (defun save-function-1 (function) (let* ((fun (symbol-function function)) (type (car fun)) (file (concat rcd-temp-file-directory "function-" (symbol-name function) ".el"))) (cond ((eq type 'lambda) (setq fun (append (list 'defun function) (cdr fun)))) ((eq type 'closure) (setq fun (append (list 'defun function) (nthcdr 2 fun))))) (message (string-to-file-force (prin1-to-string fun) file)))) (defun save-function-delete () (interactive) (save-function) (beginning-of-line) (mark-sexp) (delete-active-region)) Then I would get this result, for example: -rw-r--r-- 1 668 Jan 5 19:54 function-hyperscope-add-new-note-hyperdocument.el with body being: (defun hyperscope-add-new-note-hyperdocument nil (interactive) (let* ((parent (hyperscope-set-parent-or-select)) (markup (hyperscope-markup-select)) (related-person-by-parent (if parent (progn (hyperscope-related-person-id parent)))) (related-person (if (and related-person-by-parent (y-or-n-p (format "Is Hyperdocument related to `%s'? " (cf-people-name related-person-by-parent)))) (progn related-person-by-parent))) (prompt (format "New `%s' hyperdocument name: " type-name)) (name (rcd-ask prompt)) (hyperdocument (hyperscope-add-generic name "" markup id nil parent nil nil nil related-person))) (hyperscope-ring hyperdocument) (hyperscope-revert hyperdocument))) Which I know is not very readable, but is still something useful. Thus the help buffer shall try to find function in source, but if it is not there, it shall at least show it's definition by using `symbol-function'. Problem is with byte-compiled functions: (symbol-function 'rcd-iso-date) ➜ #[0 "\300\301!\207" [format-time-string "%Y-%m-%d"] 2] -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 16:49:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 11:49:50 2023 Received: from localhost ([127.0.0.1]:52686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDTR8-0006RJ-Ce for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 11:49:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDTR5-0006R4-PP for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 11:49:48 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDTQz-0000LK-1k; Thu, 05 Jan 2023 11:49:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pdrgQcYzYV36uT7FWfGNwx93BrzYdgqIVSGLobDPNRI=; b=X5d2Z/nTqHco RyRtYBy+U4i7dbO8CHQIopF9YwKGtJUD6enAqlZLzRfogFCbTbsZEoQNbz8PLcLgnwJWG3NRwAs+W ylRZymiveKjX3SVB/FqXjE4YzjwfQraRc5dXOYQl/ZxUfl7W8lObnYcQRFP81f++DzgFwp4Tkrkq5 cbxYfjs2WW1bR592PLuvzi7rFBZOwU0ybE6Cxe/lwGRhEJAjqrqGn+ce111e/EbcBxdlSZqC028Xs BTyhl+BAxSzSliLfibKZ9CNFVqkT1jL5W2tIvM5yvr7QzGtNKMrPazzqnXGDwSuPJMAHDlC3hDZWb AZ7+3EgPCodiGGLwTFuHUg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDTQw-00005H-RF; Thu, 05 Jan 2023 11:49:40 -0500 Date: Thu, 05 Jan 2023 18:49:54 +0200 Message-Id: <83mt6xvsct.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Gregory Heytings <gregory@HIDDEN> In-Reply-To: <8dea9f3e0e160e17818f@HIDDEN> (message from Gregory Heytings on Thu, 05 Jan 2023 15:13:52 +0000) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> <8dea9f3e0e160e17818f@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Thu, 05 Jan 2023 15:13:52 +0000 > From: Gregory Heytings <gregory@HIDDEN> > cc: mardani29@HIDDEN, yantar92@HIDDEN, 60568 <at> debbugs.gnu.org > > > > > > Well, searching for the regexp "defun .*org-babel-execute:" would have > > done that, right? > > > > In this specific case, yes. But in general? I hope that in a more general case we could use something similar, since every definition of a function should start from "defun " followed by some part of its name, right?
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 15:13:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 10:13:56 2023 Received: from localhost ([127.0.0.1]:52617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDRwK-0003yR-8b for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 10:13:56 -0500 Received: from heytings.org ([95.142.160.155]:60080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDRwI-0003yI-5z for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 10:13:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672931632; bh=sa9LOvfxY08lPdwocTifhcVWkt6Mb8UFRB95eE5xTZA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=eGFOd1DG6Qo1hyCV1To/mLTyvvkUslS7U7m6uiNq8JWhgAH1xHwdkCqu091zoU90t uDXH2+AuzI9Bub1zKnGQFVsUK7I531V89TkrugQjihLTN315XVN5F4P6ysdUv7W31+ CTyB36lMuFVYyD7w6qXqY0NDOoUwD27RHlAxhXb5cPHbS2JqCh3N5b4R01kLUhcW4U FhpNKCSaixCoCOZaL8zeeZDrw3GlCrh/bmw5EjwTvrjwCuMy4K/tDGN7k0AxqRW89P m5/h4VxwugoydcwXHGlOLoIoipODiFx9oS0i/bVxwrXVGntTtXASEnx7Qg+IGAnBlx o5fPi02BFQUcg== Date: Thu, 05 Jan 2023 15:13:52 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <83pmbtvwyr.fsf@HIDDEN> Message-ID: <8dea9f3e0e160e17818f@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> <83pmbtvwyr.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > > Well, searching for the regexp "defun .*org-babel-execute:" would have > done that, right? > In this specific case, yes. But in general?
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 15:10:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 10:10:13 2023 Received: from localhost ([127.0.0.1]:52553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDRsi-0003r9-UO for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 10:10:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDRsh-0003qp-5r for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 10:10:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDRsb-0001z8-Kk; Thu, 05 Jan 2023 10:10:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=bZesfiQAbkY7b5WBqWdlFHHLmbhTYXbtJwwcaxh2UUA=; b=CMIcHagrKTEm 9fBn1XpSlTKDQW+DHxhvVxIyHjk8ehuezO1eVZvKF/jelR0FS8hGEVAFy3E5K+BRmeg7hgovMt+es 3sVIQSoaiX5lhfail7v0yUSA5HECN19Rf+PxNbaITq4xDsfzpEF5jb7l3Lyodd6CLaIxLkDVm0iJM QDr3GEViRU4Lygf8d3HVXO0fciX6Sj9ZbfOLV7p9/6PuFmCV7Ipoqm+YG6pnUlHYiFPfGnirKWEEo /xrH95aIxbKIeGCoyu5TL8PaqKiZxYcVGplhKwnjLY6Xhf5dV6RKrI/4JW+8mNhnd7r01P7VGocTI l1LlMej65xwK1r0leICQ9g==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDRsb-0006Ig-4z; Thu, 05 Jan 2023 10:10:05 -0500 Date: Thu, 05 Jan 2023 17:10:20 +0200 Message-Id: <83pmbtvwyr.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Gregory Heytings <gregory@HIDDEN> In-Reply-To: <8dea9f3e0e8e6114ffc3@HIDDEN> (message from Gregory Heytings on Thu, 05 Jan 2023 14:27:41 +0000) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> <8dea9f3e0e8e6114ffc3@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Thu, 05 Jan 2023 14:27:41 +0000 > From: Gregory Heytings <gregory@HIDDEN> > cc: mardani29@HIDDEN, yantar92@HIDDEN, 60568 <at> debbugs.gnu.org > > > >> What is missing in the five-line patch that does this? With the > >> recipe, the file in which org-babel-execute:sh was defined > >> (ob-shell.el) is opened, and the function definition is displayed. I > >> don't think we can do much better (e.g. reliably find the place where > >> the function was defined). > > > > Why not? A function definition usually has some specific keywords in > > it. It is true that someone could have obfuscated the code which > > generates a function to the degree that it would be infeasible to > > recognize, but we don't need to support such arbitrary measures, we only > > need to support what's really being used. IOW, "reliably" doesn't need > > to mean with 110% reliability. > > Hmmm, you mean try to find heuristically where e.g. in the ob-shell.el > file the org-babel-execute:sh function was defined? Yes. > The function body is this: > > (lambda > (body params) > "Execute a block of sh commands with Babel." > (let > ((shell-file-name "sh") > (org-babel-prompt-command > (or > (alist-get "sh" org-babel-shell-set-prompt-commands) > (alist-get t org-babel-shell-set-prompt-commands)))) > (org-babel-execute:shell body params))) > > and it has been created here: > > (defun org-babel-shell-initialize () > "Define execution functions associated to shell names. > This function has to be called whenever `org-babel-shell-names' > is modified outside the Customize interface." > (interactive) > (dolist (name org-babel-shell-names) > (eval `(defun ,(intern (concat "org-babel-execute:" name)) > (body params) > ,(format "Execute a block of %s commands with Babel." name) > (let ((shell-file-name ,name) > (org-babel-prompt-command > (or (alist-get ,name org-babel-shell-set-prompt-commands) > (alist-get t org-babel-shell-set-prompt-commands)))) > (org-babel-execute:shell body params)))) > (eval `(defalias ',(intern (concat "org-babel-variable-assignments:" name)) > 'org-babel-variable-assignments:shell > ,(format "Return list of %s statements assigning to the block's \ > variables." > name))) > (eval `(defvar ,(intern (concat "org-babel-default-header-args:" name)) '())))) > > Do you think there is a way to find that place? Well, searching for the regexp "defun .*org-babel-execute:" would have done that, right?
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 14:27:45 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 09:27:45 2023 Received: from localhost ([127.0.0.1]:50578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDRDd-0008RE-3Q for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 09:27:45 -0500 Received: from heytings.org ([95.142.160.155]:60028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDRDa-0008R6-Ka for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 09:27:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672928861; bh=oXNGL8B/qteWSzsiBrCFD8g2HnGXNHIyB03paFRyQmU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=QnOuXfHXcxZL1Q7iUlWX2WiOjYenrLKME2yjKsx2m7NxZKCmpRHhtob2JYnoMOkfX E4i7+8Afxm0SJPr/C3we8koIXl8aUvvkumoLg020jKMwkSIJlpSfvSnVkkBMtDdib2 jr33GiXSe6PfBJMz2KdwFbyKn0mU6nV7QD0xPOx67ZejPaHrk8RlUxkJp8xwh8zB4Q jY23kmUa5++NthuYkJ4rRF54qz1pw3FFCKbx/8XPm2w6FGLOsoYxQU1VV6XqBQLSFl fbFJTEBd5SXGkFU1mbB9YB6ZYDmxgdvfAOL8ggfWMzkFHVGO9pReJFDEnTMpkQZmH6 uBCwiDdlQV+PA== Date: Thu, 05 Jan 2023 14:27:41 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <83r0w9vzgy.fsf@HIDDEN> Message-ID: <8dea9f3e0e8e6114ffc3@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> <83r0w9vzgy.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >> What is missing in the five-line patch that does this? With the >> recipe, the file in which org-babel-execute:sh was defined >> (ob-shell.el) is opened, and the function definition is displayed. I >> don't think we can do much better (e.g. reliably find the place where >> the function was defined). > > Why not? A function definition usually has some specific keywords in > it. It is true that someone could have obfuscated the code which > generates a function to the degree that it would be infeasible to > recognize, but we don't need to support such arbitrary measures, we only > need to support what's really being used. IOW, "reliably" doesn't need > to mean with 110% reliability. > Hmmm, you mean try to find heuristically where e.g. in the ob-shell.el file the org-babel-execute:sh function was defined? The function body is this: (lambda (body params) "Execute a block of sh commands with Babel." (let ((shell-file-name "sh") (org-babel-prompt-command (or (alist-get "sh" org-babel-shell-set-prompt-commands) (alist-get t org-babel-shell-set-prompt-commands)))) (org-babel-execute:shell body params))) and it has been created here: (defun org-babel-shell-initialize () "Define execution functions associated to shell names. This function has to be called whenever `org-babel-shell-names' is modified outside the Customize interface." (interactive) (dolist (name org-babel-shell-names) (eval `(defun ,(intern (concat "org-babel-execute:" name)) (body params) ,(format "Execute a block of %s commands with Babel." name) (let ((shell-file-name ,name) (org-babel-prompt-command (or (alist-get ,name org-babel-shell-set-prompt-commands) (alist-get t org-babel-shell-set-prompt-commands)))) (org-babel-execute:shell body params)))) (eval `(defalias ',(intern (concat "org-babel-variable-assignments:" name)) 'org-babel-variable-assignments:shell ,(format "Return list of %s statements assigning to the block's \ variables." name))) (eval `(defvar ,(intern (concat "org-babel-default-header-args:" name)) '())))) Do you think there is a way to find that place? AFAIU, all elements in the function definition could be variables in the form that is evalled.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 14:16:06 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 09:16:06 2023 Received: from localhost ([127.0.0.1]:50547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDR2M-00089G-3L for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 09:16:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDR2K-00088W-3F for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 09:16:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDR2E-00028V-TK; Thu, 05 Jan 2023 09:15:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+ORhVDN6pr24NiL6O3whyxr066vLInEsKGyJkf3Tkwc=; b=jvnnBTY8CdDEiFbRRG7J JEsYEzq59Etq1VBodZMYVVa+5muoGNIsBPQDiheBGpDDiC/q/+s+EMJ+Ehl8bEyqHVAJNnDQem45Q as9xVhZuD5sV36eW131fDHUUiXc/C/XQqwDg0qiwX0axotKF3itbbVO9Dg3EGVCc52OsIDoYoeQzK ujnZEMvVMzMOG6WSn9YfvUySsxZYMuy/tos7+Zm+/S0dpy6WVQzWhBQz0jcB7El9mlXn3zVKxgIe4 40/VsblxGbQjGac5OtwYBYp7Qr9nAWuy4dVQG7wP/I4/UHNrRGKNNZlbgMi6CuzwS8DjbBIRVP3v+ u6pmG9Jt10E0hA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDR2E-0004sJ-91; Thu, 05 Jan 2023 09:15:58 -0500 Date: Thu, 05 Jan 2023 16:16:13 +0200 Message-Id: <83r0w9vzgy.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Gregory Heytings <gregory@HIDDEN> In-Reply-To: <8dea9f3e0e7865d8f3c6@HIDDEN> (message from Gregory Heytings on Thu, 05 Jan 2023 12:33:26 +0000) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> <8dea9f3e0e7865d8f3c6@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, mardani29@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Thu, 05 Jan 2023 12:33:26 +0000 > From: Gregory Heytings <gregory@HIDDEN> > cc: Daniel MartÃn <mardani29@HIDDEN>, yantar92@HIDDEN, > 60568 <at> debbugs.gnu.org > > > >> I'd prefer we teach the Help facilities how to go to the source code of > >> that kind of functions. > > > > Agreed. > > > > What is missing in the five-line patch that does this? With the recipe, > the file in which org-babel-execute:sh was defined (ob-shell.el) is > opened, and the function definition is displayed. I don't think we can do > much better (e.g. reliably find the place where the function was defined). Why not? A function definition usually has some specific keywords in it. It is true that someone could have obfuscated the code which generates a function to the degree that it would be infeasible to recognize, but we don't need to support such arbitrary measures, we only need to support what's really being used. IOW, "reliably" doesn't need to mean with 110% reliability.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 12:33:32 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 07:33:32 2023 Received: from localhost ([127.0.0.1]:50469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDPR6-0005Z7-JF for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 07:33:32 -0500 Received: from heytings.org ([95.142.160.155]:59898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDPR4-0005Yw-08 for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 07:33:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672922007; bh=mWBGbDZZwolnZiM6zgyEmG3p/DDUdfGFGq8yGoReZ/U=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=phEIvFpxP3eO/tXjOQU+AxsF6wFirAuIVY/hZ3DXl/OzgqBr7XoDT6iHx/zx4SEBw 0z2mC+RpJE+XZRZ0swY46z07F3vrKartMUFJ+/lrmIRxowVixPBej1LLVIgmrjGrTE X/RZOf2FRiFCPNcUIDegbaZNZqenfO1DIG+LijFC/ogopDHJ+nkUw8WNm4d190D+vT zNNb9fI5qOQpp52qXZ/BvHoDgc5gFTmW47mwIUznuKSZnDujYQhgMX8adKXolQAM9y 5zhQRTAkNx42QJzrU84RrcyPU6VcTMEV78JXP2LETa2e4F4Pu0Yj+F2/LXPHOTlzpy heD7l65jNlHwg== Date: Thu, 05 Jan 2023 12:33:26 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <83wn61w7lc.fsf@HIDDEN> Message-ID: <8dea9f3e0e7865d8f3c6@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> <83wn61w7lc.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org, =?UTF-8?Q?Daniel_Mart=C3=ADn?= <mardani29@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >> I'd prefer we teach the Help facilities how to go to the source code of >> that kind of functions. > > Agreed. > What is missing in the five-line patch that does this? With the recipe, the file in which org-babel-execute:sh was defined (ob-shell.el) is opened, and the function definition is displayed. I don't think we can do much better (e.g. reliably find the place where the function was defined).
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 11:20:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 06:20:41 2023 Received: from localhost ([127.0.0.1]:50390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDOIa-0007GX-Tn for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 06:20:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDOIZ-0007GL-G4 for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 06:20:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDOIU-0003Mn-5o; Thu, 05 Jan 2023 06:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Cj6XYDHlg3UrNTYwia9HHxCNNNfs8WYkFRuWGxXJZTI=; b=qany54CkpGw51hs3pA/u ZyEy/gymjCac2rY5C+nsmlkpwBFHbwijvuDGdjVBEFlXs35JrGXG9oKw8enJJJl2Jh4nIACljZIWp VTtugLZ4ofCiYS3oA8afffRXI9zeiGyuLLfI1QLhK1eoxtNtnMw9u+dN5pYmyv0q0dsQEYZvE0OcS n70wXBI26wMQfpoeBa3e15FRMQYaTsgVQ9bPzaHGeMnSnqkkcx1L2lks3fhRTxL+RPnLp5UIHj9Ja l5rj1UtEVdS4t6zMwCd77iMyoy2xuwnHqO/uO/x0C4QlEO8b9oGpMmciVaL4XE43HH6RvaLZsp4pG P6XyA1fm0vzq+Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDOIS-0002bM-MS; Thu, 05 Jan 2023 06:20:33 -0500 Date: Thu, 05 Jan 2023 13:20:47 +0200 Message-Id: <83wn61w7lc.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Daniel =?iso-8859-1?Q?Mart=EDn?= <mardani29@HIDDEN> In-Reply-To: <m1zgaxxnt0.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: yantar92@HIDDEN, 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Cc: 60568 <at> debbugs.gnu.org > Date: Thu, 05 Jan 2023 11:45:15 +0100 > From: Daniel Martín via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > Ihor Radchenko <yantar92@HIDDEN> writes: > > > Recently, we have stumbled upon a situation when showing function code > > is not only useful, but one of the few sane ways to examine it [3]. > > Functions that are not directly written in the source but rather > > generated programmatically cannot currently be easily examined using > > built-in help functionality (using describe-function or other means). > > The help buffer only links to the (point-min) in the library defining > > the generated function - not very helpful. In contrast, helpful extracts > > function body from symbol function slot. > > I'd prefer we teach the Help facilities how to go to the source code of > that kind of functions. Agreed.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 10:52:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 05:52:22 2023 Received: from localhost ([127.0.0.1]:50370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDNrB-0006Vt-W5 for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 05:52:22 -0500 Received: from mout01.posteo.de ([185.67.36.65]:59607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1pDNrA-0006Ve-4K for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 05:52:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 02A8B24046F for <60568 <at> debbugs.gnu.org>; Thu, 5 Jan 2023 11:52:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672915934; bh=JeO2CgAwoj2VT3huOyXMg2U6Mo+dgmEPRbMmnWotEYc=; h=From:To:Cc:Subject:Date:From; b=DgXLSe1kIjBMrVkTU1i32RFt4m1wrF89+rT+mw94x/Ax0+UyEF1YE1lpdv7hic0Oj J4MuqMUX/CXfBd73ga/CYuR/SdokRSXDyeCMVK3WVAyj5F3+aVNiAEml/WN2s7Mf8s 1CSClqQjB4GyX5Nrjv5RHbPgzqiqGnMrU9Mc3Q8/ecbTon+UEdKc6E7YTVG2BOqkcI tgllJ9aXCwkb8I4kQLPt2AyOex+eP60uu1coeKBMcDOzGwjkeY3BS/C7YZ9CtsPYK1 Sl8zWme83MDANLhzztuH0YPiO/EAk0dEWsZd9QblfZ3YHoYEFXpB9yWb7FEEpLRcsI 0JcMa707Joc0Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NnjwF0wHbz9rxB; Thu, 5 Jan 2023 11:52:13 +0100 (CET) From: Ihor Radchenko <yantar92@HIDDEN> To: Daniel =?utf-8?Q?Mart=C3=ADn?= <mardani29@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <m1zgaxxnt0.fsf@HIDDEN> References: <87fscpifdw.fsf@localhost> <m1zgaxxnt0.fsf@HIDDEN> Date: Thu, 05 Jan 2023 10:52:45 +0000 Message-ID: <87a62xfe2q.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Daniel Mart=C3=ADn <mardani29@HIDDEN> writes: > I'd prefer we teach the Help facilities how to go to the source code of > that kind of functions. Some years ago, I added support for go to > definition from *Help* buffers when the symbol was generated by a Lisp > macro; there's no reason we couldn't extend the code to also handle this > particular case. Could you point to the implementation? > Showing the source code inline is something I feel more suitable for > third-party packages. It is probably more interesting from a core Emacs > perspective to make sure that help-mode provides the appropriate hooks > for users and packages to customize what to show without needing to > reimplement *Help* from scratch. I don't know what other people think, > my opinion about this may be a minority. +1 from me. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 10:45:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 05:45:28 2023 Received: from localhost ([127.0.0.1]:50354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDNkW-0006Ht-9P for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 05:45:28 -0500 Received: from sonic306-19.consmr.mail.ir2.yahoo.com ([77.238.176.205]:42690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <mardani29@HIDDEN>) id 1pDNkT-0006Hc-CG for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 05:45:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1672915517; bh=twGRyRfht2CdKAT310yqqkE3AWX9yXOZLTxwZEJGjGo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=mVRdJxZFPIWLfvBlrMYIWGhcdymHfO0LGznGbx3i22E+TFp/r20TbjheWkzOUWanszVh96yA+7VEZkDw2gLBOBKbAzCbYxpWrW8CRicB0FKA6BVsmTe+ZST3efE1Wgnl4keLwZ3wuiAqdSfEUKSkY+q+2r/stw/8nUi3e3Tk7j6+SMiohFHWZIB1V3XWEpnjBz3OC+jpou6wrVITPimzR8VaKG+rdF8AdtdyIxO8y13rBK2yBcDjJsScTLKtCnL1mLFo6T/FrzbOYzYeyb2TnNbBVd69dAB6oiCtGSWDy6Bd5e8IfHjazVSrfeMaZjkVSwio/KF219FJ7iTKEZLLRA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1672915517; bh=Bf/c0XgyMEjSXsenkbi6ziqSIY9NCHiOe3ivSsnY1yf=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=HNSuwvB0V0viW2xTa+GzW+DPhT2VmSN6y5OyKvSQFH6JWBje56Wg5WAVqkQlGAGGNj+zehZK5ZmKzNBDfmOfaOxOu9wLBh6mJll5QGC1agTaevDc9pDfqMx3SiwJ1JtleH3rS1TyHMRgrgg4f3SRtcih6QrUP5sCP15EOX2f5Yn0dMuBcMvWZzphIhUbEbnAs8ZNPktz28dw+XkYCfuLUWJuIkAE94vq+tIjwvEG2uk1pVIVQ5ebxy84C4PH7YuBUCuKmk9QuwXL6quNHQVhj0+F25LE975jUdZgNdtSLs5Dhu/BcagoGFqmEYq2FAJ+8mFq+fdj643lE+CYU9Y3OQ== X-YMail-OSG: 6YHFAtgVM1nH2cX_2eD0jJ3GDoOG3FFPSNX96JMpyuYx6MUwRGMf1OCb6ojuRh6 M8XlVwaqMWaRwdVGkFKhCDwiZ2.Zxsu55ahSdVptKgTWgztqdcmX7mWraGcabbA2vQQLGTpmBoBd TlkVvTWhdGGwL2lWYL3cqKrTKJ4yj5TIsx5GBX34XNT5B1ymEOkJfY5di__koAZn.hfNh2O5VU_X 6Hq581.jYJP_md33pETZF6X.2Bu7NNd0mNUJ9RRAqoNRoLxm72Eo.4nUZ2JZ8Hhxa7BBRAoWtoYC sj7QPf6EAMBHhdl4kmNEDnR.xPRMpLSuK5cX5w4b89X_jhisVyJRzaf_8nDavm23_u4RZIrr_W9J pMKGKFJAo34sxeOJ_8LdLagLFihWhLU9urXyMKEPv52dS3GE2twFJKwG4eddWbB4opTZY2brEc2B iwriFcQhGRJ4wWxUii5IHR8E7n0gyUqNM0My.UfVRhI9BKgAu_3fsOw8m_daUFOEXDrgdXPA4l4P Zo.ijaRU4u6QcTc7cNxcMi6PDdz9qkVfnqXhUkCzVlHo0LpebV8GNithsm5uWiqLSJUwNeLwgVCw N6CSSy_Ps8kTRmo4nX3t0fD1f_qwNER5OabbXHBSLEtgK9uIyEKn4rZ90Iin_NIbJEJCHaT41Jc9 .LiigWcgxhPc3Ad9zbAUEpHLn6Dg4sdOlHmaCbZ4YdD9RCRZ.r0fJH0e1wxhmJQGJO5PLErVvnf1 GywWeTJGrkU4ojVDWsLGyhnWbKM1w6CP__j_rc5RB8Il.Md59754RVDxM6GE7fTd0QPz_tNHLgff fydGtqf485ELzNSxfQ4djR3jw5Wxlbz6.pEpGN4cCdcKnJrFksf1K9EbLoa4WGOeAif4iBa2MmAT 3KEaPFbP7FLF3u3QwVvlMUPShfO4NVWq77THKFlb28hyc.CvST5Pgw3.cdXxO.og5YiNQC6BvZRR xE0qsz7Nbl7iooEsKkxABEK.RPgBVKtmQf8XAFV0vi..1JiSfeCIdqQ7UeaIp.osv5AwoUfYNqBs O8NXBoky8A4LS0nIDdKGIWPo0ZeLez.8decHiKe3NMsc1PmoqkP2AuafE5DXfpSwBqHg5UI.5qCl FAP7M3qlKZOX656rOdbvzbcui.dgUDGJf3rPT95XOf.nLtG2ZD7YQq1lFWU9wcoe54mQKpoHJUr2 9_NTvS_P_ByQvHMFkcH0A3o4wDR4XAdJrTDo5UG0X7fRd7Zn_RzzOb8BDj12BJX0eUeeqwBORxjr u87KJLEL7gxUSWjKY7bJGRc6NmwO7hM0jwBHjE6Vdsbo_Ms3FlparzCYrzWj58sAzW3et7v2p2OD NnnMUmk0BzHYEEgCFWPStGxZfSCqmLCpxYWrHfi72ylkp7yF5OmAoBHmd_Aph.qfsdfao6Gb7rzh epC3hypLunE877IynrNF8MkblzndFXFRCTCzl5rry43eamDIRw0NECYihdK_JwvJzlOsvxA1ElDM JxK.mr3fZTgFR10tCQiKMYnm2ljRT3i2qf5qwvl8ALZw72rq3O9NbwrLyZQg4CyVX927i7J9ybp5 KzWsPYoTKRaa9giaM.Lz091s38e0Un_2SaKjOf8EtEC3m.IHKR785FBrlm_hT0Q_AmzfrwCgnrGY T0AjJhnFgGBdL34uBHgBuy4S8cJ7xCqwy7eQkMlGGor4zJZUqKgg_xBk6wDx_oLfOeGZfpupuwB5 YjhV5O9VPfkWCe78agMr5fkcDiwtJ5lUn8qs89eRuJs7c7NvRQZeg.WffiQ_QOqj9dTpWOfI_ux5 MViz6ogsh._FQomh3Kg65p97DMboJXiYWBTT0803Lwf7Qd4aLAIPkrmZh0zE2oz_SLa5iJljk9Vz El9iKd1b.s3pAAphvmIGbJ523uL7wUUfaMKLjR0N05nYXtAYxtDElhA_p3qbaEcYij.7tAngtSU. dTNUJioMWM_87yciadY0ihplkaQvxIZxeFsJ6EG3xraOwyp7XVj.b1Io8l2NK0teGi4QTcue_odm KDN_cUJgusI.v5PGA4BOYofcFsHv_Hn02doks2JS_StfplgSaVtA4XkCBT6DFDQrLkiicdEhVqIg vH6k_D5xTCtyc_LUeEsgyemmc1zVxe1D_qnXxW3flBmuo43cq1I6EzptWIDuhIQehF_5MbsHJbRP 8b7DBXKvC5xGFQpXIklpR74N1KEFnUvIt.8w2MMLcqUbtuMNmjBVM0sIip8UzRXfduJc5ZVclk0w KfaI6utrFs6L7xcSVpeIrzb4FuElgw3mylWa1XQ1f X-Sonic-MF: <mardani29@HIDDEN> Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Thu, 5 Jan 2023 10:45:17 +0000 Received: by hermes--production-ir2-5795fc58c8-jdjsh (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID f5dd310fa3d1fd10be80e02c76ea6d2e; Thu, 05 Jan 2023 10:45:16 +0000 (UTC) From: =?utf-8?Q?Daniel_Mart=C3=ADn?= <mardani29@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> Date: Thu, 05 Jan 2023 11:45:15 +0100 In-Reply-To: <87fscpifdw.fsf@localhost> (Ihor Radchenko's message of "Thu, 05 Jan 2023 07:56:11 +0000") Message-ID: <m1zgaxxnt0.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.20982 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1285 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.8 (/) Ihor Radchenko <yantar92@HIDDEN> writes: > Recently, we have stumbled upon a situation when showing function code > is not only useful, but one of the few sane ways to examine it [3]. > Functions that are not directly written in the source but rather > generated programmatically cannot currently be easily examined using > built-in help functionality (using describe-function or other means). > The help buffer only links to the (point-min) in the library defining > the generated function - not very helpful. In contrast, helpful extracts > function body from symbol function slot. I'd prefer we teach the Help facilities how to go to the source code of that kind of functions. Some years ago, I added support for go to definition from *Help* buffers when the symbol was generated by a Lisp macro; there's no reason we couldn't extend the code to also handle this particular case. Showing the source code inline is something I feel more suitable for third-party packages. It is probably more interesting from a core Emacs perspective to make sure that help-mode provides the appropriate hooks for users and packages to customize what to show without needing to reimplement *Help* from scratch. I don't know what other people think, my opinion about this may be a minority.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 09:52:24 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 04:52:24 2023 Received: from localhost ([127.0.0.1]:50318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDMvA-0004xQ-9m for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 04:52:24 -0500 Received: from heytings.org ([95.142.160.155]:59756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDMv7-0004xF-6h for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 04:52:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672912339; bh=N4If8LE83JPEFShedi+5QW9BPBaOqzoXO0Igdg7AIig=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=zPNwcLf7UbT9ebEm0+b3gwXNOrDeOV211WQ32zdn2oTf/phisYDnUYvtLxxT3k+VI kajpAMSZjDcsGMVTyHutIcmLiYqS4L/x0gbKi1FGFJAv0kYB+w9eUP2nyGwK9mFOi4 WA+oPZ6JdKM9OKjEOdQcMSi+haf5bqq46jRz5KsRmjQJorV9hHl0x/MgAIhfbjc1Z8 gA7AR0UAykY//+FYDauahrMbohWFaqJG0v9LqxwDpS2RnZnQM3s213VhRPC0E7k+qo R9vw2TdR6mI3+639TncjhGoqMprGlz1/dFaYAJaU4zSDRF3Rp7/ycf5h03AzAB91VO MYQR1arU4GBlw== Date: Thu, 05 Jan 2023 09:52:19 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <8dea9f3e0e57f739835f@HIDDEN> Message-ID: <8dea9f3e0e1d8e0786fa@HIDDEN> References: <87fscpifdw.fsf@localhost> <8dea9f3e0e57f739835f@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >> Would it be possible to provide function body info via *Help* system in >> Emacs? > > Would this fit the bill? > Shorter and better: diff --git a/lisp/help-mode.el b/lisp/help-mode.el index bf64d032b6..75ccd93938 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -281,7 +281,11 @@ help-function-def--button-function (unless (= (point) position) (push-mark nil t)) (goto-char position)) - (message "Unable to find location in file"))))) + (with-help-window (help-buffer) + (insert (format "Function `%s' could not be found in `%s'." + fun file)) + (insert "\n\nFunction definition:\n\n") + (insert (pp-to-string (symbol-function fun)))))))) (define-button-type 'help-function-def :supertype 'help-xref
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 09:40:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 04:40:16 2023 Received: from localhost ([127.0.0.1]:50290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDMjP-0004b6-VI for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 04:40:16 -0500 Received: from heytings.org ([95.142.160.155]:59742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <gregory@HIDDEN>) id 1pDMjN-0004au-O0 for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 04:40:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672911612; bh=P2fDjiQkLO4XJWUIvbP/HmzQqE4y+J/y2KLXhKLOBBE=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=OMoFI37kaaew2yFyxwjJn86l7ujWL/Bja5LgfLzEt6//YLjpecG9egV2Zj/Ieubcq O+fcFuSYj47MM0Auatq/PjLe24CN2nNcVYRhrXroyAQNOhp1DC0pYvzXZTx2LyBkFU rAdbW8X4UkNl660jlSRJnG6NoJWp+klokenYfiW8gm3/072h9ibyUptsRdi9y0Z5Gy 4WqsxkLfY4K11kWbyNNm4VEZLxPKpOexB7OZnUWWthVSR0kuhR9kWtU0WmfoAmr/P7 fMGbGv7inrBnaz7wDFxpyJzqSXo70sTpARRN7FFan5hfqp1q/3d8SHrXGqoqldNYpM ORTRx0cZpOBUA== Date: Thu, 05 Jan 2023 09:40:11 +0000 From: Gregory Heytings <gregory@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <87fscpifdw.fsf@localhost> Message-ID: <8dea9f3e0e57f739835f@HIDDEN> References: <87fscpifdw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > > Would it be possible to provide function body info via *Help* system in > Emacs? > Would this fit the bill? diff --git a/lisp/help-mode.el b/lisp/help-mode.el index bf64d032b6..049eb2fa5a 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -281,7 +281,14 @@ help-function-def--button-function (unless (= (point) position) (push-mark nil t)) (goto-char position)) - (message "Unable to find location in file"))))) + (with-help-window (help-buffer) + (insert (format "Function `%s' could not be found in " fun)) + (if file + (insert (format "`%s'." file)) + (insert " this file.")) + (insert "\n\n") + (insert (format "Function definition:\n\n" fun)) + (insert (format "%S" (symbol-function fun)))))))) (define-button-type 'help-function-def :supertype 'help-xref
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 08:31:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 03:31:59 2023 Received: from localhost ([127.0.0.1]:50208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDLfK-0002kW-T8 for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 03:31:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDLfJ-0002kK-OL for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 03:31:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDLfE-0000lK-Bz; Thu, 05 Jan 2023 03:31:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=39MDWpKYQ9aQ+iPa0Ijfj1ps+ta42k7SP0GpLn1Ftmw=; b=Is967UJOPVNc ChCHUbeoBQt+IHBdTMYtGC2B3GNrKWgWgMUEAoxiLFmjKSZ8xx/AbK9JgjOuvxt+ec1mtL023fPSr aDAvVAIjC3V8HndRJ3tCsttNqGp46bHowt5dblBCVqBqWv7XuG904V69G/mSO6EWXbmc3LP8LILiv XVvcisuC1JbNUz1FYWJrVvYnU2PdA2ozUTxremHn334k/srBPP6oKXnsVetRfBkHaE+Gya4JtYEZU YZhdzqGKERl6oC2+i3NW7glG8XufX0kdIhnJdLDoBujIUmNWuSR4D6+yr5MkJJiH/k7ecKsyJxh47 mSNO6DxbyX9u6Pp3LJ3PfA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDLfC-0000yQ-Gd; Thu, 05 Jan 2023 03:31:51 -0500 Date: Thu, 05 Jan 2023 10:32:05 +0200 Message-Id: <835ydlxtyy.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> In-Reply-To: <877cy1ie9m.fsf@localhost> (message from Ihor Radchenko on Thu, 05 Jan 2023 08:20:21 +0000) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> <83a62xxuzs.fsf@HIDDEN> <877cy1ie9m.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Ihor Radchenko <yantar92@HIDDEN> > Cc: 60568 <at> debbugs.gnu.org > Date: Thu, 05 Jan 2023 08:20:21 +0000 > > Eli Zaretskii <eliz@HIDDEN> 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. That is less desirable, IMO, then teaching Help commands to be smarter with showing the source code. One of the main reasons to go to the source code is to examine the surrounding code, and consider the function in its context. This will be impossible with your proposal. > (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*) Yes, they do. Patches are welcome to deal with these cases. > > 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. Storing more information is one way. Looking for more sophisticated regexps (if the "usual" ones fail) is another.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 08:20:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 03:20:04 2023 Received: from localhost ([127.0.0.1]:50192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDLTn-0002QU-VR for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 03:20:04 -0500 Received: from mout01.posteo.de ([185.67.36.65]:41121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1pDLTm-0002Pn-9F for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 03:20:03 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 086FB240448 for <60568 <at> 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== 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) From: Ihor Radchenko <yantar92@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions In-Reply-To: <83a62xxuzs.fsf@HIDDEN> References: <87fscpifdw.fsf@localhost> <83a62xxuzs.fsf@HIDDEN> Date: Thu, 05 Jan 2023 08:20:21 +0000 Message-ID: <877cy1ie9m.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Eli Zaretskii <eliz@HIDDEN> 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 <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at 60568) by debbugs.gnu.org; 5 Jan 2023 08:09:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 03:09:53 2023 Received: from localhost ([127.0.0.1]:50182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDLJx-00029f-Aa for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 03:09:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1pDLJv-00029S-AS for 60568 <at> debbugs.gnu.org; Thu, 05 Jan 2023 03:09:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDLJp-0003Iq-Qx; Thu, 05 Jan 2023 03:09:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5MlZ/Y2vfpUvLYwizp0Ii0wsy1Wa/hNb2xtIO0rKPOw=; b=T5J9A7T8whzM cTcFT+vdjbxtad4iyBDUZ1nbY3zlP7VjKgn8YW1TJejxXbcSm4durZ5F00AuIXrvBcRsedNcHuT/b gu1F6j5k1fL00vXo7mCHH0XCtGZCeYg5CLvLUsSj6i82ovZIoug4ioJJl0ga2tC6TSyiATSOLrrqL Sbxxuqotu5qdCwDv84Goca7olqh1U4a+BhrzOXYi/qTZwLwvXZHe2xzw2mBbWKP5iUFGd/rX7r4V5 O4clMbBj88YOGIHJLLoRlTfskudsqlGS/1h4EXNnXiuzIl4wy9xn2TAZpXDKNuM9oErwHShEhDbQU zXVyUuGtYeWerTwnK0c59Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1pDLJp-0007Eb-9b; Thu, 05 Jan 2023 03:09:45 -0500 Date: Thu, 05 Jan 2023 10:09:59 +0200 Message-Id: <83a62xxuzs.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Ihor Radchenko <yantar92@HIDDEN> In-Reply-To: <87fscpifdw.fsf@localhost> (message from Ihor Radchenko on Thu, 05 Jan 2023 07:56:11 +0000) Subject: Re: bug#60568: [FR] 30.0.50; Help buffers and function bodies for generated functions References: <87fscpifdw.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60568 Cc: 60568 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: Ihor Radchenko <yantar92@HIDDEN> > Date: Thu, 05 Jan 2023 07:56:11 +0000 > > There have been a discussion [1] about including some of the helpful > package [2] features into built-in *Help* buffers. > > One of the discussed features was displaying function source code right > in *Help* buffers. This feature usefulness have been objected at that > time, on the grounds that showing function code may be too long and > cause large *Help* buffers. > > Recently, we have stumbled upon a situation when showing function code > is not only useful, but one of the few sane ways to examine it [3]. > Functions that are not directly written in the source but rather > generated programmatically cannot currently be easily examined using > built-in help functionality (using describe-function or other means). > The help buffer only links to the (point-min) in the library defining > the generated function - not very helpful. In contrast, helpful extracts > function body from symbol function slot. > > To illustrate, one can try the following: > > 1. emacs -Q > 2. M-: (require 'ob-shell) > 3. <F1> f org-babel-execute:sh <RET> > 4. Click on the source code link in *Help* buffer > 5. Observe point jumping to (point-min) with no obvious way to find the > function definition. > > Would it be possible to provide function body info via *Help* system in > Emacs? Provide how? 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? 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. 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.
bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 5 Jan 2023 07:55:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 05 02:55:51 2023 Received: from localhost ([127.0.0.1]:50134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pDL6N-0007t2-GN for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 02:55:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:41198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>) id 1pDL6L-0007st-67 for submit <at> debbugs.gnu.org; Thu, 05 Jan 2023 02:55:49 -0500 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 <yantar92@HIDDEN>) id 1pDL6K-0004gL-KZ for bug-gnu-emacs@HIDDEN; Thu, 05 Jan 2023 02:55:48 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <yantar92@HIDDEN>) id 1pDL6F-0002Fq-Jf for bug-gnu-emacs@HIDDEN; Thu, 05 Jan 2023 02:55:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 95F382403D8 for <bug-gnu-emacs@HIDDEN>; Thu, 5 Jan 2023 08:55:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672905341; bh=nd61Xaa4ZJcvhBubVWxsBsugVSOZJQJNrDY64moDqYQ=; h=From:To:Subject:Date:From; b=ocwxTn8GJNLpoNhfWWgnPPpvoNaU2KvPZSVB4xtrWW7LyxP7+Z6oQ5KMO3yBWfMn1 E3pIvX55Y1L0aA8wJLyTnZB8tRqG2G97nRTuX1adbyjE7ow4ioPI5dmqFWWLMrAyOC quZam66Bd5K/hprpZJpr4wx0kKooV/UwU8ZRLBPi9v/ohGcWCYxCQpKDe+XQ2rPEcN 0nvznUSLZII/kqiAokCIr8adAJjYx1blzvudS0+dd53NaIj+aPlT9QdGhDoG3z9Yjw HVHFaNCNILE74NsMGOoiPdG7o67IVjnUd87BcsmN+sCr6gYtfLitgrN8MMq19wlu1r /VGqxxKA8uGig== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nnf0Y0VMZz9rxB for <bug-gnu-emacs@HIDDEN>; Thu, 5 Jan 2023 08:55:38 +0100 (CET) From: Ihor Radchenko <yantar92@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [FR] 30.0.50; Help buffers and function bodies for generated functions Date: Thu, 05 Jan 2023 07:56:11 +0000 Message-ID: <87fscpifdw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@HIDDEN; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) Hi, There have been a discussion [1] about including some of the helpful package [2] features into built-in *Help* buffers. One of the discussed features was displaying function source code right in *Help* buffers. This feature usefulness have been objected at that time, on the grounds that showing function code may be too long and cause large *Help* buffers. Recently, we have stumbled upon a situation when showing function code is not only useful, but one of the few sane ways to examine it [3]. Functions that are not directly written in the source but rather generated programmatically cannot currently be easily examined using built-in help functionality (using describe-function or other means). The help buffer only links to the (point-min) in the library defining the generated function - not very helpful. In contrast, helpful extracts function body from symbol function slot. To illustrate, one can try the following: 1. emacs -Q 2. M-: (require 'ob-shell) 3. <F1> f org-babel-execute:sh <RET> 4. Click on the source code link in *Help* buffer 5. Observe point jumping to (point-min) with no obvious way to find the function definition. Would it be possible to provide function body info via *Help* system in Emacs? [1] https://yhetil.org/emacs-devel/AM9PR09MB4977A7738F83C5C24EF5829196D59@HIDDEN [2] https://github.com/Wilfred/helpful [3] https://orgmode.org/list/87h6x8kluc.fsf@localhost In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2023-01-02 built on localhost Repository revision: 9377a3c889aa3b178a11a3b849c3d1665da096d6 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
Ihor Radchenko <yantar92@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#60568
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.