From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.devel Subject: Re: Rename `eww' to `web' Date: Sat, 06 Jul 2013 10:58:02 +0530 Message-ID: <87d2qwtfz1.fsf@gmail.com> References: <8738s087wj.fsf@gmail.com> <87bo6mjv4s.fsf@lifelogs.com> <871u7gavwx.fsf@catnip.gol.com> <87obaj39sc.fsf@lifelogs.com> <874ncbhsnv.fsf@gmail.com> <87ip0q1i49.fsf@lifelogs.com> <87r4fczxxd.fsf@lifelogs.com> <87sizsb9bq.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373088391 22513 80.91.229.3 (6 Jul 2013 05:26:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jul 2013 05:26:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 06 07:26:32 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UvL0x-0007ET-QV for ged-emacs-devel@m.gmane.org; Sat, 06 Jul 2013 07:26:31 +0200 Original-Received: from localhost ([::1]:60137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvL0x-0005fk-As for ged-emacs-devel@m.gmane.org; Sat, 06 Jul 2013 01:26:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvL0u-0005fT-CW for emacs-devel@gnu.org; Sat, 06 Jul 2013 01:26:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvL0q-0005nh-C7 for emacs-devel@gnu.org; Sat, 06 Jul 2013 01:26:28 -0400 Original-Received: from mail-pb0-x235.google.com ([2607:f8b0:400e:c01::235]:45103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvL0q-0005nM-68 for emacs-devel@gnu.org; Sat, 06 Jul 2013 01:26:24 -0400 Original-Received: by mail-pb0-f53.google.com with SMTP id xb12so2685001pbc.26 for ; Fri, 05 Jul 2013 22:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=+7MMd+70xW04OAPSx6fuAv3dzx0GKAx43SFVxc2d6ss=; b=HTPDZfm5dvkIEcvMZW/sXDZ9IzWGeG0XppdnMrFlMTa6eAdcJZ40vXCLj4bpTWqwV4 i0G7sAAOCHSGdsYVi115TU74f9Ak5okSDeWARb+5IaAYYq5OtfGIOn+ZqHuS7tFC7+Yu MoAFUVuHYtACZHujAjV5L6BQFJyvatU4lDBb0x2eQ0HOSWyG8g9EAQUiYzCr3vNC0+X8 Q8p05KJRuM3SQ1VWMxMw/yeA8MxyCMOZXCXGKgR+lrg0J2vuPDaHi+v7QLoHSJ1fT4JR CsGQ2sv3Kh70VeZl9Qh6VKuohVfmRkIl8LVjwuqkIxJAD5I4oliIZQgwn4d4MhBDrJbI V8YQ== X-Received: by 10.66.184.203 with SMTP id ew11mr11585414pac.178.1373088383448; Fri, 05 Jul 2013 22:26:23 -0700 (PDT) Original-Received: from debian-6.05 ([101.63.207.124]) by mx.google.com with ESMTPSA id py6sm10407538pbb.33.2013.07.05.22.26.20 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 05 Jul 2013 22:26:22 -0700 (PDT) In-Reply-To: <87sizsb9bq.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 06 Jul 2013 09:58:57 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161634 Archived-At: Jambunathan K writes: > Are there any intervening operation between `insert-file-contents' and > `find-file-hook'. > The answer seems to be `format-decode'r. How about... 1. Pass the Content Type from HTTP headers to `buffer-file-format' 2. Augment `format-alist' with "text/html" format and make `eww' (or shr or whatever) a decoder for it. The advantage would be that HTML rendering is isolated from URL retrieval operations. ,---- | (defun format-decode (format length &optional visit-flag) | ;; This function is called by insert-file-contents whenever a file is read. | "Decode text from any known FORMAT. | FORMAT is a symbol appearing in `format-alist' or a list of such symbols, | or nil, in which case this function tries to guess the format of the data by | matching against the regular expressions in `format-alist'. After a match is | found and the region decoded, the alist is searched again from the beginning | for another match. | | Second arg LENGTH is the number of characters following point to operate on. | If optional third arg VISIT-FLAG is true, set `buffer-file-format' | to the reverted list of formats used, and call any mode functions defined | for those formats. | | Return the new length of the decoded region. | | For most purposes, consider using `format-decode-region' instead." `---- > (add-hook 'find-file-hook 'url-handlers-set-buffer-mode) > > > Is `find-file-hook' the right place for a `renderer'? For "multipart" > buffers are there renderers on a per-part/region basis.