[Top][All Lists]

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

[debbugs-tracker] bug#35645: closed (Fix icalendar--add-diary-entry/diar

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#35645: closed (Fix icalendar--add-diary-entry/diary-make-entry interaction)
Date: Sat, 08 Jun 2019 01:37:02 +0000

Your message dated Fri, 07 Jun 2019 21:36:10 -0400
with message-id <address@hidden>
and subject line Re: bug#35645: Fix icalendar--add-diary-entry/diary-make-entry 
has caused the debbugs.gnu.org bug report #35645,
regarding Fix icalendar--add-diary-entry/diary-make-entry interaction
to be marked as done.

(If you believe you have received this mail in error, please contact

35645: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35645
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Fix icalendar--add-diary-entry/diary-make-entry interaction Date: Wed, 08 May 2019 23:40:30 -0400
For Excorporate's diary integration I had to add some advice to work
around the side effects of a diary-make-entry workaround in
icalendar--add-diary-entry, and side effects of diary-make-entry itself.
I'm filing this bug report to try to eliminate the need for any of these

diary-make-entry adds a trailing space to its entry.
icalendar--add-diary-entry works around this by deleting the trailing
space.  It saves the window excursion, but diary-make-entry still leaves
the diary file where (other-buffer (current-buffer)) will return it,
which is a usability bug.

The attached patch, icalendar-diary-make-entry-fix-1.patch, adds
omit-trailing-space and do-not-show parameters to diary-make-entry to
allow it to operate more like a library function and less like an
interactive function.

To keep the code mostly the same (so that I don't need to factor out
another function), I've changed the original logic by adding a
with-current-buffer wrapper, as shown in simplified form in
diary-make-entry-with-current-buffer.patch.  I'm hoping this keeps the
default diary-make-entry logic exactly the same, but I'd like
confirmation from someone more familiar with the subtleties of window
and buffer manipulation.


Attachment: icalendar-diary-make-entry-fix-1.patch
Description: Text Data

Attachment: diary-make-entry-with-current-buffer.patch
Description: Text Data

--- End Message ---
--- Begin Message --- Subject: Re: bug#35645: Fix icalendar--add-diary-entry/diary-make-entry interaction Date: Fri, 07 Jun 2019 21:36:10 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
Thomas Fitzsimmons <address@hidden> writes:

> Eli Zaretskii <address@hidden> writes:
>>> From: Ulf Jasper <address@hidden>
>>> Date: Mon, 03 Jun 2019 20:30:13 +0200
>>> Cc: address@hidden, Noam Postavsky <address@hidden>
>>> Am 23.05.2019 um 22:49 (-0400) schrieb Thomas Fitzsimmons:
>>> >
>>> > Ulf, the only other feedback I have for icalendar is that
>>> > icalendar--add-diary-entry is useful to/used by other packages (e.g.,
>>> > Excorporate) despite it being a private function.  What if we added a
>>> > public alias, icalendar-add-diary-entry, within this same patch?  Then I
>>> > could check for that alias's existence and only enable the workaround
>>> > advice for older Emacs versions.
>>> >
>>> Could you please provide a patch with all the changes we want to make?
>> Ping!  Thomas, could you please provide a patch as Ulf requested?  We
>> would like to proceed with fixing this issue.
> I tried out this approach, mostly to try to preserve
> icalendar--add-diary-entry's current default behaviour of showing the
> resulting diary buffer.  However, I was wrong about
> icalendar-add-diary-entry being called directly; the icalendar entry
> point Excorporate calls is icalendar-import-buffer.  So I think the
> original patch is fine as-is, as long as Ulf is OK with the change to
> icalendar--add-diary-entry's default behaviour, such that it does not
> show the modified diary file's buffer (which some third party packages
> might rely on).  To determine whether or not to apply the workarounds
> I'll check the "arity" of diary-make-entry.
> I'll write the change log and push the patch this evening unless I hear
> otherwise.

I pushed the fix to master.


--- End Message ---

reply via email to

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