this post was submitted on 15 Sep 2023
6 points (100.0% liked)

Emacs

312 readers
1 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 
  • weary-traveler asked to add a new feature to Org publishing system.

    The use case is publishing using CI tasks, where a new, fresh image is created every time a web site is re-published. Such image does not preserve the original modification times of the source Org files, making Org publish re-generate everything every single time.

    The new suggested feature is (optionally) using last git commit time instead of file modification time.

    • Org already has somewhat similar functionality in a form of ={{{modification-time ...}}}= macro. See [[info:org#Macro Replacement][org#Macro Replacement]] section of Org manual.
    • Also, several other places in Org are relying on file modification time and might need to be considered.
    • Conclusion: the feature request is to be submitted to mailing list for more detailed discussion. (see https://orgmode.org/manual/Feedback.html#Feedback)
  • Tomas Volf asked where to start learning Org. Answer:

    1. Go to https://orgmode.org

    2. Click on "Worg" (Org wiki): https://orgmode.org/worg/

    3. Check out https://orgmode.org/worg/#learn

    4. I specifically recommend a short Org mode guide: https://orgmode.org/guide/index.html to get an overview of what is possible and https://orgmode.org/worg/org-tutorials/index.html with various use cases.

    5. Karl Voit later pointed to his usual suggestion to learn one thing at a time: https://karl-voit.at/2020/01/20/start-using-orgmode/

      • In short, Org is so large that it is useless to try learning everything. Just look quickly what is possible and use whatever is practically useful - small step at a time.
      • If nothing in Org is useful, do not use Org (yes, it is perfectly fine not to use Org ;])
  • As usual, a number of people use Org mode for a number of different things. This time, the participants mentioned

    • outlining documents and writing plain text notes
    • source blocks to run code from notes
    • note taking (sometimes on paper first, later copying to Org)
    • blogging
    • publishing to html
    • export to LaTeX
    • storing bookmarks from internet
    • working on HS/CS projects
    • People often start with one thing, but then it becomes convenient to re-use Org for more and more and ...
  • oatmeal described Emacs hanging when opening one specific Org file. Without further info, we could only offer generic tip to submit a bug report: https://orgmode.org/manual/Feedback.html#Feedback

  • William Denton asked about how yantar92 (me) uses Org mode to maintain Org mode :)

    Some highlights:

    • This setup is definitely not for beginners. Too many idiosyncratic things.
    • I use a single notes.org file for all the notes + a bunch of archive files for things I do not need to pop up in my searches (via org-ql).
    • Org mode maintenance involves dealing with a growing pile of bug reports, feature requests, patches, ideas, etc. I currently have over 1k (yes, over one thousand) actionable ideas recorded.
    • It is literally impossible for a single human to handle all these
    • So, I instead approach this using priority system
      • I collect everything Org-related (emails, github issues, reddit posts, blogs) into Org headings via https://github.com/yantar92/org-capture-ref
      • I categorize Org-related tasks into: (1) bugs; (2) feature requests; (3) maintenance tasks; (4) misc tasks; (5) specific non-trivial projects (task groups), like implementing new syntax or fixing particularly difficult bugs.
      • At any time, I limit my Org-related work to bugs, feature request, maintenance tasks, and a couple of projects (according to my free time).
        • I do it by setting todo keyword "NEXT" on active groups and "SOMEDAY"/"HOLD" on inactive groups
      • only active groups of tasks contribute to my agenda
      • I re-consider active groups every week during weekly review
      • More about my todo keywords: https://github.com/yantar92/emacs-config/blob/master/config.org#tasks
      • Inside each group, I only mark a couple (of several hundreds) of tasks as active (NEXT)
        • I only review non-active tasks when I run out of "active" (NEXT) tasks (and the area/project is thus "stuck")
        • Non-active tasks are marked with various levels of urgency, for easier review (I do not want to review all 300-500 tasks every time)
      • A/B/C priority
      • flagged/non-flagged
      • flagged "#A" tasks are the first to be marked "NEXT" during the review
      • Use https://github.com/yantar92/org-autosort
        • The active tasks are scattered across my multiple layers of agenda views: focused agenda (have to do today); normal agenda (do after I finish focused agenda); NEXT task list (tasks to consider if I finish everything that is actually scheduled for today)
      • More details at https://github.com/yantar92/emacs-config/blob/master/config.org#agenda--scheduling
    • As an aside, because of so many headings, I display many standard tags and todo keywords as UTF symbols: πŸ–‚πŸ“ŽπŸπŸ“šπŸ””β˜β―‘β˜‘βœ˜β–ΆπŸ‘βŒ›β©βΈ... for more compressed view
      • See https://github.com/yantar92/emacs-config/blob/master/config.org#items
      • Emacs allows to create you own non-standard symbols by combining multiple "glyphs" on top of each other: ~'(?πŸ•’ (cc . cc) ?🚫)~ will draw πŸ•’ on top of 🚫, creating "prohibit clock" symbol. See help:reference-point-alist docstring more details about combining symbols in Emacs.
  • On working with large Org file

    • The key point when working with large Org files is ability to search things and narrow things down to the project/area you currently work on
    • One way is ~org-narrow-to-subtree~ and ~org-tree-to-indirect-buffer~ - it will limit Emacs buffer to specific subtree.
    • Sparse trees allow revealing specific headings in folded Org buffer - by todo keyword, by tag, by property, by regexp etc. See https://orgmode.org/manual/Sparse-Trees.html
    • One can even display Org buffer in a table form via https://orgmode.org/manual/Using-column-view.html
    • Org agenda, despite its name, is not limited to listing scheduled tasks. It is Editable search interface across multiple Org files. One can search for specific headings (via tag, property, scheduled, todo keyword, regexp, etc searches), see them as a list in agenda view, and edit by changing their todo keywords, scheduled, deadline, priority, etc See https://orgmode.org/manual/Matching-tags-and-properties.html
  • Tomas Volf asked about synchronizing Org files across multiple machines.

  • Karl Voit mentioned an alternative version of ~org-tree-to-indirect-buffer~: https://github.com/novoid/dot-emacs/blob/master/config.org#L7510

    • It allows multiple indirect buffers (built-in version needs customization for multiple indirect buffers; it kills previously existing indirect buffers by default)
    • It uses different naming scheme.
  • Karl Voit mentioned a convenient way to copy html markup to Org markup: https://github.com/kuanyui/copy-as-org-mode

  • Side track: why not using ChatGTP to implement new features? ... which does not work most of the time without manual editing :)

  • weary-traveler mentioned his alternative html export backend https://github.com/ox-tufte/ox-tufte

    • The highlight is ability to have side (margin) notes in the exported html.
    • Based on "tufte" CSS
  • weary-traveler showed a demo on using rst (reStructured text) tables inside Org files: https://weary-travelers.gitlab.io/posts/how-tos/overcome-org-syntactic-restrictions/guide.html

    • The idea is to create a source block backend, which executes exporting its code to whatever export backend is needed
    • This way, one can use complex rst tables with multi-row cells and complex cell layouts
    • The same idea can be used to embed alternative markups into Org (also, it is how Org's embedded LaTeX works under the hood)
    • Alternatively, Org mode supports =table.el= tables that allow multi-row cells.
  • Karl Voit briefly described his system to deal with "hard to finish" tasks

  • Org mode clocking can be used as website blocker

  • Hooks executed when clocking in/out: ~org-clock-in-hook~, ~org-clock-out-hook~ πŸ˜‡

  • Tomas Volf asked about giant Emacs setup: whether the author (me) remembers everything that is going on there:

    • The answer is no, I don't remember: things that are of use are simply in muscle memory and do not require further tweaking.
    • Sometimes, config things feel so natural (after years of usage), that they are thought as Emacs built-in (to later surprise trying with emacs -Q)
      • Like =highlight-parenthesis-mode=, which is a package I use for many years
        • Unlike built-in, it highlights multiple levels of parentheses around point, not a single level.
  • Karl Voit uses major mode hydra as a personal version of cheat sheet for rarely used commands

    • Another approach is using =which-key= package that displays all the prefix bindings after delay
    • Or M-x describe-bindings
    • Or something like =C-c C-v C-h= (any prefix ending with =C-h=), which will display a summary of bindings starting from that prefix key
  • kickingvegas asked about agenda command to move to an event that is scheduled now (for example, it is 2pm and the event is 1pm-3pm)

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here