* Call code block via link?
@ 2022-09-10 5:15 Felix Dorner
2022-09-10 6:09 ` Ihor Radchenko
2022-09-19 9:59 ` Fraga, Eric
0 siblings, 2 replies; 5+ messages in thread
From: Felix Dorner @ 2022-09-10 5:15 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
I have a silenced codeblock, that I postprocess to push the result (a
password) onto the kill-ring, and then returns "Password copied" (showing
in the status line). This works very nicely. I'm now looking for the cherry
on the cake: I'd like to render the #+CALL as a link, e.g. something like,
[Copy the secret thing]. Clicking/following the link would execute the call
and my password ready to paste elsewhere. Feasible?
--
Linux. The choice of a GNU generation.
[-- Attachment #2: Type: text/html, Size: 634 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Call code block via link?
2022-09-10 5:15 Call code block via link? Felix Dorner
@ 2022-09-10 6:09 ` Ihor Radchenko
2022-09-19 9:59 ` Fraga, Eric
1 sibling, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2022-09-10 6:09 UTC (permalink / raw)
To: Felix Dorner; +Cc: emacs-orgmode
Felix Dorner <felix.dorner@gmail.com> writes:
> I have a silenced codeblock, that I postprocess to push the result (a
> password) onto the kill-ring, and then returns "Password copied" (showing
> in the status line). This works very nicely. I'm now looking for the cherry
> on the cake: I'd like to render the #+CALL as a link, e.g. something like,
> [Copy the secret thing]. Clicking/following the link would execute the call
> and my password ready to paste elsewhere. Feasible?
You can use inline babel call. See
https://orgmode.org/manual/Evaluating-Code-Blocks.html#Evaluating-Code-Blocks
If you want link specifically, see
https://github.com/yantar92/emacs-config/blob/master/config.org#src-block-links
--
Ihor Radchenko,
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Call code block via link?
2022-09-10 5:15 Call code block via link? Felix Dorner
2022-09-10 6:09 ` Ihor Radchenko
@ 2022-09-19 9:59 ` Fraga, Eric
2022-10-05 3:28 ` Felix Dorner
1 sibling, 1 reply; 5+ messages in thread
From: Fraga, Eric @ 2022-09-19 9:59 UTC (permalink / raw)
To: Felix Dorner; +Cc: emacs-orgmode@gnu.org
On Saturday, 10 Sep 2022 at 07:15, Felix Dorner wrote:
> Clicking/following the link would execute the call and my password
> ready to paste elsewhere. Feasible?
I have links of the form
[[elisp:(some elisp sexp)][Click here to do X]]
--
: Eric S Fraga, with org release_9.5.4-768-g5bb699 in Emacs 29.0.50
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Call code block via link?
2022-09-19 9:59 ` Fraga, Eric
@ 2022-10-05 3:28 ` Felix Dorner
2022-10-05 5:13 ` Ihor Radchenko
0 siblings, 1 reply; 5+ messages in thread
From: Felix Dorner @ 2022-10-05 3:28 UTC (permalink / raw)
To: Org Mode List
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
Eric,
>
> [[elisp:(some elisp sexp)][Click here to do X]]
>
> Neat! When I open the link I always get a message each time, "Execute ...
as elisp?" Is there a way to get rid of that message?
--
Linux. The choice of a GNU generation.
[-- Attachment #2: Type: text/html, Size: 579 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Call code block via link?
2022-10-05 3:28 ` Felix Dorner
@ 2022-10-05 5:13 ` Ihor Radchenko
0 siblings, 0 replies; 5+ messages in thread
From: Ihor Radchenko @ 2022-10-05 5:13 UTC (permalink / raw)
To: Felix Dorner; +Cc: Org Mode List
Felix Dorner <felix.dorner@gmail.com> writes:
>> [[elisp:(some elisp sexp)][Click here to do X]]
>>
>> Neat! When I open the link I always get a message each time, "Execute ...
> as elisp?" Is there a way to get rid of that message?
See https://orgmode.org/manual/Code-Evaluation-Security.html
--
Ihor Radchenko,
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-05 5:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-10 5:15 Call code block via link? Felix Dorner
2022-09-10 6:09 ` Ihor Radchenko
2022-09-19 9:59 ` Fraga, Eric
2022-10-05 3:28 ` Felix Dorner
2022-10-05 5:13 ` Ihor Radchenko
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).