Ryan Prior via "General discussions about Org-mode." <emacs-orgmode@gnu.org> writes:
> Lately I've noticed more applications supporting a method of creating a link > by pasting a URL. The flow works like this: > 1. write some text > 2. select the text you want to linkify > 3. paste a URL to turn the selected text into a named link > > This feature is supported many places (including Matrix, Zulip, GitLab, and > many others) and I've found it to be convenient. To that end, I've created a > proof of concept package called yank-dwim[1] that implements a > yank-dwim-org[2] command, which when used as a replacement for yank in > org-yank-generic, produces the effect I'm looking for. > > What do you think about adding this capability to org-mode? Since many > plain-text writing interfaces are offering it, I'm sure other users will > appreciate if Emacs does the same. That looks like a good optional addition. > If you're open to a patch, how do you like my implementation in the linked > package? I'm happy to take a different approach if you prefer something else. > ... > [2] https://github.com/ryanprior/yank-dwim/blob/main/yank-dwim.el#L85 I think that the most canonical approach to implement this would be via `yank-transform-functions' and setting 'yank-handler text property (see 33.8.3 Yanking section of Elisp manual). -- Ihor Radchenko // yantar92, Org mode maintainer, 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>