From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Lander Subject: Bury (or kill) calendar buffer after selecting a date Date: Mon, 2 May 2011 19:34:17 -0400 Message-ID: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QH2dC-0000u0-V1 for emacs-orgmode@gnu.org; Mon, 02 May 2011 19:34:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QH2dC-0002HV-0d for emacs-orgmode@gnu.org; Mon, 02 May 2011 19:34:22 -0400 Received: from smtp110.prem.mail.ac4.yahoo.com ([76.13.13.93]:21762) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QH2dB-0002HR-TE for emacs-orgmode@gnu.org; Mon, 02 May 2011 19:34:21 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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)