emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Samuel Wales <samologist@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: idea for capture anywhere in x
Date: Tue, 08 Sep 2020 15:21:22 +1000	[thread overview]
Message-ID: <87pn6wq1wt.fsf@gmail.com> (raw)
In-Reply-To: <CAJcAo8sb3Wtqpo3+fhBKPZchsyeWZ9A3Ox9tOH_4CdxUg8za+Q@mail.gmail.com>

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	other threads:[~2020-09-08  5:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  4:22 Samuel Wales
2020-09-08  5:01 ` Tim Cross
2020-09-08  5:05   ` Samuel Wales
2020-09-08  5:21     ` Tim Cross [this message]
2020-09-08  7:18       ` Maxim Nikulin
2020-09-08  8:03         ` Diego Zamboni
2020-09-08 16:08           ` Maxim Nikulin
2020-09-08  5:39     ` Maxim Nikulin
2020-09-08 22:40       ` Samuel Wales
2020-09-09  4:52         ` Maxim Nikulin
2020-09-10 14:23           ` Maxim Nikulin
2020-09-12  8:48             ` Nick Econopouly
2020-09-09  8:40     ` Russell Adams
2020-09-09 21:11       ` Samuel Wales
2020-09-09  1:07 ` Ihor Radchenko
     [not found] <mailman.51.1599580808.12104.emacs-orgmode@gnu.org>
2020-09-08 23:15 ` No Wayman
2020-09-13 20:29   ` Bastien

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:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn6wq1wt.fsf@gmail.com \
    --to=theophilusx@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=samologist@gmail.com \
    --subject='Re: idea for capture anywhere in x' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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