diff options
| author | Jim Porter | 2025-06-19 12:23:24 -0700 |
|---|---|---|
| committer | Jim Porter | 2025-06-29 10:08:21 -0700 |
| commit | db6cbee742ff45bbd52a86cc1823386879beb7e6 (patch) | |
| tree | 7052eb23d2aa2ed0889d358fdac9bddaed4d5655 | |
| parent | e51ff3ee664ecc848ed99f2f715e9a33208a8d66 (diff) | |
| download | emacs-db6cbee742ff45bbd52a86cc1823386879beb7e6.tar.gz emacs-db6cbee742ff45bbd52a86cc1823386879beb7e6.zip | |
Populate the ':title' in EWW when defaulting to readable mode
Do not merge to master.
* lisp/net/eww.el (eww-display-document): Always render the full
document first to populate ':title' (bug#77299).
| -rw-r--r-- | lisp/net/eww.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/net/eww.el b/lisp/net/eww.el index c3e927b74a6..0bf7fe5f307 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el | |||
| @@ -828,6 +828,12 @@ This replaces the region with the preprocessed HTML." | |||
| 828 | (unless document | 828 | (unless document |
| 829 | (let ((dom (eww--parse-html-region (point) (point-max) charset))) | 829 | (let ((dom (eww--parse-html-region (point) (point-max) charset))) |
| 830 | (when (eww-default-readable-p url) | 830 | (when (eww-default-readable-p url) |
| 831 | ;; HACK: Work around bug#77299. By displaying the full | ||
| 832 | ;; document first, we can ensure that the `:title' property in | ||
| 833 | ;; `eww-data' gets set properly. This is inefficient, since | ||
| 834 | ;; it requires rendering the document twice. | ||
| 835 | (let ((shr-inhibit-images t)) | ||
| 836 | (eww-display-document (eww-document-base url dom) point buffer)) | ||
| 831 | (eww-score-readability dom) | 837 | (eww-score-readability dom) |
| 832 | (setq dom (eww-highest-readability dom)) | 838 | (setq dom (eww-highest-readability dom)) |
| 833 | (with-current-buffer buffer | 839 | (with-current-buffer buffer |