Sacha Chua <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (J. David Boyd) writes:
>
>> Is it feasible/possible to add advice to the remember functions so
>> that I could turn off the planner-use-day-pages variable, remember a
>> buffer/region/whatever, then turn the planner-use-day-pages back on?
>
> C-c C-c in a remember buffer calls remember-buffer, so you can advise
> that function to always turn day pages off.
>
> (defadvice remember-buffer (around david activate)
>   "Remember the contents of the current buffer, but don't use day pages."
>   (let ((planner-use-day-pages nil))
>      ad-do-it))
>
> Another way to do it without advice would be to write a new function:
>
> (defun david/remember-buffer ()
>   "Remember the contents of the current buffer, but don't use day pages."
>   (interactive)
>   (let ((planner-use-day-pages nil))
>     (remember-region (point-min) (point-max))))
> (define-key remember-mode-map "\C-c\C-c" 'david/remember-buffer)
>

Ah, thank you so much. This will come in handy!

Dave



_______________________________________________
emacs-wiki-discuss mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

Reply via email to