emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture-other-frame
@ 2011-05-02 18:07 Lluís
  2011-05-02 21:14 ` org-capture-other-frame Marcelo de Moraes Serpa
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lluís @ 2011-05-02 18:07 UTC (permalink / raw)
  To: emacs-orgmode

I've made a little function to launch org-capture on another frame,
which is very handy when plugged into a hotkey and working with other
applications.

It lacks some settings that I already have active system wide (like no
scrollbars, no toolbar and the like), so you should probably tune those
(a defcustom for the frame parameters should suffice).

In any case, tell me (directly, as I'm not not subscribed) if you're
going to install this into org-mode. Otherwise I'll upload the snippet
into emacs wiki:

#+begin_src lisp
(defun my-org-capture-other-frame ()
  "Create a new frame and run org-capture."
  (interactive)
  (make-frame '((name . "Org-Capture")
                (width  . 120)
                (height .  20)
                (menu-bar-lines . 0)
                (tool-bar-lines . 0)
                (auto-lower . nil)
                (auto-raise . t)))
  (select-frame-by-name "Org-Capture")
  (if (condition-case nil
          (progn (org-capture) t)
        (error nil))
      (delete-other-windows)
    (my-org-capture-other-frame-cleanup)))

(defun my-org-capture-other-frame-cleanup ()
  "Close the Org-Capture frame."
  (if (equal "Org-Capture" (frame-parameter nil 'name))
      (delete-frame)))
(add-hook 'org-capture-after-finalize-hook 'my-org-capture-other-frame-cleanup)
#+end_src


Thanks,
    Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-capture-other-frame
  2011-05-02 18:07 org-capture-other-frame Lluís
@ 2011-05-02 21:14 ` Marcelo de Moraes Serpa
  2011-05-03 12:39   ` org-capture-other-frame Lluís
  2011-05-07  8:14 ` org-capture-other-frame Radosław Grzanka
  2011-05-10 13:18 ` org-capture-other-frame Radosław Grzanka
  2 siblings, 1 reply; 5+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-05-02 21:14 UTC (permalink / raw)
  To: Lluís; +Cc: emacs-orgmode

Hi LLuis,

Thanks for sharing, this looks really interesting. Could you give us a
bit more information on how you are using it (how you are setting up
the hotkeys, what's the workflow, etc)? Some specs about your system
would help as well. I'm using OSX 10.6.

Cheers!

Marcelo.


On Mon, May 2, 2011 at 1:07 PM, Lluís <xscript@gmx.net> wrote:
> I've made a little function to launch org-capture on another frame,
> which is very handy when plugged into a hotkey and working with other
> applications.
>
> It lacks some settings that I already have active system wide (like no
> scrollbars, no toolbar and the like), so you should probably tune those
> (a defcustom for the frame parameters should suffice).
>
> In any case, tell me (directly, as I'm not not subscribed) if you're
> going to install this into org-mode. Otherwise I'll upload the snippet
> into emacs wiki:
>
> #+begin_src lisp
> (defun my-org-capture-other-frame ()
>  "Create a new frame and run org-capture."
>  (interactive)
>  (make-frame '((name . "Org-Capture")
>                (width  . 120)
>                (height .  20)
>                (menu-bar-lines . 0)
>                (tool-bar-lines . 0)
>                (auto-lower . nil)
>                (auto-raise . t)))
>  (select-frame-by-name "Org-Capture")
>  (if (condition-case nil
>          (progn (org-capture) t)
>        (error nil))
>      (delete-other-windows)
>    (my-org-capture-other-frame-cleanup)))
>
> (defun my-org-capture-other-frame-cleanup ()
>  "Close the Org-Capture frame."
>  (if (equal "Org-Capture" (frame-parameter nil 'name))
>      (delete-frame)))
> (add-hook 'org-capture-after-finalize-hook 'my-org-capture-other-frame-cleanup)
> #+end_src
>
>
> Thanks,
>    Lluis
>
> --
>  "And it's much the same thing with knowledge, for whenever you learn
>  something new, the whole world becomes that much richer."
>  -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
>  Tollbooth
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-capture-other-frame
  2011-05-02 21:14 ` org-capture-other-frame Marcelo de Moraes Serpa
@ 2011-05-03 12:39   ` Lluís
  0 siblings, 0 replies; 5+ messages in thread
From: Lluís @ 2011-05-03 12:39 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: emacs-orgmode

Marcelo de Moraes Serpa writes:

> Thanks for sharing, this looks really interesting. Could you give us a
> bit more information on how you are using it (how you are setting up
> the hotkeys, what's the workflow, etc)? Some specs about your system
> would help as well. I'm using OSX 10.6.

I've tested this on a Linux system (latest Debian stable), but on other
systems you might need to tune the frame parameters (just in case some
of the parameters I used are XWindows-specific).

For the usage, its pretty simple. Inside emacs, bind
'my-org-capture-other-frame' into any key of your liking. Outside emacs,
it's a bit more tricky. Assuming you have an "emacs --daemon" running,
in XWindows you can use it (regardless of whether you already have an
open frame) with:

    emacsclient -d $DISPLAY -e '(my-org-capture-other-frame)'


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-capture-other-frame
  2011-05-02 18:07 org-capture-other-frame Lluís
  2011-05-02 21:14 ` org-capture-other-frame Marcelo de Moraes Serpa
@ 2011-05-07  8:14 ` Radosław Grzanka
  2011-05-10 13:18 ` org-capture-other-frame Radosław Grzanka
  2 siblings, 0 replies; 5+ messages in thread
From: Radosław Grzanka @ 2011-05-07  8:14 UTC (permalink / raw)
  To: emacs-orgmode

Thanks!
  I've asked about this a month ago or so but with no response. I will
test this soon on Windows 7.

Radek.

2011/5/2 Lluís <xscript@gmx.net>:
> I've made a little function to launch org-capture on another frame,
> which is very handy when plugged into a hotkey and working with other
> applications.
>
> It lacks some settings that I already have active system wide (like no
> scrollbars, no toolbar and the like), so you should probably tune those
> (a defcustom for the frame parameters should suffice).
>
> In any case, tell me (directly, as I'm not not subscribed) if you're
> going to install this into org-mode. Otherwise I'll upload the snippet
> into emacs wiki:
>
> #+begin_src lisp
> (defun my-org-capture-other-frame ()
>  "Create a new frame and run org-capture."
>  (interactive)
>  (make-frame '((name . "Org-Capture")
>                (width  . 120)
>                (height .  20)
>                (menu-bar-lines . 0)
>                (tool-bar-lines . 0)
>                (auto-lower . nil)
>                (auto-raise . t)))
>  (select-frame-by-name "Org-Capture")
>  (if (condition-case nil
>          (progn (org-capture) t)
>        (error nil))
>      (delete-other-windows)
>    (my-org-capture-other-frame-cleanup)))
>
> (defun my-org-capture-other-frame-cleanup ()
>  "Close the Org-Capture frame."
>  (if (equal "Org-Capture" (frame-parameter nil 'name))
>      (delete-frame)))
> (add-hook 'org-capture-after-finalize-hook 'my-org-capture-other-frame-cleanup)
> #+end_src
>
>
> Thanks,
>    Lluis
>
> --
>  "And it's much the same thing with knowledge, for whenever you learn
>  something new, the whole world becomes that much richer."
>  -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
>  Tollbooth
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: org-capture-other-frame
  2011-05-02 18:07 org-capture-other-frame Lluís
  2011-05-02 21:14 ` org-capture-other-frame Marcelo de Moraes Serpa
  2011-05-07  8:14 ` org-capture-other-frame Radosław Grzanka
@ 2011-05-10 13:18 ` Radosław Grzanka
  2 siblings, 0 replies; 5+ messages in thread
From: Radosław Grzanka @ 2011-05-10 13:18 UTC (permalink / raw)
  To: emacs-orgmode

W dniu 2011-05-02 20:07, Lluís pisze:
> I've made a little function to launch org-capture on another frame,
> which is very handy when plugged into a hotkey and working with other
> applications.

That work excelent on windows machine.

Thank you!
   Radek.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-10 13:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 18:07 org-capture-other-frame Lluís
2011-05-02 21:14 ` org-capture-other-frame Marcelo de Moraes Serpa
2011-05-03 12:39   ` org-capture-other-frame Lluís
2011-05-07  8:14 ` org-capture-other-frame Radosław Grzanka
2011-05-10 13:18 ` org-capture-other-frame Radosław Grzanka

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