emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bury (or kill) calendar buffer after selecting a date
@ 2011-05-02 23:34 Anthony Lander
  0 siblings, 0 replies; only message in thread
From: Anthony Lander @ 2011-05-02 23:34 UTC (permalink / raw)
  To: Org Mode

Hi list,

A while ago someone (I'm sorry, I don't remember who, now) proposed a  
patch that the *Calendar* buffer could be buried after selecting a  
date. I thought it was a great idea, and I've implemented a simple  
advice in my .emacs that accomplishes the same thing. I'm posting it  
here on the chance that someone else might find it useful.

The problem this solves is that after you enter a date, the calendar  
buffer is next in line in the buffer ring, so you will switch to it  
next by default, instead of the buffer you were working with  
previously. This advice will kill the calendar buffer after entering a  
date (I never need it around anyway), but you could just as easily  
bury-buffer, which would move it to the back of the ring.

   -Anthony


; defadvice to kill the calendar buffer after selecting a date, so it  
is out of
; the way
(defadvice org-read-date
     (after abl/kill-calendar-after-org-read-date (&optional with-time  
to-time from-string prompt default-time efault-input) protect)
   "kill the *Calendar* buffer after reading a date"
     (kill-buffer "*Calendar*"))

(ad-activate 'org-read-date)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-02 23:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-02 23:34 Bury (or kill) calendar buffer after selecting a date Anthony Lander

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).