Skip to content

Emacs helm extension for inserting a reference to an org source block function

Notifications You must be signed in to change notification settings

dfeich/helm-lib-babel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. helm-lib-babel
  2. Installation
  3. Motivation

helm-lib-babel

img

helm-lib-babel provides a convenient helm lookup function for org-mode's ability to use previously defined named source code blocks like functions (typically inserted via a #+CALL: statement). The available functions consist of all named functions found in the current file and the user's library of babel.

img

Installation

Install the raw package and then just use

(require 'helm-lib-babel)

or better, use use-package

(use-package helm-lib-babel)

There are no configuration settings needed by the package. If you do not have an own library of babel (defined via org-babel-lob-ingest), then only the named source blocks of the file you are currently visiting will be offered.

Motivation

Despite having used Org mode's source code blocks for many years, I never had really made friends with the Library of Babel feature, which allows using source blocks defined in other org files in the current file.

Among the reasons was that it is awkward to look up the remote source block's definition, its name and arguments. This is resolved by this little helm extension.

I am making use of many table related functions in my work, and Over the last few years I am spending an ever increasing part of my work life in Emacs and Org mode. I found that there are a lot of source block functions which I want to re-use between files. While I am not a huge fan of the library of babel mechanism, for this number of very often used functions, it is convenient.

One must be concious that the files that are created with library of babel references are no longer self-contained, because they reference code outside of the current org file. So, handing them to others is not easily possible, except if one adds the library files as well.

In the end the library of babel is only a very weak replacement for a real dynamic "library loader" feature which would allow to reference the used libraries within the org file. But then maybe we would start to overload org-mode and make it to a full meta-programming environment that requires library default paths, etc. Naturally it would be possible to put the execution of an org-babel-lob-ingest form into the file variables of the org-file, but that is rather hacky.

About

Emacs helm extension for inserting a reference to an org source block function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published