emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: rms@gnu.org
Cc: hanno@hoowl.se, emacs-devel@gnu.org, emacs-orgmode@gnu.org
Subject: Re: [DISCUSSION] Possible inclusion of org-capture.el into Emacs core (was: [ELPA] New package: jami-bot and org-jami-bot)
Date: Mon, 01 Jan 2024 14:05:16 +0000	[thread overview]
Message-ID: <87jzotm9nn.fsf@localhost> (raw)
In-Reply-To: <E1rK9Sr-0004ER-JE@fencepost.gnu.org>

Richard Stallman <rms@gnu.org> writes:

> NOTE: Is it absolute;y necessary to cross post to emacs-devel and
> emacs-orgmode?

This branch of the discussion is also about Org mode development. And we
discuss Org mode development in our mailing list. Not all Org mode users
and contributors are subscribed to emacs-devel, so they would miss this
thread if I did not cross-post.

> Could you please explain in a few lines what sort of jobs org-protocol.el does?
> The doc you sent
> ...
>
> describes in a low-level way _how_ to use it, but in order to think
> about that, the first thing I need to know is _what jobs it can do_.

1. Send web pages (urls, page title, text selection) from browser to
   Emacs buffers. This is often used to "bookmark" pages using Emacs.

2. Save web links from browser/command line into Org link kill ring.

3. Locate and open local source of web pages in Emacs.
   For example, when users have a local git clone of Org wiki pages
   (https://orgmode.org/worg/), they can open Org mode file
   corresponding to any Org wiki page opened in browser in Emacs.

All the above can also be done from command line or by invoking system
URI handler - from any application that knows how to open custom URI
schema.
        
(1) and (2) are specific to Org mode and will be left as a part of Org
package. But the core framework and maybe (3) might be upstreamed.

The above can also be achieved by invoking emacsclient --eval, but
org-protocol (1) makes it safer as only pre-defined Elisp code will be
evaluated, preventing security issues; (2) integrates with OS URI
handlers.

>   > 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.
>
> Could you state a few examples?

In addition to the above 3 examples there are many possibilities.

Say, one can take some proprietary web page like reddit, and make it
open using Emacs reddit frontend.

Or save a quick note right from terminal outside Emacs
emacsclient "org-protocol://capture?title=A quick note for later"

> Also, how is this related to Org mode?  Why call it "org-protocol" rather
> tham some other name?

(1) is using org-capture library to put the received
url/title/annotation into user-defined template and save the filled
template into Org files.

(2) is using `org-store-link' to save url/title as Org mode link.

>       > 17.16.3 The open-source protocol
>       > ... The open-source handler is designed to help with editing local
>       > sources when reading a document..
>
> What document does that come from?

Org mode manual.
You can evaluate (info "(org)Protocols") to get there in Emacs.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-01-01 14:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <875y0i7e43.fsf@hoowl.se>
     [not found] ` <E1rJPu5-0006ML-UM@fencepost.gnu.org>
2023-12-30 12:15   ` [DISCUSSION] Possible inclusion of org-capture.el into Emacs core (was: [ELPA] New package: jami-bot and org-jami-bot) Ihor Radchenko
2023-12-30 17:43     ` Stefan Kangas
2024-01-01  3:34     ` Richard Stallman
2024-01-01  3:59     ` Richard Stallman
2024-01-01 14:05       ` Ihor Radchenko [this message]
2024-07-13 15:37     ` [DISCUSSION] Possible inclusion of org-capture.el into Emacs core Max Nikulin
2023-12-30 12:43   ` [DISCUSSION] org-capture.el vs remember.el (was: [ELPA] New package: jami-bot and org-jami-bot) Ihor Radchenko
2023-12-30 17:20     ` Stefan Kangas
2023-12-30 19:16       ` João Távora
2023-12-30 19:19         ` João Távora
2023-12-31 18:05         ` Adam Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzotm9nn.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=hanno@hoowl.se \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).