25 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 ...
user avatar
12 votes
Accepted

Is it possible to file a capture template in a subheading of a day in a datetree?

You can achieve what you want by defining a custom function that returns the target location for template expansion: (defun org-find-heading-in-datetree () (org-datetree-find-date-create (calendar-...
user avatar
  • 14.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)
user avatar
  • 912
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 ...
user avatar
  • 1,775
10 votes
Accepted

Can' t set directory for org-mode capture

Make sure you have the line (require 'org) before you set the location. This will ensure that the package org where org-directory is defined is loaded before it is used. Also, if you are adding ...
user avatar
  • 4,575
10 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 ...
user avatar
  • 20.5k
9 votes
Accepted

Change the time when picking a date?

You can just type a time, eg 9am, or 1:30pm in the minibuffer.
user avatar
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, ...
user avatar
  • 549
9 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 ...
user avatar
  • 391
9 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 "...
user avatar
9 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 ...
user avatar
  • 2,231
8 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 ...
user avatar
  • 19.4k
7 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 ...
user avatar
  • 2,376
6 votes
Accepted

Emacs: function to make a file with date/time as filename, and a shortcut for it

You should be able to use the function target form to do this: (defun my/org-file-by-date () "Create an Org file with current time as name." (find-file (format-time-string "~/org/%Y-%m-%d--%H-%M-%...
user avatar
  • 2,604
6 votes
Accepted

How to make a capture task template that stores a new task at point in the file I am in?

From the org-capture help: When called with a ‘C-0’ (zero) prefix, insert a template at point. So C-0 C-c c does what want (assuming C-c c is bound to org-capture).
user avatar
  • 12.2k
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-...
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-...
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-...
user avatar
  • 19.4k
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 ...
user avatar
  • 3,329
4 votes
Accepted

How to remove the link from org-capture templates

The documentation I linked to in my original question mentions that if no template string is specified "an appropriate default template will be used." Apparently that default template must be where ...
user avatar
  • 2,763
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 ...
user avatar
  • 549
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 ...
user avatar
  • 12.2k
4 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 ...
user avatar
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 ...
user avatar
  • 30.5k
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 ...
user avatar
4 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 ...
user avatar
  • 3,494
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 ...
user avatar
  • 1,453
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 \&...
user avatar
  • 2,376
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 ...
user avatar
3 votes

Current time timestamp in org-capture-templates

According the help for org-agenda-capture (bound to k in agenda views) Call ‘org-capture’ with the date at point. With a ‘C-1’ prefix, use the HH:MM value at point (if any) or the current HH:MM ...
user avatar
  • 12.2k

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