unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63835: 29.0.60; gnus-icalendar--update-org-event fails if org buffer narrowed
@ 2023-06-02  9:56 Kevin Brubeck Unhammer
  2023-09-11 18:41 ` Stefan Kangas
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Brubeck Unhammer @ 2023-06-02  9:56 UTC (permalink / raw)
  To: 63835


When running gnus-icalendar--update-org-event (by clicking the [Update
Org Entry] button on a calender invite email), if the org buffer
containing the previously recorded event is narrowed such that the event
is out of view, the line 

                  (re-search-forward "^\\*+ " (line-end-position))

may fail and the function error instead of updating the event
completely. Seems like changing 

      (with-current-buffer (find-file-noselect file)
          (with-slots (uid summary description organizer location recur

to
      (with-current-buffer (find-file-noselect file)
        (save-restriction
          (widen)
          (with-slots (uid summary description organizer location recur

in the same function fixes it.





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#63835: 29.0.60; gnus-icalendar--update-org-event fails if org buffer narrowed
  2023-06-02  9:56 bug#63835: 29.0.60; gnus-icalendar--update-org-event fails if org buffer narrowed Kevin Brubeck Unhammer
@ 2023-09-11 18:41 ` Stefan Kangas
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Kangas @ 2023-09-11 18:41 UTC (permalink / raw)
  To: Kevin Brubeck Unhammer, 63835; +Cc: Andrew Cohen, Eric Abrahamsen

Kevin Brubeck Unhammer <unhammer@fsfe.org> writes:

> When running gnus-icalendar--update-org-event (by clicking the [Update
> Org Entry] button on a calender invite email), if the org buffer
> containing the previously recorded event is narrowed such that the event
> is out of view, the line
>
>                   (re-search-forward "^\\*+ " (line-end-position))
>
> may fail and the function error instead of updating the event
> completely. Seems like changing
>
>       (with-current-buffer (find-file-noselect file)
>           (with-slots (uid summary description organizer location recur
>
> to
>       (with-current-buffer (find-file-noselect file)
>         (save-restriction
>           (widen)
>           (with-slots (uid summary description organizer location recur
>
> in the same function fixes it.

Eric, Andrew, do you have any comments?





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-11 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02  9:56 bug#63835: 29.0.60; gnus-icalendar--update-org-event fails if org buffer narrowed Kevin Brubeck Unhammer
2023-09-11 18:41 ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).