emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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; 3+ 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] 3+ 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; 3+ 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] 3+ 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; 3+ messages in thread
From: Fraga, Eric @ 2022-09-19  9:59 UTC (permalink / raw)
  To: Felix Dorner; +Cc: emacs-orgmode

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] 3+ messages in thread

end of thread, other threads:[~2022-09-19 10:02 UTC | newest]

Thread overview: 3+ 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

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).