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: Tim Cross
Subject: Re: idea for capture anywhere in x
Date: Tue, 08 Sep 2020 15:21:22 +1000
User-agent: mu4e 1.5.5; emacs 28.0.50

Samuel Wales <samologist@gmail.com> writes:

> well for a non-emacs application, i want to select text and capture
> using wm menu.
>
> same thing for emacs, although it is roundabout.  i just don't know
> the code to set up context menus for every type of buffer is all.  so
> figured would just use the roundabout thing i would use for any
> non-emacs application.  this is for when keyboard cannot be used.
>
> On 9/7/20, Tim Cross <theophilusx@gmail.com> wrote:
>>
>> Samuel Wales <samologist@gmail.com> writes:
>>
>>> dunno if this is sensible, but istr you can capture using emacsclient?
>>>
>>> i really like hte org capture extension in firefox and want it for
>>> everything in x [which means emacs itself using mouse and what little
>>> else i run].
>>>
>>> my idea was, to emacsclient to call org protocol to a defined capture
>>> template just like the firefox extension.  this would be alled from
>>> the wm menu.
>>>
>>> is something like this possible?
>>
>> I don't really understand what it is your trying to do. I don't
>> understand why you would want org protocol from inside emacsclient when
>> you already have full access to capture in any emacs buffer, including
>> emacsclient? You can already start emacscleint and tell it to run a
>> command (like org-capture) and you could easily bind that to a window
>> manager shortcut or menu.
>> --
>> Tim Cross
>>
>>

You don't need org protocol for that. All you need to do is call
emacsclient with the -e or --eval argument, passing it the expression
(org-capture). This will open (on GUI) an emacs frame with the initial
org-capture buffer where you can select the template you want. Then, you
just past (yank) in whatever you have copied with the mouse.

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. Once added to a menu or wm hot
key, you then just need to select the menu item or trigger the hotkey to
bring up emacscleint and the initial capture buffer. 
-- 
Tim Cross



reply via email to

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