* Trunk: eww: loses title
@ 2014-11-14 4:01 T. V. Raman
2014-11-14 4:09 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: T. V. Raman @ 2014-11-14 4:01 UTC (permalink / raw)
To: emacs-devel
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))))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-14 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-14 4:01 Trunk: eww: loses title T. V. Raman
2014-11-14 4:09 ` Lars Magne Ingebrigtsen
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).