My personal patches-in-progress branch of Org. See https://git.tecosaur.net/mirrors/org-mode/compare/main..tec/org-mode:dev.
Go to file
Stefan Monnier ecb62e2e31
org-babel-shell-initialize: Refactor
* lisp/ob-shell.el (org-babel-shell-initialize): Refactor avoiding
`eval' runtime calls and assigning 'definition-name function symbol
property to assist Emacs help system with finding the definition.

Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60568#71

> 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
2023-01-12 13:35:09 +03:00
doc Merge branch 'bugfix' 2023-01-06 16:31:43 +03:00
etc Merge branch 'bugfix' 2023-01-01 13:15:12 -05:00
lisp org-babel-shell-initialize: Refactor 2023-01-12 13:35:09 +03:00
mk mk/orgcard2txt.pl: Escape { to remove deprecation warnings 2022-11-19 14:41:27 +01:00
testing org-refile: Fix edge case when we refile on top of the same subtree 2023-01-12 13:19:02 +03:00
.dir-locals.el .dir-locals.el: Set indent-tabs-mode to nil in Elisp sources 2020-12-23 00:00:26 -05:00
.gitignore * lisp/org-agenda.el: Use lexical-binding 2021-03-09 22:56:33 -05:00
.gitmodules updated jump submodule for those behind http proxy 2013-06-06 14:36:24 -06:00
CONTRIBUTE.org CONTRIBUTE.org: Try to be more effective in giving directions 2022-09-27 23:17:28 +02:00
COPYING Prefer HTTPS to HTTP in most links 2021-03-21 15:21:22 -04:00
Makefile Use https for links to orgmode.org 2018-01-19 18:14:58 +01:00
README.org Rename README and CONTRIBUTE as README.org and CONTRIBUTE.org 2022-09-26 06:48:27 +02:00

README.org

This is a distribution of Org Mode, a major mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more — in a fast and effective plain text system.

Check the Org Mode website for more.

Install Org

Org is part of GNU Emacs: you probably don't need to install it.

To install a more recent version, please do it from GNU ELPA by running this command: M-x package-install RET org RET

Join the GNU Project

Org is part of GNU Emacs and GNU Emacs is part of the GNU Operating System, developed by the GNU Project.

If you are the author of an awesome program and want to join us in writing Free (libre) Software, please consider making it an official GNU program and become a GNU Maintainer. Instructions on how to do this are here http://www.gnu.org/help/evaluation.

Don't have a program to contribute? Look at all the other ways to help: https://www.gnu.org/help/help.html.

And to learn more about Free (libre) Software in general, please read and share this page: https://gnu.org/philosophy/free-sw.html

License

Org-mode is published under the GNU GPLv3 license or any later version, the same as GNU Emacs.

Org-mode is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Org mode. If not, see https://www.gnu.org/licenses/.