jops/README.org
Howard Abrams a6255c1127 Proof of concept that works for me
Copied the original code from the Emacs configuration to make it
available to others. Need to get a better packaging setup.
2024-11-16 10:51:33 -08:00

35 lines
2 KiB
Org Mode
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#+TITLE: Jump to Project Headlines
#+AUTHOR: Howard Abrams
#+DATE: 2024-07-07
#+FILETAGS: emacs hamacs
#+LASTMOD: [2024-11-11 Mon]
An interactive Emacs function, *Jump to Org Project Section* (or JOPS), allows you (in one step) load an Org file from a project and jump to a particular trees heading.
*Note:* Still working on a name for this project. 😏
* Why?
You can use the [[https://github.com/minad/consult][consult project]] to call =consult-imenu= or =org-consult-heading= to jump to a section in an Org file based on a headline. But as projects with a lot of Org files grow (for instance, literate programming projects) one refines, re-organizes and refactors the content moving a sub-tree from one file to another… perhaps loosing track of the move.
Personally, I often forget where I moved a particular section. For instance, in [[https://howardabrams.com/hamacs/][my Emacs configuration]], did I configure /eww/, in this or that file, or did I move it to its own dedicated file? But even if you know where, this function is a nice micro-optimization to the act of loading the file and jumping to the section (often called /sub-trees/ in Org parlance)
* Installation
Until this finds a home on [[https://www.melpa.org][Melpa]], you will need to clone this project, as well as the Magnars [[https://github.com/magnars/s.el][s.el library]] (or grab that from [[https://www.melpa.org/#/s][Melpa]]).
Also, install [[https://github.com/BurntSushi/ripgrep][ripgrep]] (see the [[https://github.com/BurntSushi/ripgrep?tab=readme-ov-file#installation][Installation Guide]] for help getting this on your operating system).
* Usage
Call the interactive function, =jops= as the primary interface.
* Customization
Set the variable, =jops-ripgrep= to the full path of =ripgrep= if you cant adjust the =PATH= environment variable for Emacs (or change the =exec-path=.
Set the =jops-flush-headers= as a regular expression to filter redundant or useless headlines.
# Local Variables:
# jinx-local-words: "eww"
# End:
*