让org协议在Firefox Quantum上工作--`没有要编辑的服务器缓冲区`error

让org协议在Firefox Quantum上工作--`没有要编辑的服务器缓冲区`error,firefox,emacs,org-mode,Firefox,Emacs,Org Mode,所以我第一次尝试在FirefoxQuantum上使用org协议。我浏览了各种博客文章和文档,但仍然无法克服这个特殊错误 Greedy org-protocol handler. Killing client. No server buffers remain to edit. 因此,我在Ubuntu Linux x64 16.04和新发布的Firefox Quantum上使用emacs 25.3 我试着用两种方法来做这件事 通过创建桌面条目然后在Firefox中设置bookmarklet来

所以我第一次尝试在FirefoxQuantum上使用
org协议
。我浏览了各种博客文章和文档,但仍然无法克服这个特殊错误

Greedy org-protocol handler.  Killing client. 
No server buffers remain to edit.
因此,我在Ubuntu Linux x64 16.04和新发布的Firefox Quantum上使用emacs 25.3

我试着用两种方法来做这件事

  • 通过创建桌面条目然后在Firefox中设置bookmarklet来设置
    组织协议的传统方法

  • 在Firefox中使用
    org-capture
    插件

  • 两者都给了我同样的错误

    对于方法1,我遵循了stackexchange post以及非常有用的步骤:

    还有这个有用的博客

    以下是我所做的:

    A.我创建了一个桌面条目:

    [Desktop Entry]
    Name=org-protocol
    Exec=emacsclient -n %u
    Type=Application
    Terminal=false
    Categories=System;
    MimeType=x-scheme-handler/org-protocol;
    
    B.将配置添加到
    .spacemacs
    文件中

    我添加了以下行:

    (server-start)
    (require 'org-protocol)
    
    然后在我的
    .spacemacs
    文件中设置捕获模板:

    (setq org-capture-templates
          (quote 
                  ("p" "org-protocol" entry (file+headline "~/Dropbox/config/org/refile/refile.org")
                    "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%:initial\n#+END_QUOTE\n\n\n%?")
                  ("l" "org-protocol link" entry (file "~/Dropbox/config/org/refile/refile.org")
                    "* %? [[%:link][%:description]] \nCaptured On: %U")
    ... Additional templates.
    ))
    
    (server-start)
    (require 'org-protocol)
    
    (setq org-capture-templates `(
        ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org") "Inbox")
            "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
        ("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org") "Inbox")
            "* %? [[%:link][%:description]] \nCaptured On: %U")
    ))
    
    C.然后我创建了带有以下位置的bookmarklet:

    javascript:location.href='org-protocol://store-link://l/'+encodeURIComponent(location.href)
    
    javascript:location.href='org-protocol://capture://l/'+encodeURIComponent(location.href)+'/'+encodeURIComponent(document.title)+'/'+encodeURIComponent(window.getSelection())
    
    在所有这些之后,我仍然得到上面提到的错误消息

    其次,我在Firefox中尝试了
    org-capture
    插件。但它也不起作用

    不确定错误的原因是什么。感谢您的帮助


    在其他阅读中,当
    组织捕获
    模板出现问题时,人们会得到这个
    贪婪
    错误,但我没有发现任何错误

    我过去也遇到过一些麻烦

    现在我使用的解决方案是->您可以直接从Firefox安装它。这真的很简单,就我而言,它是开箱即用的(Debian发行版,Firefox 52.5.0)。但我不知道Firefox Quantum是否可以使用它

    按常规配置。就我而言:

    cat > "${HOME}/.local/share/applications/org-protocol.desktop" << EOF
    [Desktop Entry]
    Name=org-protocol
    Exec=emacsclient %u
    Type=Application
    Terminal=false
    Categories=System;
    MimeType=x-scheme-handler/org-protocol;
    EOF
    
    在Emacs
    init.el
    文件中:

    (setq org-capture-templates
          (quote 
                  ("p" "org-protocol" entry (file+headline "~/Dropbox/config/org/refile/refile.org")
                    "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%:initial\n#+END_QUOTE\n\n\n%?")
                  ("l" "org-protocol link" entry (file "~/Dropbox/config/org/refile/refile.org")
                    "* %? [[%:link][%:description]] \nCaptured On: %U")
    ... Additional templates.
    ))
    
    (server-start)
    (require 'org-protocol)
    
    (setq org-capture-templates `(
        ("p" "Protocol" entry (file+headline ,(concat org-directory "notes.org") "Inbox")
            "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
        ("L" "Protocol Link" entry (file+headline ,(concat org-directory "notes.org") "Inbox")
            "* %? [[%:link][%:description]] \nCaptured On: %U")
    ))
    
    就这些。在我的配置下,它可以工作,我希望这对你来说也是一样的



    额外:不久前,我建议对ArXiv.org标题进行一个小的模板改进,详细信息如下:

    好的,这是一个棘手的解决方案。该问题是由
    use包
    emacs包中最近的一些更改引起的。这个问题记录在github上

    让我告诉你我是如何发现这个问题的,以防你让其他人注册类似的问题

    我按照您在自述文件中的建议设置了OrgCapture扩展,但是在EmacsMessages缓冲区中不断出现以下错误(发布在下面)。我在Ubuntu 16.04x64上使用Emacs 25.3,同时使用新的Firefox Quantum浏览器和Chrome浏览器

    因此,我尝试使用以下命令手动通过EmacClient传递链接

    emacsclient -n "org-protocol:///capture?url=http%3a%2f%2fduckduckgo%2ecom&title=DuckDuckGo"
    
    但我在消息缓冲区中不断得到这种奇怪的响应,在警告349和警告931之间存在循环行为

    condition-case: Symbol’s value as variable is void: use-package--warning349
    condition-case: Symbol’s value as variable is void: use-package--warning931
    condition-case: Symbol’s value as variable is void: use-package--warning349
    condition-case: Symbol’s value as variable is void: use-package--warning931
    condition-case: Symbol’s value as variable is void: use-package--warning349
    

    该解决方案在github问题中有记录,但我认为用户不应该手动实现修复。相反,我认为作者将进行更改并将其合并到master中——此时用户可以重新下载并安装
    use-package

    谢谢你的来信。是的,我也在Firefox中尝试了org-capture扩展,但仍然不断出现错误
    没有服务器缓冲区可以编辑
    。我会在sprig回购协议下发布,看看他有什么建议。是的,我也希望看到Arxiv文件的模板。太好了。好的,谢谢你的反馈。对不起,关于这个错误我不知道。如果您解决了问题,请随时通知我们。您看过此帖子吗?->是的,我看到那个帖子了。我认为在这种情况下,原因是模板快捷方式与扩展设置不匹配。因此,用户使用的是“w”而不是“p”。然而,在我的例子中,我使用的是正确的“p”扩展名。我甚至复制并粘贴了您在帖子中指定的捕获模板,但仍然遇到了这个问题。同样的问题也发生在谷歌浏览器上。所以在某个地方我有一个配置问题,但不确定在哪里。好吧,听到这个消息我很难过。我希望你能设法解决它,目前我没有其他想法。我完全按照我在在线资源中看到的步骤进行了操作。我发现问题出在潘多克身上。我是一个天真的Linux用户,我只是在终端上运行一次pandoc,然后打开emacs,然后一切都很好。最初的问题似乎是pandoc没有被正确调用。