From: Benjamin Slade <slade@jnanam.net>
To: emacs-orgmode@gnu.org
Subject: org-capture/remember in Emacs 24.4.1?
Date: Sun, 26 Oct 2014 22:59:38 -0600 [thread overview]
Message-ID: <87vbn6p0p1.fsf@jnanam.net> (raw)
I had the following snippets in my .emacs which allowed me to call up a
mini-emacsclient frame to quickly add notes and TODOs etc. It doesn't
seem to work anymore (it comes up, but as soon as I choose [t], [n]
etc. it disappears). Is there an updated recommendation on how to do
this?
###################################
(defcustom remember-frame-alist nil
"Additional frame parameters for dedicated remember frame."
:type 'alist
:group 'remember)
(defadvice remember (around remember-frame-parameters activate)
"Set some frame parameters for the remember frame."
(let ((default-frame-alist (append remember-frame-alist default-frame-alist)))
ad-do-it))
;;;
(defun make-remember-frame ()
"turn the current frame into a small popup frame for remember mode;
this is meant to be called with
emacsclient -c -e '(make-remember-frame)'"
(modify-frame-parameters nil
'( (name . "*Remember*") ;; must be same as in mode-hook below
(width . 80)
(height . 20)
(vertical-scroll-bars . nil)
(menu-bar-lines . nil)
(tool-bar-lines . nil)))
(set-frame-parameter (selected-frame) 'alpha '(85 50))
(org-capture)
(when (fboundp 'x-focus-frame) (x-focus-frame nil)) ;; X only....
(delete-other-windows)
)
;; when we're in such a remember-frame, close it when done. (doesn't work when cancelled...)
(add-hook 'org-capture-mode-hook
(lambda()
(define-key org-capture-mode-map (kbd "C-c C-c")
'(lambda()(interactive)
(let ((capture-frame-p
(string= (frame-parameter nil 'name) "*Remember*")))
(when capture-frame-p (make-frame-invisible)) ;; hide quickly
(org-capture-finalize)
(when capture-frame-p (delete-frame)))))))
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/Documents/Org/ToDo.org" "Captured Tasks")
"* TODO %?\n %i\n %a")
("n" "Notes" entry (file+headline "~/Documents/Org/Notes.org" "Captured Notes")
"* %?\nEntered on %U\n %i\n %a")
("m" "Meetings" entry (file "~/Documents/Org/Meetings.org" )
"* %?\n %i\n %a")
("c" "Clipboard" entry (file+headline "~/Documents/Org/Notes.org" "Captured Notes")
"* %x %?\nEntered on %U\n %i\n %a")))
######################################################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Benjamin Slade
pgp fingerprint: 21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{sent by mu4e on Emacs running under GNU/Linux}
(Choose Linux, Choose Freedom)
next reply other threads:[~2014-10-27 4:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 4:59 Benjamin Slade [this message]
2014-10-27 9:27 ` org-capture/remember in Emacs 24.4.1? Marco Wahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vbn6p0p1.fsf@jnanam.net \
--to=slade@jnanam.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.