emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Xebar Saram <zeltakc@gmail.com>
Cc: org mode <emacs-orgmode@gnu.org>
Subject: Re: [ANN] Firefox extension for org-protocol and org-capture
Date: Sat, 22 Feb 2014 19:48:38 +0100	[thread overview]
Message-ID: <m238jbnfuh.fsf@polytechnique.org> (raw)
In-Reply-To: <CAOQHXPpLqw8DOrAqJc=YhLnn=MowxWcuZbXSpFVGRbu3sMMetw@mail.gmail.com> (Xebar Saram's message of "Fri, 21 Feb 2014 19:06:11 +0200")

Xebar Saram <zeltakc@gmail.com> writes:

> one thing though, is there a way to define which client it oepns? i have
> several emacs client opened at once and prefer the extension nowt to use
> a current one but pop up a new CLI emacsclient for quick adding which
> will go away after i finish capturing, is that possible?

I have a shell script bound to a key here to allow capture everywhere.
It's like this:

#+begin_src sh
  /usr/local/bin/emacsclient -n -e '(make-orgcapture-frame)'
#+end_src

The function is as follows (I also include my capture settings, which
are relevant here):

#+BEGIN_SRC emacs-lisp
  (setq org-capture-templates
        (quote
         (("t" "todo" entry (file "refile-orgx.org")
           "* TODO %?\n %U")
          ("T" "todo with link" entry (file "refile-orgx.org")
           "* TODO %?\n %U\n\n%a"))))
  
  (define-key global-map "\C-cr" 'org-capture)
  
  ;; to be called from outside using
  ;; emacsclient -n -e '(make-orgcapture-frame)'
  
  (defun make-orgcapture-frame ()  
    "Create a new frame and run org-capture."  
    (interactive)  
    (make-frame '((name . "remember") (width . 80) (height . 16)
                  (top . 400) (left . 300)
                  (font . "-*-Consolas-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1")
                  ))
    (select-frame-by-name "remember")
    (delete-other-windows)
    (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
      (org-capture nil "t")))
  
  ;; delete the frame in that case
  (add-hook 'org-capture-after-finalize-hook
            (lambda ()
              (when (equal
                     (cdr (assoc 'name (frame-parameters (selected-frame))))
                     "remember")
                (delete-frame))))
#+END_SRC

Maybe you can adapt this for this firefox plugin.

Alan

  parent reply	other threads:[~2014-02-22 18:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 14:06 [ANN] Firefox extension for org-protocol and org-capture Olivier Schwander
2014-02-21 15:43 ` Rasmus
2014-02-21 16:41   ` Olivier Schwander
2014-02-21 17:06     ` Xebar Saram
     [not found]       ` <20140222125830.GA17622@zozo.lan>
2014-02-22 16:02         ` Xebar Saram
2014-02-22 18:48       ` Alan Schmitt [this message]
2014-02-21 17:48     ` Nick Dokos
2014-02-21 23:34       ` Peter Salazar
2014-02-22  2:22         ` Erik Hetzner
2014-02-22 16:27           ` Olivier Schwander
2014-02-22 18:45             ` Erik Hetzner
2014-02-22 13:02         ` Olivier Schwander
2014-02-22  6:14       ` Nick Dokos
2014-03-03 13:12 ` Bastien
2014-04-09 15:52 ` Olivier Schwander
2014-04-10  9:02   ` Oleh
2014-04-10 20:20     ` AW
2014-04-10 21:50       ` Olivier Schwander
2014-04-14 19:06 ` Alexander Baier
2014-05-04 12:57 ` AW

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.orgmode.org/

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

  git send-email \
    --in-reply-to=m238jbnfuh.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=zeltakc@gmail.com \
    /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.
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).