22

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 week in your example. While this answers the first part of your question of showing what tasks were worked on per day, you'll still see those tasks under a ...


12

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-current-date)) (goto-char (point-at-eol)) (when (not (re-search-forward (format org-complex-heading-regexp-format (...


10

Credits to awalker4 from reddit! (add-hook 'org-capture-mode-hook 'evil-insert-state)


9

You can just type a time, eg 9am, or 1:30pm in the minibuffer.


9

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, last table line, last list item...). Setting this property will change that. See the related post Using properties in org-mode capture templates, where for ...


9

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 allow this part to evaluate: (setq org-capture-templates `(("j" "Journal" entry (file+datetree "~/org/journal.org") ,(concat "* " (format-time-string ...


9

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 "" "my table") "|%?| Blah |"))))) I can run org-capture and it appends a line to the table. If it doesn't find your org file, you may need to replace ...


9

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 continue using the default tasks template in addition to your own templates, you need to add it explicitly. It takes a bit of digging to find it, hidden in the code of ...


8

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 concating a path to org-directory, I think that the path you provide should be relative to org-directory, not an absolute path. In your case you might want to set: ...


7

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 ...


6

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-%S.org"))) (add-to-list 'org-capture-templates '("x" "Template Name" plain (function my/org-file-by-date) "Capture ...


6

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).


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

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-name-directory buffer-file-name) "notes.org")) "Copied regions") "* %^{Title} %U \n %i") )) does the job.


6

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-get org-capture-plist :description))) (if org-note-abort (message "Template with key %s and description “%s” aborted" key desc) (message "...


6

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 C-c c you should be able to use C-u C-u C-c c. By default org-capture will also set a bookmark org-capture-last-stored so you can jump there using standard ...


6

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 inside a string and needs to be escaped. ("J" "Jobs" entry (file+headline "~/org/NOTES.org" "Jobs") ; jobs "* TODO %^{Name of Job}\nSCHEDULED: %(org-insert-time-...


5

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-0 C-c c to choose a capture template and insert in the current buffer. You can always bind this to some other key sequence, if using a prefix isn't ...


4

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 the unwanted link was coming from. I resolved the issue by adding a template string, * %?. So now my template customization looks like this: '(org-capture-...


4

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 consolidate all that information in Agenda Views. Morever you can quickly store notes with little interruption to your workflow. There's a wealth of information ...


4

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 filed as the child of the target entry or as a top-level entry. item a plain list ...


4

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 if these functions call search-forward and friends or looking-at and friends directly or indirectly through calling other functions. Solve this problem by ...


4

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 by one day and assigns the new date to that variable, which is obviously a workaround so use it with caution: (advice-add 'org-capture :around (...


3

It seems Org-mode's archiving function is not popular. Here's what I found: By using toggle ARCHIVE tag / to ARCHIVE sibling C-c C-x a/A, the content of completed tasks stay in work.org. It seems to me it does not offer significantly performance improvement over a large Org file - if the chunk you have to archive is really large. One can search archived ...


3

I have devised a "hacky" solution. I have rewrite the make-capture-frame to support an optional argument, and directly call org-protocol-capture with this argument if it exist. (defun make-capture-frame (&optional capture-url) "Create a new frame and run org-capture." (interactive) (make-frame '((name . "capture") (width . 120) ...


3

To my overwhelming exasperation, the problem has turned out to be: emoji-cheat-sheet-plus-display-mode, and the order in which it was activated in org mode. I had a hook like so: (defun text-settings () (emoji-cheat-sheet-plus-display-mode)) (add-hook 'org-mode-hook 'text-settings) Somehow -- and I have no idea how -- this was causing the horrible ...


3

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 has been initiated from. The following addition to your capture template will insert the line-number at point in the original buffer: %(with-current-buffer (org-...


3

I modified the screenshot function to adapt to take a screenshot in Org-capture buffer. (defun org-insert-clipboard (&optional caption) (interactive "P") (let* ((image-dir (if (not (buffer-file-name)) (let ((buffer-name (replace-regexp-in-string "CAPTURE-[0-9-]*" "" (buffer-name)))) (concat (file-name-directory (buffer-file-...


3

The best option here would be to configure your capture templates to add entries under a certain heading (e.g Tasks or Notes). That way the other content of the target file is not affected. See the examples in the Org manual: ("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") "* TODO %?\n %i\n %a") Another option would be to customize org-...


3

In the capture window you can use standard Org commands. So at any point you could hit C-c C-q (the default binding for org-set-tags-command) to add tags. Refer to the Setting Tags section in the Org manual for more details about tag completion. Update: As noted in the comments, this doesn't quite work. By default tag completion is derived from the ...


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