emacs/var/elfeed/db/data/8e/8ee06c405409c4fb64e713dec16c574b5989ea06
2022-01-03 12:49:32 -06:00

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() &quot;Journal entry by project&quot; (interactive &quot;P&quot;) (org-capture &quot;j&quot;)) (global-set-key (kbd &quot;&lt;f9&gt;&quot;) &#39;my/journalcapture) </code></pre> <p>The error I am getting is this</p> <p><strong>Wrong number of arguments: (lambda nil &quot;Journal entry by project&quot; (interactive &quot;P&quot;) (org-capture nil &quot;j&quot;)), 1</strong></p> <p>Org-capture function definition is as below</p> <p><code>org-capture (&amp;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&#39;s the difference.</p> <pre><code>(defun my/dailyagenda(&amp;optional arg) &quot;Daily agenda&quot; (interactive &quot;P&quot;) (org-agenda arg &quot;R&quot;) (delete-other-windows)) (global-set-key (kbd &quot;&lt;f12&gt;&quot;) &#39;my/dailyagenda) </code></pre> </div><!-- SC_ON --> &#32; submitted by &#32; <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> &#32; <span><a href="https://www.reddit.com/r/orgmode/comments/pmg0od/orgmode_capture_custom_keyboard_shortcut/">[comments]</a></span>