-
-
Save cjp/64ac13f5966456841c197f70c7d3a53a to your computer and use it in GitHub Desktop.
;; I have no idea why it works. This is the product of 4 hours of trial-and-error. | |
(defun dotspacemacs/user-init () | |
"Initialization function for user code. | |
It is called immediately after `dotspacemacs/init'. You are free to put almost | |
any user code here. The exception is org related code, which should be placed | |
in `dotspacemacs/user-config'." | |
(server-start) | |
(require 'org-protocol) | |
) | |
(defun dotspacemacs/user-config () | |
"Configuration function for user code. | |
This function is called at the very end of Spacemacs initialization after | |
layers configuration. You are free to put any user code." | |
(with-eval-after-load 'org | |
(add-to-list 'org-modules 'org-protocol) | |
(setq org-capture-templates '( | |
("p" "Protocol" entry (file+headline "~/org/notes.org" "Inbox") | |
"* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?") | |
("L" "Protocol Link" entry (file+headline "~/org/notes.org" "Inbox") | |
"* %? [[%:link][%:description]] \nCaptured On: %U"))))) |
You saved me much misery,
how will I ever repay you?
Thanks kindly
Another 👍 from Me
(on the develop branch)
Putting the require
into user-init
causes other org-mode modules to break with errors like Problems while trying to load feature ‘org-info’
.
Putting it into user-config
seems to work though.
(on the develop branch)
Putting therequire
intouser-init
causes other org-mode modules to break with errors likeProblems while trying to load feature ‘org-info’
.
Putting it intouser-config
seems to work though.
Yes, you need to wait for spacemacs to finish loading, and then configure org mode, since they use their own version, otherwise you are loading old org mode with the require
and then spacemacs tries to load it's own version
also no need to (server-start),
use
;; If non-nil, start an Emacs server if one is not already running.
;; (default nil)
dotspacemacs-enable-server t
instead.
nice one, ty for sharing!
I moved "(require 'org-protocol)" to user-config to make it work.