Skip to main content
Share Your Experience: Take the 2024 Developer Survey
31 votes
Accepted

org-mode: how to generate clock report for hours worked each day?

I think you might consider this to be a partial solution to your question. If you include :step day in your clocktable line then you'll get several clock tables emitted -- one per day for the current ...
Stuart Hickinbottom's user avatar
12 votes
Accepted

where is default org mode capture template for tasks located

The default capture templates are only available if you haven't set a value fororg-capture-templates, which means @Dan's suggestion of using add-to-list won't work in this case. If you want to ...
Tyler's user avatar
  • 22.3k
11 votes
Accepted

Evil mode - How to go into Insert mode after Org-capture with %? cursor placement

Credits to awalker4 from reddit! (add-hook 'org-capture-mode-hook 'evil-insert-state)
irregular's user avatar
  • 1,022
11 votes
Accepted

Cannot use concat within org-capture template

Okay, figured it out! Because the template was quoted '(("j"... the concat expression was not being evaluated. What I needed to do was use backquote and then insert a , before the concat statement to ...
Adam's user avatar
  • 1,897
11 votes
Accepted

after org-capture, how to go to the content that I saved?

Org provides a couple ways to jump to the most recent captured item. The org-capture command can be called with a C-u C-u prefix to jump to the last entry. For example if you have bound org-capture to ...
glucas's user avatar
  • 20.6k
10 votes

org-mode: how to generate clock report for hours worked each day?

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 ...
Lei Zhao's user avatar
  • 421
10 votes
Accepted

Org capture into org table

Yes, it is. For example, with this org file: * my table | blah | blah | And this elisp: (custom-set-variables '(org-capture-templates (quote (("t" "Table" table-line (file+headline "...
Croad Langshan's user avatar
10 votes
Accepted

How to use a org-capture template expansion several times in a captured note

On the page you linked, it says you can reuse a prompt value with %\1. Instead of %^{Name of Job} twice, use %\\1 for the second occurrence in your template. You'll need the extra \ because it's ...
amitp's user avatar
  • 2,541
9 votes
Accepted

Set org-capture datetree write on top of the file

From the Org-Mode Manual, you can add the following template element to your custom captures: :prepend t Normally new captured information will be appended at the target location (last child, ...
nyameko's user avatar
  • 555
9 votes
Accepted

Change the time when picking a date?

You can just type a time, eg 9am, or 1:30pm in the minibuffer.
John Kitchin's user avatar
  • 11.9k
9 votes
Accepted

Is it possible to organize the capture templates selection screen?

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 ...
Muihlinn's user avatar
  • 2,634
6 votes
Accepted

Org capture template not working (when trying to set local notes file)

As the docs say, you can supply a function (with no arguments) to set the file here. Thus: (setq org-capture-templates '(("x" "local notes" entry (file+headline (lambda () (concat (file-...
Fran Burstall's user avatar
6 votes

In org mode, how can I make a post-capture hook run only for certain capture templates?

See my answer here: https://emacs.stackexchange.com/a/48566/18296 Here’s the example code from it: (defun tina/test-finalize () (let ((key (plist-get org-capture-plist :key)) (desc (plist-...
Tina Russell's user avatar
5 votes
Accepted

How to Org Capture at current location?

You may be looking for this, from the org-capture doc: When called with a ‘C-0’ (zero) prefix, insert a template at point. So if you have org-capture bound to for example C-c c, then you could use C-...
glucas's user avatar
  • 20.6k
5 votes

Capture template like org-journal

This is the best I get: ("j" "Journal" entry (file+olp+datetree "~/org/journal.org") "** %<%H:%M> %?\n") It generates entries like this * 2018 ** 2018-03 March *** 2018-03-20 ...
Mingwei Zhang's user avatar
5 votes
Accepted

Using user prompted file name for org-capture in template

You can achieve this via some dedicated variables. (defun my/generate-org-note-name () (setq my-org-note--name (read-string "Name: ")) (setq my-org-note--time (format-time-string "%...
Amos's user avatar
  • 466
5 votes

after org-capture, how to go to the content that I saved?

You can also put :jump-to-captured t as a property at the end of your capture definition in setq org-capture-templates. It will then automatically jump to the point where your capture was created.
Rareform's user avatar
  • 219
5 votes
Accepted

org-mode datetree forward one day in the future

If you look at the org-capture code, there's a :default-time property which by default uses the current time or the value of org-overriding-default-time. What the advice does is it shifts today's date ...
jagrg's user avatar
  • 3,924
5 votes
Accepted

org-capture-templates allows file+headline to capture to a headline. How can I capture to a sub-headline?

You can use file+olp like: (setq org-capture-templates ("j" "Job 1" entry (file+olp ,(concat org-directory "/work.org") "Job 1" "Works") &...
Tianshu Wang's user avatar
  • 1,764
4 votes
Accepted

Add line number to org-capture

The org-capture function puts some properties into the org-capture-plist, i. a. :original-buffer, :original-file and :original-file-nondirectory, which all point to the buffer/file where the capture ...
mutbuerger's user avatar
  • 3,504
4 votes
Accepted

Can I create a checklist entry using org-capture?

You have to change the third element the template ("entry type"). From the help: type The type of entry. Valid types are: entry an Org node, with a headline. Will be ...
erikstokes's user avatar
  • 12.9k
4 votes
Accepted

Creating templates in emacs

You'll want to take a look at Agenda Views, Org-Mode Capture Templates and / or YASnippet. With Org-Mode you can set up capture templates for various tasks and for different target locations, and ...
nyameko's user avatar
  • 555
4 votes
Accepted

Match data clobbered by buffer modification hooks

The error message Match data clobbered by buffer modification hooks is caused by functions in the hooks before-change-functions or after-change-functions modifying the match data. That may happen ...
Tobias's user avatar
  • 33.2k
4 votes
Accepted

How to specify org-capture template for a weekly journaling

Here is what you are looking for: ("w" "Weekly" item (file+olp+datetree (concat org-directory "Weekly.org")) "* %?" :tree-type week) You need to specify a capture template ("* %?" above). The ...
Erik Hetzner's user avatar
4 votes
Accepted

org-capture: prompt for a target file

One way is to write a custom function and use it as target: (function function-finding-location). But this would get complicated. Another way is to use a variable as file and then use a wrapper ...
Hubisan's user avatar
  • 1,735
4 votes
Accepted

Org mode capture template for repeat tasks

You can achieve that using template expansion. As %(EXP) will expand a lisp expression, you can take advantage of it. Rewriting the template's scheduled part to this will do it SCHEDULED: %(concat \&...
Muihlinn's user avatar
  • 2,634
4 votes
Accepted

Turn off fringe character for org-capture

Org Capture sets a bookmark for the last stored item. The bookmark library is responsible for setting this fringe mark, not org. Check out the option bookmark-set-fringe-mark, which was introduced in ...
Oliver Taylor's user avatar
4 votes
Accepted

How to programmatically create a new org-roam file?

I made something similar that might help: (defun org-roam-fast-make-link (s) "Make an org-roam node with title S and return a link to it. We eschew the usual org-capture approach for ...
Fran Burstall's user avatar
4 votes
Accepted

What is org-capture trying to write to my init.el file?

All you have to do is read the stack trace. … customize-save-variable(bmkp-last-as-first-bookmark-file "~/agenda/bookmark.txt") bookmark-save() bmkp-maybe-save-bookmarks() bookmark-...
db48x's user avatar
  • 18.2k
3 votes
Accepted

Optional prompts in org-capture template using helm?

C-ENTER seems to work for me when in the template substitution helm, which helm binds to helm-cr-empty-string in the helm interface. (There's probably a better way of discovering this, but I just did ...
Stuart Hickinbottom's user avatar

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