17

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


11

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.


8

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


8

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


7

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


6

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


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

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


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


5

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


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

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

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.


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

I solved the problems with uninstall all org-packages in elpa. Now the my .org files open without the error and the links work fine. Thanks to Tobias for his hints!


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


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

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

A capture template can contain arbitrary elisp code using the %(...) syntax. We just need a function that takes a string (which will be the region you are capturing) and strips the comment characters. The only fussy thing is learning what the comment start character is. This function runs in the capture buffer, not the original one so we have to jump back ...


3

org-capture already calls org-store-link and puts the information into a property list: (plist-get org-store-link-plist :annotation)


3

This binds SPC m c to opening the ~/capture.org file: (spacemacs/set-leader-keys "mc" (lambda () (interactive) (find-file "~/capture.org"))) The spacemacs manual explains how spacemacs/set-leader-keys works: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#binding-keys


3

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 Tuesday **** 20:45 test 1 **** 20:46 test 2 It solves the 3rd problem. Seems like using %<...> is the cleanest way to get a time-related string format. See ...


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