New answers tagged

0

In case you accept to share your pseudocode in LaTeX or PDF format, you could use the package minted to mix teletype & well-indented expression with LaTeX math expression. Here is an example of the well-known Prim's algorithm: #+begin_export latex \begin{minted}[escapeinside=||,mathescape=true]{text} Prim's Algorithm(|$V, s$|) |$T = \varnothing$| |$U = \...


2

org-tags-view shows matches in all agenda files: you have to add this file to your agenda files (at least temporarily). You can do that with C-c[: that adds it to the front of the agenda files. You can later delete it from the list if you want with C-c] (this will delete the file at the front of the list, so I'm assuming you have not added any other files in ...


0

Latest release (develop branch) of Spacemacs has the functions org-promote-subtree and org-demote-subtree that works perfectly. They can be triggered via , s h and , s l, respectively.


4

The Org syntax for the DEADLINE event differs from what you use in your question. Instead of * TODO fix this bug asap :PROPERTIES: :UPDATE: writing test cases almost there! :LASTUPDATED: 2019-11-25 :DEADLINE: 2019-11-30 :END: you should write: * TODO fix this bug asap DEADLINE: <2019-11-30 Sat> :PROPERTIES: :UPDATE: writing test cases almost there! :...


2

Try (setq org-attach-directory "/path/to/org-attach/directory/") ;; Note trailing /


0

Seem to have fixed it: though I don't know why. M-x set-face-font and chose the default option.


0

I believe the following works to literally copy a cell from one table to another. Try it and see: #+NAME: t1 | | 01/03.03 | | ^ | foo | #+NAME: t2 | 01/03.03 | #+TBLFM: @1$1='(identity remote(t1, @1$2)) although I'm not sure how useful it will be to you: it depends on what exactly you want to do afterwards. EDIT: I don't know why org mode adds ...


0

So far the only workaround for this problem for me has been to install org-mode-ox-odt package which exports to odt without any problem. https://github.com/kjambunathan/org-mode-ox-odt


2

For visitors who use Evil: you can use the evil-surround minor mode to deal with various kinds of markup, including plus signs for strike-through. Evil makes it quite convenient to work on the level of the visual-mode selection, lines or words. (I'm handling one line at a time, so not sure yet if there's support for identical normal-mode operations on ...


2

It appears that the function to call to browse a link in an org-mode file is org-open-at-point which is bound to C-c C-o. Edit: Regarding the follow-up question about opening an org-mode link in a secondary browser, using another function seems to work: (defun org-open-at-point-with-firefox () (interactive) ...


3

The following works for me: | | Fund A | Fund B | Fund C | Combined | |-----------+--------+--------+--------+----------| | US | .1 | .8 | .5 | 0.53 | | Europe | .2 | .1 | .4 | 0.19 | | Pacific | .7 | .1 | .1 | 0.28 | | Weighting | .3 | .5 | .2 | | #+TBLFM: @2$>..@&...


0

I am afraid that moving files manually will mess up my system, confuse my package manager and only work until the next update. Instead, you can simply added the true path for ditaa.jar to your .emacs or .emacs.d/init.el. In my case: (setq org-ditaa-jar-path "/usr/share/ditaa/lib/ditaa.jar")


0

You can add a noexport tag to headlines, in order to avoid exporting them: * This section is not going to be exported :noexport: The whole section (and all its subsections) is NOT going to be exported. See the manual and look for EXCLUDE_TAGS.


1

The file ob-core.el has a section Public API that contains the macro org-src-do-at-code-block. You can use that macro to analyze the source code block associated with the source edit buffer. The following example shows how it can be done. It returns the header arguments as an association list with the header argument names as keys and the values as strings....


2

You can add #+OPTIONS: d:nil in the preamble to prevent your drawer to be exported (and even all drawers). You can also customize (locally, or in your .emacs) the variable org-export-with-drawers. It is unclear to me what is your #+BEGIN_HIDE environment, and what you intend to write in it. But both your drawer and "hide" environment could be simply replaced ...


2

This works fine for me on 9.2.6: ** TODO Practice SCHEDULED: <2019-11-20 Fri .+1d> :PROPERTIES: :STYLE: habit :LAST_REPEAT: [2019-11-27 Wed] :END: It is hidden from the agenda view with S-K. As you surmised, the order has been tightened in order to allow easier parsing: scheduling information (SCHEDULED/DEADLINE) has to come right after ...


0

There is a simple way that I use myself Keep, e.g., eww as your default browser inside emacs (setq browse-url-browser-function #'eww-browse-url) Click a formated link and when you're visiting a webpage in eww you can hit & (eww-browse-with-external-browser) to open the page in an external browser, e.g. firefox (your system default browser)


0

I coded an alternative to the agenda option in the accepted answer. The function below prompts for a date to change the scheduled date of any heading in the region with a scheduled date, with a default of 14 days, and only reschedules it if the item is not done and if the previous date is in the past (though you can change that easily): ;; package for ...


0

I found a workaround to get what I want to do. Since I have N .org files that have multiple scheduled events, I can go to a single file (say, the file to handle work tasks) press C-c [ (org-agenda-file-to-front) which will show only this file as the weekly schedule. Still, I'd like to just filter by the WORK tag in the global schedule and get the view to ...


0

Just to be sure you know: M-x ielm will open IELM: a proper read-eval-print loop (REPL) for Elisp. Take a look at its documentation string (C-h f ielm RET) to get an idea of how powerful and flexible it is. I find IELM much more useful and usable than either lisp-interaction-mode -- the default mode for *scratch*, as noted by @lawlist -- or Org mode. Coding ...


0

Not sure that I understand correctly, but it seems to me you need C-RET (org-insert-heading-respect-content). This should create a new heading even though you are currently inside a list.


0

Adding a (org-reload) call at the end of my org mode config got rid of the issue. Reloading org 'upgraded' to Org mode version 9.2.6 (9.2.6-7-g634880-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20191125/) and this version does not seem to have the issue. I also commented the line :ensure org-plus-contrib. Here's the full config: (use-package org ;...


0

I do it using counsel-org-goto. Start a link with [[, run Counsel, select the heading, and then hit M-o i to insert the heading's path. Then close the link or add a custom description. You can instead use helm-imenu, inserting the selected candidate with C-c TAB, but then you get a bit of extra garbage in the buffer, which you have to delete. I'm sure there'...


0

Here is a short tutorial for all who want to use ODT export under Windows. I downloaded zip and unzip and put them into folders C:\Program Files\zip300xn and C:\Program Files\unz600xn, respectively. I set the exec-path variable as shown below using M-x customize-variable RET exec-path RET. When I try to export an Org Mode document to OpenOffice.org, I ...


0

In Emacs 26.2 you only need to set the variable org-replace-disputed-keys to true while enabling windmove-default-keybindings to have the default windmove keybindings work normally. You don't need to configure the variable org-support-shift-select as said by the answer of kolen if you don't need the shift selection function because enabling default windmove ...


0

Inside a plain list, type RET, then *, then space. It's the last step I was missing. Then indent the headline as needed with M-RIGHT.


0

TL;DR: (setq org-agenda-show-future-repeats nil). You have to set org-agenda-show-future-repeats to nil. The previous option org-agenda-repeating-timestamp-show-all has been removed from Org mode in version 9.1, as the new pair of options—the previously named org-agenda-show-future-repeats and org-agenda-prefer-last-repeat—provide a more fine ...


0

This did not have to do with the time frame I was specifiying. Instead it was a problem while parsing the .org files I includin agenda. A message was raised, `habit "Weekly Review has no scheduled repeat period or has na incorrect one." Initially I ignored this while trying to debug the agenda problems but when I set SCHEDULED: <2019-11-17 Sun ++1d> ...


3

Click on Options / Line wrapping in this buffer / Wrap at window edge to change it for the current buffer. To change it on a permanent basis, you will need to search your initialization file(s) for truncate-lines: somebody must be setting it to t for Org mode buffers. You will need to change that setting to nil. If it only happens on partial-width windows (...


0

Hm, I should have dug a little deeper... The solution is in the variable org-clocktable-defaults. I set it using (setq org-clocktable-defaults '(:maxlevel 2 :lang "en" :scope file :block nil :wstart 1 :mstart 1 :tstart nil :tend nil :step nil :stepskip0 nil :fileskip0 t :tags nil :match nil :emphasize nil :link nil :narrow 40! :indent t :formula nil :...


2

Try this package exec-path-from-shell which should solve your problem.


0

If you want a single org file that you share with others to get auto-filled put this as the first line: # -*- eval: (auto-fill-mode 1) -*- This will cause auto-fill minor mode to be used when the file is opened. This is part of a feature called 'local file variables'. It is often used to set tab width for code files. Emacs manual page on file variables


2

I haven't tried it yet but I think org-edna may be a solution. You can specify conditions that must exist before a task is set to DONE, and actions to take once it is. https://www.nongnu.org/org-edna-el/ There is an earlier package called org-depend, described here: https://karl-voit.at/2016/12/18/org-depend/


0

I was able to find the mode I was using for presentations at that time. I believe it was outline-presentation-mode which is a minor-mode for org-mode. It doesn't seem to be very popular, as I didn't see it in Melpa. However after loading the elip file manually I seem to be loading my presentation in emacs as I remember it: Links: https://p4bl0.net/shebang/...


0

Maybe you should just mention the drawer, this worked for me. (setq org-log-into-drawer LOGBOOK)


0

In normal/org mode you could use overlays, although I was told Org does similar things which might get in the way (see here). For now @ngm's answer is probably your best option, but in case it helps, here's one way to solve the first part of your question: (add-hook 'org-mode-hook (lambda () (org-map-entries (lambda () ...


0

working (setq ido-default-file-method 'selected-window) not working (setq ido-default-buffer-method 'selected-window) thanks to this link, but they point to the wrong solution works in selfcompiled [1] GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5) of 2019-10-20 [1] sudo apt build-dep emacs git clone git://git.sv.gnu.org/emacs.git ...


2

You can use remote references for this task. Essentially, they note that the reference (e.g. @5$2) shouldn't looked up in the current table, but in a foreign one. You only need a #+NAME to refer to other tables: ** First proposal #+NAME: First proposal | Section | Best case | Likely case | Worst case | Average | |---------+-----------+-------------+-------...


9

Here is a link to another thread you may be interested in, entitled "Is it possible to create an org-mode scratch buffer?": Is it possible to create an org-mode *scratch* buffer? New buffers that are not the *scratch* buffer, should default to fundamental-mode; e.g., when calling get-buffer-create. As to the *scratch* buffer, you can customize the initial-...


2

For the specific example you cite, I would execute M-z ,, where M-z is bound to zap-to-char. I don't know how well this would generalize to your daily usage though.


1

I don't know how to get it in to both normal view and the agenda view. But, in case it's helpful, one simple way to get effort into headlines in to the agenda view at least, is to edit org-agenda-prefix-format. (Also with this, you are restricted as to where exactly you can place the effort indicator. The prefix is everything before the headline itself, ...


4

You don't have one list here: you have two. The Text here... is a separate paragraph and that's not something you can have within a single list. The best that you can do, I think, is to tell your second list numbering to start with 3 (see the [@3] construct below), but note that if you add a third element to the first list, you will need to tweak the ...


2

If you want to get nice formatting, you can customize the CSS of blockquote element. Why blockquote element? If you use browser's inspect function to inspect the quote block, you can find its style is controlled by blockquote element. Below is an example of StackExchange like quote block, you can find the configuration by using inspect function. #+...


4

Two rules to take into account when solving your problem: Do not persistently mess up the syntax table if you do not see through all the consequences. It is used for many tasks. Do not advice forward-word to solve your problem. It is also used for many tasks you do not aprehend at the first look. But, what you can do is rebinding the keys for forward-char ...


1

I don't think you're seeing the image preview via imagemagick/dvisvgm, I think you might be seeing a unicode overlay maybe? If it is, according to the manual you should be able to toggle it with C-c C-x \ looking at the variable org-pretty-entities in M-x customize-variables may help you.


0

While this doesn't exactly answer the question, when you're in the agenda tag view you can filter the tags by using \ TAB and specifying another, this is probably the easiest approach. The default method in org-mode is to sort the tag-match agenda view by the sequence they are seen in the files (10.4.3 of the manual doesn't say it's alphabetical but it ...


0

Looking at the org manual section "Export settings", we can see that num sets the headlines that will be numbered: headline levels above this number will be unumbered. ‘num:’ Toggle section-numbers (‘org-export-with-section-numbers’). When set to number ‘n’, Org numbers only those headlines at level ‘n’ or above. Setting ‘UNNUMBERED’ ...


3

From 1, 3 to 2 Select all text: C-x h Remove indentation: M-x close-rectangle RET (Although kind of a hacky use of close-rectangle.) From 1, 2 to 3 Select all text: C-x h indent-region: C-M-\ From 3 to 1 With point at start of buffer: M-x replace-regexp RET ^ + RET <4 spaces> RET


1

C-x h C-M-\ goes directly from 1 to 3 The first part (C-x h) runs the command mark-whole-buffer, the second (C-M-\) runs indent-region. You can go from 1 or 3 to 2 with C-M-% ^ + RET RET, that runs the command query-replace-regexp to replace any sequence of whitespaces at the beginning of line with nothing. I don't know how to easily revert the change.


0

Here is a different approach, maybe someone will find this useful. This is a minor mode that patches get-text-property to fake the property 'yank-handler, which indicates which function to use for inserting. Then I use insert-rectangle for that. That way, this also works with helm-ring. (defvar my/is-rectangle-yanking nil) (defun my/insert-rectangle-...


Top 50 recent answers are included