[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Trunk: eww: loses title
From: |
T. V. Raman |
Subject: |
Trunk: eww: loses title |
Date: |
Thu, 13 Nov 2014 20:01:22 -0800 |
eww-render in trunk appears to incorrectly set title to url.
Here's the function, with the suspect line commented out:
With it commented out title does get set correctly.
(defun eww-render (status url &optional point buffer)
(let ((redirect (plist-get status :redirect)))
(when redirect
(setq url redirect)))
(let* ((headers (eww-parse-headers))
(content-type
(mail-header-parse-content-type
(or (cdr (assoc "content-type" headers))
"text/plain")))
(charset (intern
(downcase
(or (cdr (assq 'charset (cdr content-type)))
(eww-detect-charset (equal (car content-type)
"text/html"))
"utf8"))))
(data-buffer (current-buffer)))
(unwind-protect
(progn
(plist-put eww-data :title "")
(cond
((and eww-use-external-browser-for-content-type
(string-match-p eww-use-external-browser-for-content-type
(car content-type)))
(eww-browse-with-external-browser url))
((equal (car content-type) "text/html")
(eww-display-html charset url nil point buffer))
((equal (car content-type) "application/pdf")
(eww-display-pdf))
((string-match-p "\\`image/" (car content-type))
(eww-display-image buffer)
(eww-update-header-line-format))
(t
(eww-display-raw buffer)
(eww-update-header-line-format)))
; this line looks suspect.
;(plist-put eww-data :title url)
(setq eww-history-position 0)
(run-hooks 'eww-after-render-hook))
(kill-buffer data-buffer))))
- Trunk: eww: loses title,
T. V. Raman <=