emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anthony Lander <anthonylander@yahoo.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Bury (or kill) calendar buffer after selecting a date
Date: Mon, 2 May 2011 19:34:17 -0400	[thread overview]
Message-ID: <C51124F5-FB8B-410A-A96B-FA5E51B5FE72@yahoo.com> (raw)

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)

                 reply	other threads:[~2011-05-02 23:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C51124F5-FB8B-410A-A96B-FA5E51B5FE72@yahoo.com \
    --to=anthonylander@yahoo.com \
    --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 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).