New answers tagged

1

Package ob-async lets you execute source blocks asynchronously. Install and enable the package. Then add :async to the header args: #+BEGIN_SRC shell :async rsync -av ~/Documents \ --include=~/Public /media/me/disk/ #+END_SRC


0

This seems to work: * TODO %^{Task Name?} ** TODO SubTask 1 SCHEDULED: %(org-insert-time-stamp (org-read-date nil t nil "When schedule Subtask 1?")) ** TODO SubTask 2 SCHEDULED: %(org-insert-time-stamp (time-add (org-read-date nil t org-last-inserted-timestamp) (days-to-time 1))) ** TODO SubTask 3 Uses %(EXP) to evaluate an elisp expression EXP and ...


0

The source block most certainly doesn't get executed when using org-babel-tangle. Consequently i and fig-file are void. To get around this you can (starting with the cleanest solution): use the result of a named block execute the source block when opening the file use file local variables Note: Newer emacs versions use cl-incf instead of incf. 1. Use the ...


0

Take a look at the documentation of org-ref-get-pdf-filename-function. You can set it to either org-ref-get-mendeley-filename or org-ref-get-pdf-filename-helm-bibtex. Both the variants support Mendeley file fields.


3

Customize the variable org-id-link-to-org-use-id and set it to t (AKA Create ID to make link). Then when you do C-cl (i.e. org-store-link), an ID property will be added to the headline with a UUID as value. When you save the link somewhere else (perhaps in another file) with C-cC-l (i.e. org-insert-link), the link will appear like this: [[id:b7b07a14-5dbb-...


2

You need to execute at least the Elisp source block defining the function fig-file once before tangling the file. Otherwise that function is undefined as you see in the error message. You can do so by placing point on the Elisp source block and by pressing C-c C-c. Remark 1: Used Orgmode test file Since I am not familiar with R i tested with a source ...


0

to register the solution... The code below exports org mode file to _post jekyll dir In the future, why not a org mode jekyll theme? It is interesting because the css classes was not woked in the code. ;;; package --- Summary ;;; Commentary: ;;; Code: ;;Entering the Debugger on an Error ;;https://ftp.gnu.org/old-gnu/Manuals/elisp-manual-21-2.8/...


0

Template handling has changed in org 9.2: *** Change in the structure template expansion Org 9.2 comes with a new template expansion mechanism, combining org-insert-structure-template bound to C-c C-,. If you customized the org-structure-template-alist option manually, you probably need to udpate it, see the docstring for accepted values. ...


2

configure_jekyll_front_matter gets 'html as argument BACKEND and not 'jekyllHtmlPost because you use the export functions of the html backend in the :menu-entry of the derived backend. You must replace the export functions org-html-export-as-html, ... in your derived backend with your own versions org-jekyllHtmlPost-export-as-html, ... . You find all the ...


2

You can override t with org-agenda-custom-commands as (setq org-agenda-custom-commands '(("t" tags-todo "-habit"))) The compact Org-mode Guide: Custom agenda views The Org Manual


1

I had a similar use case, and rolled a simple exporter which let me use json-mode for the source/input from stdin: ;;; ob-passthrough.el --- passthrough evaluator -*- lexical-binding: t; -*- ;; this ob evaluates the block as ifself, so it can be used as input ;; for another block (require 'ob) (defun org-babel-execute:passthrough (body params) ...


0

Org Mode has a function for this, as you might expect. Mark a region and run org-emphasize (bound by default to C-c C-x C-f in Org buffers), it will prompt you for an emphasis marker (one of */=~+) and will then wrap the region with that character. If the region is already wrapped in a different one of those characters, the function replaces it with the one ...


7

Maybe the header argument :wrap can help, e.g., #+BEGIN_SRC elisp :wrap src sh (format "echo %s" (shell-quote-argument user-full-name)) #+END_SRC #+RESULTS: #+BEGIN_src sh echo Xu\ Chunyang #+END_src #+RESULTS: : Xu Chunyang


0

I give you an example org-file below. The emacs-lisp source block on top prints the shell source block inclusive the limiters #+begin_src sh and #+end_src. The result format of the emacs-lisp source block is raw. That way the generated shell source block is directly embedded into the org file. If you evaluate the org buffer with M-x org-babel-execute-...


0

An alternative is smartparens (https://smartparens.readthedocs.io/en/latest/).


1

Set org-src-preserve-indentation to nil and org-edit-src-content-indentation to 0. org-src-preserve-indentation preserves the indentation of the source code in the src edit buffer that you get when you call org-edit-src-code on the source block also in the org buffer. org-edit-src-content-indentation is the relative indent of the source code w.r.t. ...


3

The scheme babel (i.e., ob-scheme.el) requires Geiser to work, you can install it from Melpa.


1

If I understand well, you want to surround an expression with a given character (~). Maybe emacs-surround will satisfy your needs. If you use evil, there is also evil-surround that I use and confirm you I can select a word and surround it with ~ by pressing S-s ~


0

There is no way to do that within org-mode that I can see. If you can modify the target file, you can add "backward" links: that's probably ugly and will not work in general, since you probably don't want to add to your code file N backlinks to the N TODO items that link to that piece of code. If you have a single org file (or a small set of org files) ...


1

I am pretty sure there is no definition associated with triple angle radio links in org-mode (https://orgmode.org/manual/Radio-targets.html). These can be in the middle of a line, for example, and there isn't a clear way to determine where the definitions starts or ends. You should be able to jump back to the location you clicked on with the command org-...


1

You say, "I would like to open every new file in a separate frame, of small size." To always use a separate frame, by default, set option pop-up-frames to t. To get frames that fit the buffer content (narrow, for narrow buffer lines, short, for short buffers), use libraries fit-frame.el and auto-fit-frame.el. See Shrink-Wrapping Frames. If you instead want ...


2

Use find-file-other-frame instead of find-file: find-file-other-frame is an interactive compiled Lisp function in `files.el'. (find-file-other-frame FILENAME &optional WILDCARDS) Edit file FILENAME, in another frame. Like M-x find-file (which see), but creates a new frame or reuses an existing one. See the function ‘display-buffer’. Interactively, ...


0

Usually hooks have names that end in -hook or -functions, so org-add-note is probably not the name of the hook you need to use. Based on looking at the code, I'd suggest you use something like: (add-hook 'org-log-buffer-setup-hook #'my-set-fill-column) (defun my-set-fill-column () (setq-local fill-column 72))


1

Those keys to incrementally adjust the search refer to the user interface in the agenda buffer that appears after a org-agenda-search-view (typically bound to C-c C-a s.) Further there is the search string which can be conveniently changed with the mentioned keys. The search string is applied not only to the headlines but also to the content of the ...


0

My half-successful attempt: (defun org-show-position-in-text () ;; display outline path of hierarchical headings (interactive (mapconcat #'identity (org-get-outline-path t) "/"))) (add-hook 'org-mode-hook 'org-show-position-in-text) The above function just about does the job. Only that it throws the error Wrong type argument: listp before showing the ...


2

Your function is not defined correctly. You don't need the code inside the interactive line, and you don't need the hook function. This should work fine I think: (defun org-show-position-in-text () ;; display outline path of hierarchical headings (interactive) (message (mapconcat #'identity (org-get-outline-path t) "/")))


4

I believe that setting org-hide-emphasis-markers to something non-nil will do what you want. The doc string of the variable says: org-hide-emphasis-markers is a variable defined in ‘org.el’. Its value is nil This variable is safe as a file local variable if its value satisfies the predicate ‘booleanp’. Documentation: Non-nil mean font-lock should hide ...


1

You can use the [[link destination][link description]] syntax: [[file:projects.org::Workflow][Workflow]]


1

The problem you described can also be solved with the functions outline-promote and outline-demote.


0

Here is my solution: (defun my-index () (interactive) (let* ((all-hls (cl-loop for entry in (org-export--collect-headline-numbering (org-element-parse-buffer) (org-combine-plists (org-export--get-export-attributes) (org-export--get-...


2

(setq org-export-with-tasks 'todo) As from description of variable, it can be placed as file local variable. Or you could include at in the #+OPTIONS line: tasks:todo, and you would get ignored DONE tasks by export. Review other options for this variable as well. This may have the following values: t include tasks independent of state. ‘...


1

Problem solved. I found this info on org website: Using Emacs packaging system Recent Emacs distributions include a packaging system which lets you install Elisp libraries. You can install Org with M-x package-install RET org. Important: You need to do this in a session where no ‘.org’ file has been visited, i.e., where no Org built-in ...


0

Went through the source code and it does not look like this is something you can change. However, I did find a way around it by just ignoring the contents argument and re-creating it myself by calling org-export-data on each of the AST node's contents, then joining them together. The backend machinery memoizes the results of exporting each node so this doesn'...


2

I typed C-h v (aka M-x describe-variable) and then org-capture-templates .... A cursory review of the doc-string led me to an interesting entry as follows: "%<...> The result of format-time-string on the ... format specification." So, now we can look up the function format-time-string -- C-h f (aka M-x describe-function) and see how to customize ...


1

You cannot with org-type tables. You can use table.el-type tables instead, but Org provides only limited support for them and you may (or may not) find the incompatibilites annoying. For example, here's the docstring of org-table-convert which lists some of the incompatibilities: Convert from Org table to table.el and back. Obviously, this only works ...


0

I recently find this issue post The fix is to add: (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") (I am running under Debian GNU/Linux 10 (buster) with Emacs 26.1)


1

Such an unknown block is called a special block. In org 9.0.3, section 11.8 of documentation ("Special blocks") says: Each export back-end decides if they should be exported, and how. When the block is ignored, its contents are still exported, as if the opening and closing block lines were not there. In section 12.15 (Exporting/Advanced ...


1

This can be achieved by using a skip function (globally, locally, with a custom org-agenda command) or by changing the default behavior with an advice. Both solutions are using the built-in function org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item. Therefore all org-agenda ignore timestamp settings are supported: org-agenda-todo-ignore-with-...


4

Assuming that the org- libraries have already been loaded ... Type: M-x customize-face RET org-ellipsis RET To see a list of all faces for the org- library, type: M-x customize-group RET org-faces RET If the org- libraries have not yet been loaded, then evaluate (require 'org) using something like M-x eval-expression aka M-: before querying a particular ...


1

I resolved it yesterday through elimination. Here is a workaround. I struggled with the same problem for some months. 4 different computers, install and re-install, emacs25 & 26. This is a problem with one or more of the files in the directory .emacs.d/elpa/org-9.2.1 Perhaps a more experienced person can say what those files are for (obviously Org-...


2

Here's my attempt. I learnt org-font-lock-set-keywords-hook on https://www.gonsie.com/blorg/org-highlight.html. The org-green face is defined in @amitp's answer. (defun org-add-my-extra-markup () (add-to-list 'org-font-lock-extra-keywords `(,(rx (group "{{") (group (+? anything)) (group "}}")) ...


2

There are two things you want. Apply a face (green text) to the area between {{ and }}. Hide the {{ and }}. For the first, you can define a green face and then use font-lock to mark the text: (defface org-green '((t :foreground "green4")) "Face for green text in org mode") (defun my/org-mode-font-lock () (font-lock-add-keywords nil '(("{{\\(.*...


0

If you like helm, here is an approach where you can choose the headings in helm, mark them, and the change the state on all of them. (require 'helm-org) (defun j-helm-org-todo (candidate) (let ((state (completing-read "State: " org-todo-keywords-1))) (save-excursion (cl-loop for marker in (helm-marked-candidates) do (goto-char marker)...


0

If you want to change them all to the same state with a single command you can use a function like this that works on a region or the buffer. (defun j-change-todo (start end state) "Change heading todo states in region defined by START and END to STATE. Operate on whole buffer if no region is defined." (interactive (list (if (region-active-p) (...


0

So, I decided to modify the condition to read (when (and org-export-hide-headlineonly (assoc-string 'exportHeadlineOnly (org-element-property :tags el))).


2

Probably just change $1 to $0. That will just put the cursor there to start typing. From the documentation: Tab stops are fields that you can navigate back and forth by TAB and S-TAB. They are written by $ followed with a number. $0 has the special meaning of the exit point of a snippet. That is the last place to go when you've traveled all the fields. ...


0

To indicate that you have completed the current repetition of a repeating task, use C-c C-t: this updates the properties and logs for the task, and sets it up for the next repeat. To indicate that you have completed a repeating task forever (i.e., it no longer repeats), use C-- 1 C-c C-t. This marks the task as done, and removes the repeater flag from the ...


1

I'm guessing we can move the point to the parent entry and check there: (defun org-agenda-ignore-inherited-p (&optional end) (catch 'found (while (org-up-heading-safe) (when (org-get-scheduled-time nil) (throw 'found (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item end)))))) (advice-add 'org-agenda-check-for-timestamp-...


0

This post is a wee bit old, but just in case. And Maybe I am not doing this right, but it always works for me. I always do a : before Scheduled or Deadline eg. :SCHEDULED: <2019-07-06 9:00AM +1w> I also think you should only do 1x + as in my example. I am GNU Emacs 25.3.1


1

You can still configure this by changing the variable org-structure-template-alist as before, but the format of that variable has been simplified. Before if you wanted <lem to expand to #+begin_lemma #+end_lemma you would add an entry ("lem" "#begin_lemma\n?#end_lemma") to org-structure-template-alist. Now, instead you just add ("lem" "lemma"). So for ...


Top 50 recent answers are included