From: "T. V. Raman" <raman@google.com>
To: emacs-devel@gnu.org
Subject: Trunk: eww: loses title
Date: Thu, 13 Nov 2014 20:01:22 -0800 [thread overview]
Message-ID: <21605.32402.766573.451646@gargle.gargle.HOWL> (raw)
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))))
next reply other threads:[~2014-11-14 4:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 4:01 T. V. Raman [this message]
2014-11-14 4:09 ` Trunk: eww: loses title Lars Magne Ingebrigtsen
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=21605.32402.766573.451646@gargle.gargle.HOWL \
--to=raman@google.com \
--cc=emacs-devel@gnu.org \
--cc=tv.raman.tv@gmail.com \
/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.