[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] running remember with emacsclient - how to get a new frame
From: |
Jason F. McBrayer |
Subject: |
Re: [Orgmode] running remember with emacsclient - how to get a new frame |
Date: |
Thu, 06 Sep 2007 09:08:20 -0400 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) |
pete phillips <address@hidden> writes:
> Hi
>
> I want to bind a keyboard key to run
>
> /usr/bin/emacsclient.emacs-snapshot -e "(remember)"
I define this function in my .emacs:
(defun my-remember nil
(progn (select-frame
(make-frame '((name . "*Remember*") )))
(raise-frame)
(remember)))
And this additional code to close the frame if remember was opened in
its own frame:
(setq remember-all-handler-functions t)
(setq remember-handler-functions
'(org-remember-handler
(lambda nil
(let* ((frame-names-alist (make-frame-names-alist))
(frame (cdr (assoc "*Remember*" frame-names-alist))))
(if frame
(delete-frame frame t))))))
And use a script called 'remember' that runs:
emacsclient -n --eval '(my-remember)'
I've got quite a bit of other code to make emacsclient maximally
desktop-environment-friendly --- emacsclient always opening in new
frames, closing frames killing the associated buffer,
server-done closing the frame, a script to either start emacs or use
emacsclient as needed, running emacs with the initial frame unmapped,
letting you delete all visible frames, and a .desktop file that wraps
the aforementioned script. One of these days I should package it all
up, but it's kind of all over the place.
--
+-----------------------------------------------------------+
| Jason F. McBrayer address@hidden |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors. --- The Dhammapada |