From: Bruno Barbier <brubar.cs@gmail.com>
To: Gregor Zattler <telegraph@gmx.net>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: problems with some external org-mode shell links which make emacs stuck
Date: Fri, 02 Feb 2024 10:56:40 +0100 [thread overview]
Message-ID: <65bcbc59.050a0220.933b6.5c11@mx.google.com> (raw)
In-Reply-To: <87wmrn4yqw.fsf@no.lan>
Hi Gregor,
Gregor Zattler <telegraph@gmx.net> writes:
> Hi Bruno,
> * Bruno Barbier <brubar.cs@gmail.com> [2024-02-01; 13:18 +01]:
>> Gregor Zattler <telegraph@gmx.net> writes:
>>> 1. I'm asked every time if I want to execute the
>>> command. This is annoying, is there a possibility
>>> to stop this?
>>
>> See https://orgmode.org/manual/Code-Evaluation-Security.html.
>
> thanks. I hoped for some less global setting.
> Therefore I will cope with this question rather than
> disable it.
Indeed, I wouldn't either.
You can set these variables per file:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html
What I usually do, I keep a line:
# (setq-local org-link-shell-skip-confirm-regexp ".*")
With this line, if I need to disable security, I just have to do 'C-x C-e'
at the end of that line.
> Yes, now I see, you are right. With the "&" a buffer
> for the result pops up, which I don't want. The "#"
> prohibits that, but for the price of Emacs being
> stuck. [At some stage of my experiments I got a "#
> wrong reader syntax" messages, which hints to, that the
> "#" was somehow interpreted by the lisp interpreter.]
>
> I finally used an "elisp:" link and "start-process":
>
> [[elisp:(start-process "ssh" "*ssh*" "ssh" "-N" "-L xxxx:192.168.xxx.xxx:xxxx" "-p xxxx" root@xx.xxx.xx.xxx")][xxx remote]]
You may be interested by defining your own link type, so that you can
write, for example:
[[ssh-L::xxxx:192.168.xxx.xxx:xxxx]]
You will not get the security question anymore, and you will have full
control in elisp. That's actually relatively easy to do:
https://orgmode.org/manual/Adding-Hyperlink-Types.html
Bruno
prev parent reply other threads:[~2024-02-02 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 9:05 problems with some external org-mode shell links which make emacs stuck Gregor Zattler
2024-02-01 12:18 ` Bruno Barbier
2024-02-01 22:15 ` Gregor Zattler
2024-02-02 9:56 ` Bruno Barbier [this message]
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.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=65bcbc59.050a0220.933b6.5c11@mx.google.com \
--to=brubar.cs@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=telegraph@gmx.net \
/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.
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).