1 line
1.6 KiB
Plaintext
1 line
1.6 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>I am trying to create a shortcut to my current shortcut to my org-capture.</p> <p>- Current shortcut : <code>C-c c j</code></p> <p>- New shortcut : <code>F9</code> function key using following custom code</p> <pre><code>(defun my/journalcapture() "Journal entry by project" (interactive "P") (org-capture "j")) (global-set-key (kbd "<f9>") 'my/journalcapture) </code></pre> <p>The error I am getting is this</p> <p><strong>Wrong number of arguments: (lambda nil "Journal entry by project" (interactive "P") (org-capture nil "j")), 1</strong></p> <p>Org-capture function definition is as below</p> <p><code>org-capture (&optional goto keys)</code></p> <p>I am not able to understand what is <code>goto</code> and how to define <code>keys</code></p> <p>Previously, I have successfully set up shortcut for agenda. From <code>C-c a R</code> to <code>F12</code> using code below.</p> <p>I am not sure what's the difference.</p> <pre><code>(defun my/dailyagenda(&optional arg) "Daily agenda" (interactive "P") (org-agenda arg "R") (delete-other-windows)) (global-set-key (kbd "<f12>") 'my/dailyagenda) </code></pre> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/GeekSync"> /u/GeekSync </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/pmg0od/orgmode_capture_custom_keyboard_shortcut/">[link]</a></span>   <span><a href="https://www.reddit.com/r/orgmode/comments/pmg0od/orgmode_capture_custom_keyboard_shortcut/">[comments]</a></span> |