Description
I use org-capture
extension which had been working great for about 6 months.
I have trouble making org-protocol
work from Firefox since 8/1/19. When hitting the extension button in FF, the page is captured (I got a gray background with "captured" message) but nothing happens in Emacs. This used to work fine until then.
I run Emacs 27.0.50 on Ubuntu 16.04 with org-mode 9.2.5 (and Firefox 68.0.1).
Diagnosis
- My org-protocol config in init:
(require 'org-protocol) ; call for org-protocol
(server-start)
(add-to-list 'load-path "~/.local/share/applications/org-protocol.desktop/") ;path to org-protocol
My org-protocol.desktop
file is set and mimeinfo.cache
is up to date.
- My
org-capture-templates
have not been edited and other templates (not called through the FF extension) work fine. The templates used by org-protocol are:
("L" "Web link" entry (file+headline org-default-notes-file "Web")
"** [%:description]%? \nSource: [[%:link][%:description]] \nCaptured: %U")
("p" "Web quote" entry (file+headline org-default-notes-file "Web")
"** [%:description]%? \nSource: [[%:link][%:description]] \nCaptured: %U \n#+BEGIN_QUOTE\n%i\n#+END_QUOTE")
- The FF extension runs well and sends capture instructions (the grey background ie 2nd snapshot on org-capture extension) according to FF console:
[1]
Capturing the following URI with new org-protocol: org-protocol://capture?template=p&url=http%3A%2F%2Fwww.mediaonfire.com%2Fblog%2F2017_07_21_org_protocol_firefox.html&title=Firefox%20and%20org-protocol%20URL%20Capture&body=emacsclient%20-n%20%22org-protocol%3A%2F%2F%2Fcapture%3Furl%3Dhttp%253a%252f%252fduckduckgo%252ecom%26title%3DDuckDuckGo%22
Org-protocol executes neatly on my other latptop running Emacs 24 (from Ubuntu repo) with similar config.
Conclusion
I'm having a hard time trying to understand what the problem is. I found some inspiration on this page and tried to run the test suggested. Adapted to my config, the test is:
[2]
emacs-snapshot "org-protocol://capture?template=p&url=http%3A%2F%2Fwww.mediaonfire.com%2Fblog%2F2017_07_21_org_protocol_firefox.html&title=Firefox%20and%20org-protocol%20URL%20Capture&body=emacsclient%20-n%20%22org-protocol%3A%2F%2F%2Fcapture%3Furl%3Dhttp%253a%252f%252fduckduckgo%252ecom%26title%3DDuckDuckGo%22"
with [1] object.
When Emacs is closed, a
frame opens with an empty buffer with mini-buffer saying file is write protected
.
I think this test drives me in the right direction to solve my problem but maybe this has nothing to do with that.