[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [ANN] Firefox extension for org-protocol and org-capture
From: |
Alan Schmitt |
Subject: |
Re: [O] [ANN] Firefox extension for org-protocol and org-capture |
Date: |
Sat, 22 Feb 2014 19:48:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
Xebar Saram <address@hidden> 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
- [O] [ANN] Firefox extension for org-protocol and org-capture, Olivier Schwander, 2014/02/21
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Rasmus, 2014/02/21
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Nick Dokos, 2014/02/21
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Peter Salazar, 2014/02/21
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Erik Hetzner, 2014/02/21
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Olivier Schwander, 2014/02/22
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Erik Hetzner, 2014/02/22
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Olivier Schwander, 2014/02/22
- Re: [O] [ANN] Firefox extension for org-protocol and org-capture, Nick Dokos, 2014/02/22