9

I think this is an omission, so I'm going to send the following patch to the Org mode mailing list as an enhancement. The patch is against latest (as of now) Org mode, but it is simple enough to apply by hand, if you'd like to try it out (or you might wait for a little while and see what happens to it upstream before doing anything): diff --git a/lisp/org.el ...


9

You can output formatted org tables by returning a list of lists as follows (notice no :results output): #+begin_src python :results replace table return (('a', 'a'), None, ('bbbbb', 'bbbbb')) #+end_src #+RESULTS: | a | a | |-------+-------| | bbbbb | bbbbb | a None row creates a separator line. Here are some other examples using :results output #+...


8

Vanilla org-mode: C-c - (org-ctrl-c-minus) - Convert selected text into a plain list C-u C-c C-x C-b (org-toggle-checkbox) - Convert selected plain list into a list with checkboxes Spacemacs: , - (org-ctrl-c-minus) - Convert selected text into a plain list SPC u , T c (org-toggle-checkbox) - Convert selected plain list into a list with checkboxes


8

You can use a file link like this: file:f1.cpp::507ab9d0-d1a5-4fa9-97a9-d78a48a08c3d It should open the file and then search for the string you put in.


7

(widen) is enough for it, there is no need of an specialized function. Usually bound to C-xnw Also, you may find interesting those parts from the manuals: Narrowing from the Emacs Manual. narrowing from Elisp Reference Manual.


7

Assuming you are talking about searching in a file, not in the agenda, try this function at the top of the subtree you want to search: (defun my-sparse-subtree-todo-search () (interactive) (org-narrow-to-subtree) (let ((level (org-current-level))) (org-match-sparse-tree t (format "+LEVEL=%d" (1+ level))))) Doing M-x my-sparse-subtree-todo-search ...


7

Thank you for telling me about the different types of maps. The issue is as @NickD pointed out in their answer https://emacs.stackexchange.com/a/59269/9874 and the example use-package code puts all the bindings into the global map. ie org-mode puts the binding to "" in org-mode-map so you need to use that map. Because my configuration is based on ...


7

Rephrasing and shortening, I guess the question is roughly: "how to obtain stderr output without changing the source block content?" By skimming the comments section of the John Kitchin's post, adding #+PROPERTY: header-args:sh :prologue "exec 2>&1" :epilogue ":" globally, at the top of the file, should do the job (it ...


7

File-level properties can be set like this: #+PROPERTY: header-args :mkdirp yes Language-specific arguments can be set with this syntax (setting property p1 to value v1): #+PROPERTY: header-args:lang :p1 v1 If you want to add properties without resetting everything else to default, use lang+, as in the following - it doesn't modify the previously set p1 when ...


7

Org Mode does support callouts. The documentation for it is hidden in the Literate Examples section of the manual, but does in fact apply to source code blocks. Unlike AsciiDoc, Org Mode with Org Babel keeps the code and the documentation cleanly separated. The example below uses Org Babel to generate a Ruby code file using the :tangle keyword. The Org ...


6

The closest thing I can come out of this was writing your own custom dynamic block. You can read more about it at C-h i g (org)Dynamic blocks. This, however, requires you to know more about Org-mode internals. The following is a very minimalist callback to generate weekly report on day-by-day basis. The basic idea is there and you can extend it to suit ...


6

Use TRAMP multi-hop syntax for :dir header. 4.4 Combining ssh or plink with su or sudo If the su or sudo option shall be performed on another host, it could be comnbined with a leading ssh or plink option. That means, TRAMP connects first to the other host with non-administrative credentials, and changes to administrative credentials on that host ...


6

There are a couple of options for this, to me the easiest way is grouping templates using the built-in mechanism. My way to use capture templates is based in memory muscle rather than digging a long menu, so how the menu is displayed should be concise in case I don't recall what key was for something. I do call capture using F12, then if I want to insert a ...


5

Looks like a bug as wasamasa said, but until that gets fixed this works for me: (setq org-babel-js-function-wrapper "console.log(require('util').inspect(function(){\n%s\n}(), { depth: 100 }))") If you want to print deeper or otherwise modify output, change the options for require('util').inspect(...) in that string, as documented here. If you want ...


5

To insert a timestamp four months from today, press: C-c . +4m RET and the +4m cookie shifts the date for you. Likewise, use -4m to insert four months before today (y, m, w, and d letters are all valid). Use S-arrows, <, and > for navigation. See the manual for more information.


5

Another approach is to delete all non-level-2 entries before parsing the export buffer. This is different to what @gregoryg is proposing in that it also skips the body/text directly following non-level-2 headings. No need to use tags. (defun export-translation (backend) (org-map-entries (lambda () (unless (= (org-current-level) 2) (let ((...


5

You're on the right track, but the standard elisp idiom for "go somewhere else in the buffer, do some stuff, and then go back to where you came from" is to use save-excursion. You can rewrite (and simplify!) your command as follows: (defun my-refresh-org-fle () (interactive) (save-excursion (goto-char (point-min)) (org-ctrl-c-ctrl-c))) ...


5

EDIT: As @jagrg points out in a comment, there is a function for that: org-in-src-block-p whose doc string says: (org-in-src-block-p &optional INSIDE) Whether point is in a code source block. When INSIDE is non-nil, don’t consider we are within a source block when point is at #+BEGIN_SRC or #+END_SRC. Use that instead of the following answer (which I ...


5

I have the following in my .emacs: ;; date (global-set-key "\C-\M-d" (lambda (arg) (interactive "P") (let ((separator (pcase arg ('(4) "-") (0 "/") (_ "")))) (insert (format-time-string (concat "%Y" separator "%m&...


4

I'm using self-compiled emacs 27.0.9x on Linux and macOS. To generate my presentations, I use org-mode. emacs -Q \ --batch "(require 'ox-beamer)" \ <input>.org -f org-beamer-export-to-pdf works for me.


4

People tend to over complicate that, try this instead: (defun farynaio/org-link-copy (&optional arg) "Extract URL from org-mode link and add it to kill ring." (interactive "P") (let* ((link (org-element-lineage (org-element-context) '(link) t)) (type (org-element-property :type link)) (url (org-element-...


4

A solution to (part) of your problem could be to use the org-agenda-prefix-format variable. To insert the effort information before every entry in the agenda and todo list views just put this in your config: (setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t%-6e% s") (todo . " %i %-12:c %-6e") ...


4

You can set header arguments in Org mode properties (see (org) Using Header Arguments) to avoid repeating, for example, all code blocks in this org file will have :dir /tmp #+PROPERTY: header-args :dir /tmp #+BEGIN_SRC sh pwd #+END_SRC #+RESULTS: : /private/tmp I also have the following command in my init file, it duplicates the last src block's header, ...


4

I cite from https://orgmode.org/manual/Quoting-HTML-tags.html: The HTML export back-end transforms < and > to &lt; and &gt;. To include raw HTML code in the Org file so the HTML export back-end can insert that HTML code in the output, use this inline syntax: @@html:...@@. For example: @@html:<b>@@bold text@@html:</b>@@ In ...


4

Use M-x org-sparse-tree RET. First you are asked how you want to filter and one of the options is [p]roperty. If you type p you can give AUTHOR as property name and Cialdin as value. Tab-completion works for that input.


4

Hot diggity darn, but minutes later I discovered a crate for that. For future people landing on this question, all I had to do was run cargo install cargo-script and bam you'll be off and org-babel-ing. If you've got Cargo.el installed in your profile, you can evaluate pretty quick using Cargo-run. This may become how I write Rust going forward, if I can ...


4

You should set org-clock-in-switch-to-state to the intended state: (setq org-clock-in-switch-to-state "PROGRESS") Documentation: Set task to a special todo state while clocking it. The value should be the state to which the entry should be switched.


4

You can define your own function that does all the things you want it to do and bind it to a key: (defun my-day-page () (interactive) (org-agenda-list nil nil 1 nil) (org-agenda-columns)) (define-key global-map [f10] 'my-day-page) See the doc for org-agenda-list (C-h f org-agenda-list RET) for the meaning of the arguments: the third argument (the ...


4

Your guess inner is right. The first two operands of inner are the multiplication and the summation operator, respectively. The remaining two arguments are the vectors for the inner product. The summation operator is add and the multiplication operator is mul. Your table inclusive the table-formula should look like: | | | col1 | enable | |---+-----...


4

I finally use this solution src_emacs-lisp[:results raw]{(concat "#+SETUPFILE: " (expand-file-name (car (project-roots (project-current)))) "setup/setup.org")} #+TITLE: My test * Test... An alternative that also works is to use a regular code block (you can define elsewhere and load with org-babel-lob-ingest in your Emacs init.el file, Config, examples ...


Only top voted, non community-wiki answers of a minimum length are eligible