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 09:58:57 +0530 Message-ID: <87sizsb9bq.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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373084848 28150 80.91.229.3 (6 Jul 2013 04:27:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jul 2013 04:27:28 +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 06:27:29 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 1UvK5m-0003hr-8R for ged-emacs-devel@m.gmane.org; Sat, 06 Jul 2013 06:27:26 +0200 Original-Received: from localhost ([::1]:55153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvK5l-0005Kh-Hf for ged-emacs-devel@m.gmane.org; Sat, 06 Jul 2013 00:27:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvK5h-0005KN-EC for emacs-devel@gnu.org; Sat, 06 Jul 2013 00:27:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvK5g-0003wl-7a for emacs-devel@gnu.org; Sat, 06 Jul 2013 00:27:21 -0400 Original-Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]:58041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvK5g-0003wd-1E for emacs-devel@gnu.org; Sat, 06 Jul 2013 00:27:20 -0400 Original-Received: by mail-pb0-f51.google.com with SMTP id um15so2639794pbc.38 for ; Fri, 05 Jul 2013 21:27:19 -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=/BfHjF7FJ1PdjzUAug0DZlPzixgeMMFnpOf7BnniCo4=; b=kkcvyyBoASugQ5/j0oYDy646bDEjy+V03PRadX1PwoBhbY5cCADJtP6f/HoInJ1hUp XkjsFetVh/cZ1fj7CL7mX+XzE49C5g1kr6TflJG75V83Qnxvy6EZIM1e4iYUsnIp6ZWJ khE9H+od3tbRmcdesLlQYre9DrdpO/MGukS74hTcs5NhuPMevTbJtI+OeJa74hAvOjwZ aEJV53FOOOUKKTdPj0T36OmvCDbUQpQ55nub06LJ5tvX4exaGP2EVUrFjjcDwXBQX1Hl Y9E0ya8+TNptKkSymrbfrgmT/XyU+wVpttuM2UuQgme6gsnFow8lvs0SwgwNhjuNWCmF WtCA== X-Received: by 10.68.171.67 with SMTP id as3mr12329237pbc.18.1373084839137; Fri, 05 Jul 2013 21:27:19 -0700 (PDT) Original-Received: from debian-6.05 ([115.242.147.0]) by mx.google.com with ESMTPSA id pb5sm10172078pbc.29.2013.07.05.21.27.16 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 05 Jul 2013 21:27:18 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 05 Jul 2013 20:14:58 -0400") 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::233 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:161632 Archived-At: Stefan Monnier writes: >> I don't care too much about the dispatcher, though, so it's OK with me >> if Emacs is the default dispatcher (the current status) and we make it >> easy to make `eww' the default instead. > > Maybe it's fine to let eww handle the mime-type -> major-mode mapping. > But it's still unclear how to cleanly cause url-handler-mode to affect > C-x C-f such that eww is called. I believe, the actual gluing could be achieved with minimal investments. The magic seems to happen so. (get operation 'url-file-handlers) (put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents) So `url-file-handlers' (actually `url-insert') need to check for `(mm-handle-media-type handle)' and call one of the handlers (See `eww-render'). (cond ((equal (car content-type) "text/html") (eww-display-html charset url)) ((string-match "^image/" (car content-type)) (eww-display-image)) (t (eww-display-raw charset))) Are there any intervening operation between `insert-file-contents' and `find-file-hook'. (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. ---------------------------------------------------------------- Btw, url-handler-mode seems to be doing synchronous fetch while eww seems to do an aynch fetch. Should C-x C-f be "blocking" or can it be an "asynchronous" C-x C-f? ---------------------------------------------------------------- As for write operation, "Wiki URLs" are "writable" and can also be "renamed". ;; These are operations that we do not support yet (DAV!!!) (put 'file-writable-p 'url-file-handlers 'ignore) > > > Stefan