From mboxrd@z Thu Jan 1 00:00:00 1970 From: jmcbray@carcosa.net (Jason F. McBrayer) Subject: Re: running remember with emacsclient - how to get a new frame Date: Thu, 06 Sep 2007 09:08:20 -0400 Message-ID: References: <13256.1189076942@lap1.smtl.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITH61-0003So-02 for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 09:08:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITH5z-0003Sc-C1 for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 09:08:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITH5z-0003SZ-6q for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 09:08:31 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITH5y-0005SD-Iu for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 09:08:30 -0400 In-Reply-To: <13256.1189076942@lap1.smtl.co.uk> (pete phillips's message of "Thu, 06 Sep 2007 12:09:02 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: pete phillips Cc: emacs-orgmode@gnu.org pete phillips 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 jmcbray@carcosa.net | | 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 |