Matt Hodges wrote: > This save-excursion can't do anything meaningful to preserve point in > the calendar buffer can it?
No, it's complete rubbish! As you and Stefan pointed (ahem) out, I'm saving point in the calling buffer, not the calendar. Being extra dim this week, sorry. But I don't understand what's going on here. The final calendar-cursor-to-visible-date in redraw-calendar should mean that no saving of point is necessary (once the save-excursion is deleted completely, that only messes things up). Does anyone have a recipe for reproducing a bug from a vanilla Emacs, using the version without the save-excursion in redraw-calendar? I myself cannot get any kind of error to occur (though I don't doubt there is one). The only problem I can reproduce is that redraw-calendar called from a buffer other than the calendar moves the cursor to point-min in the calendar. And yet (with-current-buffer calendar-buffer (point)) *when evaluated in the scratch buffer* still reports a number > 1. In other words, the cursor position does not seem to correspond to point. But then using M-: to evaluate the above expression changes the answer to 1. I think I'm going mad... > The calendar buffer will be current when redraw-calendar is called > from mark-diary-entries. Well, probably, but not necessarily. mark-diary-entries is an interactive function, so I can call it from any buffer I like, not just the calendar. And as I said above, I don't see why explicitly saving point is even necessary, given what redraw-calendar does/should do. I'll revert the problematic change soon if I can't figure this out. _______________________________________________ Emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
