sprig / org-capture-extension

A Chrome and firefox extension facilitating org-capture in emacs
MIT License
538 stars 56 forks source link

How to make it to working? #54

Closed vonpupp closed 5 years ago

vonpupp commented 6 years ago

Hi,

I cannot get the extension to work. It seems so that something is happening behind the scenes but I cannot get the text with the capture template. This is what I did:

org-protocol://capture?template=L&url=https%3A%2F%2Fgithub.com%2Fsprig%2Forg-capture-extension&title=sprig%2Forg-capture-extension%3A%20A%20Chrome%20and%20firefox%20extension%20facilitating%20org-capture%20in%20emacs&body=?

Additional information, I also use edit with emacs1 which uses an edit server. I don't think it is interfering but just in case it is worth mentioning.

I am not very experienced with emacs. Any idea please?

Thank you

kimonoki commented 5 years ago

Hi, I'm using a similar setup on Mac. Maybe you can try to check the emacsclient's path. For example I have to manually change the applescript to /usr/local/bin/emacsclient because I installed the emacs-plus via brew.

vonpupp commented 5 years ago

Thank you @kimonoki, I guess you are referring to include the full path on the org-protocol.desktop file handler, right?

kimonoki commented 5 years ago

I guess yes maybe something with the handler/emacsclient.

vonpupp commented 5 years ago

Thank you @kimonoki.

I got it working in spacemacs. If any other user stumbles with this, this is what I did:

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

  ;; ----------------------------------------------------------------
  ;; Org Protocol
  ;; ----------------------------------------------------------------
  (require 'org-protocol)

  ;; MODULES
  (setq org-modules (quote (org-habit)))
  (add-to-list 'org-modules 'org-protocol)

  ;; CAPTURE
  (setq org-capture-templates
    '(
      ("p" "Protocol" entry (file+headline "~/org/capture.org" "Inbox")
       "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
      ("L" "Protocol Link" entry (file+headline "~/org/capture.org" "Inbox")
       "* %? [[%:link][%:description]] \nCaptured On: %U")
      ...

This gist gave me the clues. You might want to use (server-start) as highlighted in the gist.

Moanrisy commented 5 years ago

I have the same problem, but it still didn't work