global hotkey / keyboard shortcut in Mac OS X to bring up remember buffer in emacs: record a new thought or TO DO task anywhere

This method worked for me, and this didn’t.

I added the following in my .emacs file:

<pre class="src src-sh">;; Emacs server on by default

(server-start)

;; http://metajack.im/2008/12/30/gtd-capture-with-emacs-orgmode/?dsq=13708223#comment-13708223 ;; together with the apple script C-M-\ anywhere in Mac to bring up the remember buffer ;; C-c C-c to save in ~/.notes and close; (require ‘remember) (defadvice remember-finalize (after delete-remember-frame activate) “Advise remember-finalize to close the frame if it is the remember frame” (if (equal “remember” (frame-parameter nil ‘name)) (delete-frame)))

(defadvice remember-destroy (after delete-remember-frame activate) “Advise remember-destroy to close the frame if it is the rememeber frame” (if (equal “remember” (frame-parameter nil ‘name)) (delete-frame)))

;; make the frame contain a single window. by default org-remember ;; splits the window. (add-hook ‘remember-mode-hook ‘delete-other-windows)

(defun make-remember-frame () “Create a new frame and run org-remember.” (interactive) (make-frame ‘((name . “remember”) (width . 80) (height . 10))) (select-frame-by-name “remember”) (org-remember))

I used this applescript with spark and bound it to C-M-\ : property eclient :

<pre class="src src-sh"><span style="color: #ffa07a;">"/Applications/Emacs.app/Contents/MacOS/bin/emacsclient -e '(make-remember-frame)'"</span>

do shell script eclient

tell application “Emacs” activate end tell

Now, wherever im at in Mac, i just hit C-M-\ and my remember buffer will be brought up. I type what my thoughts are. Hit C-c C-c to save and close buffer. When I have time, go to ~/.notes and organize my thoughts, and finish the to-do tasks. Set the ending of that file as:

Captures

Anything i add will be under ** Date, and after that will be my notes. So remember-mode is org-mode!

About Vinh Nguyen

Statistician

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>