[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-i
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document' |
Date: |
Sat, 16 Dec 2017 17:23:02 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> > + ;; Save and restore point across with-temp-buffer, since
>> > + ;; shr-pixel-column uses save-window-excursion, which can reset
>> > + ;; point to 1.
>> > + (let ((pt (point)))
>> > + (with-temp-buffer
>> > + (insert string)
>> > + (shr-pixel-column))
>> > + (goto-char pt))))
>> Is it possible to fix the problem in shr-pixel-column (since, according
>> to the comment above, the problems comes from there)?
> No, because the value of point to preserve is from the buffer which
> was current before with-temp-buffer.
But when we enter shr-pixel-column, that buffer's point is still the
right one, and when we leave shr-pixel-column it isn't any more, so
somehow shr-pixel-column manages to "find" that buffer in order to
modify it and hence we should also be able to similarly find that buffer
and restore its point.
I mean, from a purely theoretical point of view, it *can* be
solved there. What I don't understand is where practical aspects end up
getting it the way.
Stefan
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', Stefan Monnier, 2017/12/16
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', Eli Zaretskii, 2017/12/16
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document',
Stefan Monnier <=
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', Eli Zaretskii, 2017/12/17
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', martin rudalics, 2017/12/17
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', Eli Zaretskii, 2017/12/17
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', martin rudalics, 2017/12/17
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', Stefan Monnier, 2017/12/17
- Re: [Emacs-diffs] emacs-26 f274cbd: Avoid reordering of output in 'shr-insert-document', martin rudalics, 2017/12/18