emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DISCUSSION] Possible inclusion of org-capture.el into Emacs core


From: Max Nikulin
Subject: Re: [DISCUSSION] Possible inclusion of org-capture.el into Emacs core
Date: Sat, 13 Jul 2024 22:37:03 +0700
User-agent: Mozilla Thunderbird

I have dropped emacs-devel from Cc.

On 30/12/2023 19:15, Ihor Radchenko wrote:
With org-protocol, one can also make Emacs receive data from browser and
perform any action defined by custom handler function - all fully
configurable and not necessarily related to Org mode.

and

Ihor Radchenko [SUMMARY] #8 [[bbb:OrgMeetup]] on Wed, June 12, 19:00 UTC+3. Sat, 22 Jun 2024 08:32:40 +0000.
<https://list.orgmode.org/87h6dlidhz.fsf@localhost>
  - Splitting Org into multiple small libraries is also a step forward
    toward more modular Org and to converting some Org-specific
    libraries to proper Emacs libraries, as requested by RMS:
    https://list.orgmode.org/E1kIkxv-0007iy-Av@fencepost.gnu.org/
[...]
      - org-protocol :: Processing external input into Emacs (from
        command line, from clicked Urls as url handler). Unlike
        running commands directly (which is unsafe), =org-protocol= can
        be used for safe interaction with external processes

I have nothing against adding org-capture to Emacs core, but I think org-protocol should be just obsoleted. Since `server-eval-args-left' has been added to emacs-30, hacks from org-protocol have a little value. The new feature allows to implement handlers of URL schemes in a safe way and to avoid backslash hell similar to emacsclient-mail.desktop.

A tiny package may be created for convenience to have single .desktop file for all URI protocols (mailto:, org-protocol:). Leaving aside tricks with --display, handler should be like

     emacsclient --eval "(handle-url)" %u

or %U for multiple URLs. Packages just register supported protocols in e.g. an alist and the dispatcher calls a function for matched scheme with an argument from `server-eval-args-left'.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]