all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: David Bremner <david@tethera.net>, Lars Ingebrigtsen <larsi@gnus.org>
Cc: 25828@debbugs.gnu.org
Subject: bug#25828: 25.1; remaining errors from shr calling set-window-buffer-p in dedicated window
Date: Sat, 25 Feb 2017 10:27:02 +0200	[thread overview]
Message-ID: <83d1e6smjt.fsf@gnu.org> (raw)
In-Reply-To: <8760k36als.fsf@tethera.net> (message from David Bremner on Tue,  21 Feb 2017 07:34:39 -0400)

> From: David Bremner <david@tethera.net>
> Date: Tue, 21 Feb 2017 07:34:39 -0400
> 
> In https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24950 I reported an
> error resulting from shr calling set-window-buffer-p in a dedicated
> window. Eli provided a patch for that, which works great for that code
> path. Unfortunately there are at least two more places in the shr code
> with the same issue. A notmuch user reported crashes rendering html on
> one of those other code paths. I have not produced a recipe for
> duplicating the problem without notmuch, but copying Eli's patch into
> these other two code paths fixes the problem. I have attached the diff
> against emacs-25.2-rc1-14-gec4226d810.  Both added calls to
> set-window-dedicated-p are inside save-window-excursion.  It occurs to
> me that maybe save-window-excursion should call set-window-dedicated-p,
> but I don't know the full implications.
> 
> diff --git a/lisp/net/shr.el b/lisp/net/shr.el
> index 6c35a33c9c..2bc37c64bd 100644
> --- a/lisp/net/shr.el
> +++ b/lisp/net/shr.el
> @@ -1993,6 +1993,9 @@ shr-pixel-buffer-width
>      (if (get-buffer-window)
>  	(car (window-text-pixel-size nil (point-min) (point-max)))
>        (save-window-excursion
> +        ;; Avoid errors if the selected window is a dedicated one,
> +        ;; and they just want to insert a document into it.
> +        (set-window-dedicated-p nil nil)
>  	(set-window-buffer nil (current-buffer))
>  	(car (window-text-pixel-size nil (point-min) (point-max)))))))
>  
> @@ -2036,6 +2039,9 @@ shr-render-td-1
>  	    (shr-indentation 0))
>  	(shr-descend dom))
>        (save-window-excursion
> +        ;; Avoid errors if the selected window is a dedicated one,
> +        ;; and they just want to insert a document into it.
> +        (set-window-dedicated-p nil nil)
>  	(set-window-buffer nil (current-buffer))
>  	(unless fill
>  	  (setq natural-width

Lars, any objections to pushing this?





  reply	other threads:[~2017-02-25  8:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 11:34 bug#25828: 25.1; remaining errors from shr calling set-window-buffer-p in dedicated window David Bremner
2017-02-25  8:27 ` Eli Zaretskii [this message]
2017-03-04 10:21   ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=83d1e6smjt.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25828@debbugs.gnu.org \
    --cc=david@tethera.net \
    --cc=larsi@gnus.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.