emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: idea for capture anywhere in x


From: Maxim Nikulin
Subject: Re: idea for capture anywhere in x
Date: Tue, 8 Sep 2020 14:18:38 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

08.09.2020 12:21, Tim Cross wrote:

How you add this to a window manager menu or key binding will depend on
your window manager, but essentially, you just calling emacscleint with
the argument -e (org-capture). You may need to quote the command to
prevent shell interpolation of the command and you may need to add other
arguments, such as -n or --no-wait etc.

Good point. However playing with a script for org protocol, I realized that there could be no emacs frame yet, so I added --create-frame depending on output of

emacsclient --quiet --eval \
"(seq-some (lambda (f) (if (eq 'x (framep f)) 'has-frame 'no-frame)) (frame-list))" \
  2>&1

Another point is to provide feedback (notify-send, kdialog, zenity, etc.) if emacs server is not running at all (non-zero exit code of the shell command above). Though since Samuel is already using org-protocol, it should not be a problem.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]