emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] org-read-date-overlay shown in other buffers, point in calen


From: Zachary Kanfer
Subject: [O] [PATCH] org-read-date-overlay shown in other buffers, point in calendar window defaults to end of line
Date: Mon, 6 Feb 2012 11:22:16 -0500

This patch fixes two bugs in the same section of code:

Bug 1: While running org-time-stamp, org-read-date-overlay is shown in the current buffer, even when that buffer isn't the minibuffer. You can see this by entering a file in org-mode, then pressing <C-c .> to run org-time-stamp. The overlay is the yellow highlighted line showing the date that will be entered into the org-mode window. For example, "=> <2012-01-23 Mon>". Move into another window with <C-x o>, and the overlay is displayed there. I don't think this is desired behavior.

To fix this, I added a line that inserts org-read-date-overlay only if the current buffer is a minibuffer.

Bug 2: While running org-time-stamp, when moving point into the calendar window, there is an error: error in post-command hook (buffer-read-only *Calendar*). Additionally, point is put at the end of the line containing the current day. To reproduce this behavior, press <C-c .> to run org-time-stamp, then press <C-x o> repeatedly until you move point into the window with the Calendar.

You will see the aformentioned error, and the cursor will be at the end of the line containing the current day. To fix this, I removed the process of explicitly saving point in the minibuffer and restoring it after inserting org-read-date-overlay, and replaced it with save-excursion.

-Zachary Kanfer

Attachment: org-time-stamp-2012-02-06.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]