From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#19556: eww: make URI rewriting fully customizable Date: Sat, 10 Jan 2015 17:20:42 +0000 Message-ID: <8761ce1rit.fsf@violet.siamics.net> References: <87sifi22rg.fsf@violet.siamics.net> <831tn27m78.fsf@gnu.org> <87lhla1yx2.fsf@violet.siamics.net> <83vbke62wi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1420910481 31525 80.91.229.3 (10 Jan 2015 17:21:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Jan 2015 17:21:21 +0000 (UTC) To: 19556@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 10 18:21:16 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Y9zip-0000gw-Bj for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jan 2015 18:21:11 +0100 Original-Received: from localhost ([::1]:55730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9zio-0007Lq-Ep for geb-bug-gnu-emacs@m.gmane.org; Sat, 10 Jan 2015 12:21:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9zik-0007Lj-PO for bug-gnu-emacs@gnu.org; Sat, 10 Jan 2015 12:21:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9zih-00062x-FD for bug-gnu-emacs@gnu.org; Sat, 10 Jan 2015 12:21:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9zig-00062l-8P for bug-gnu-emacs@gnu.org; Sat, 10 Jan 2015 12:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y9zif-0003Dg-Nz for bug-gnu-emacs@gnu.org; Sat, 10 Jan 2015 12:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jan 2015 17:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19556 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19556-submit@debbugs.gnu.org id=B19556.142091045712354 (code B ref 19556); Sat, 10 Jan 2015 17:21:01 +0000 Original-Received: (at 19556) by debbugs.gnu.org; 10 Jan 2015 17:20:57 +0000 Original-Received: from localhost ([127.0.0.1]:42049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9zia-0003DB-Mh for submit@debbugs.gnu.org; Sat, 10 Jan 2015 12:20:57 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:48786) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y9ziW-0003Ct-Lr for 19556@debbugs.gnu.org; Sat, 10 Jan 2015 12:20:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=A8mF45uJb3exPXekRioXygEHvl5Z/8gOZWatO5JWjwY=; b=ZW+AfYQpghIPFuFPPiPupNEzWrSmZEZm+MvyG4KI44BNtEOQMbYSiXNP4AZ4Hwe6kwoCVFBBY51LgGrjcmCAyJT7TQFZ8BGALrzObObydpElf/8feYRnrDXQWGTEzz6z0bIsq0aunIhdfAvxe7/B2+uvaLnLDUmWTQpvAziLQMg=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y9ziU-0002ub-Df for 19556@debbugs.gnu.org; Sat, 10 Jan 2015 17:20:51 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y9ziN-00037k-7N for 19556@debbugs.gnu.org; Sun, 11 Jan 2015 00:20:43 +0700 Mail-Followup-To: 19556@debbugs.gnu.org In-Reply-To: <83vbke62wi.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Jan 2015 18:01:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:98186 Archived-At: >>>>> Eli Zaretskii writes: >>>>> From: Ivan Shmakov Date: Sat, 10 Jan 2015 14:40:57 +0000 >>>>> Eli Zaretskii writes: >>> Why put the "standard" rules into the defcustom? >> So to make the tricks played by EWW on unsuspecting URIs more >> obvious to the user. > How does that make it more obvious? By showing them in the =E2=80=9CCustomize Group=E2=80=9D buffer? >>> That's what hooks are normally for -- _modifying_ the default >>> behavior, not supplanting it. >> Are they? For instance, when run with -Q, my find-file-hooks >> includes ange-ftp-set-buffer-mode, epa-file-find-file-hook, >> vc-find-file-hook > None of these replace the default behavior of their hookee functions. > They _add_ something to it. The default behavior is not in the hook, > it's in the code that calls the hook. We seem to be disagreeing on the terms. To me, the way unmodified Emacs behaves when started with =E2=80=98-Q=E2=80=99 is the def= ault. To get different (custom) behavior, the user may add elements to hooks, lists of other kinds (including associative), keymaps, =E2=80=93 or /remove/ from them; load or /unload/ packages; add, redefine or advise commands or functions; etc. For instance, electric-indent-mode is the default. Using (electric-indent-mode -1) in one=E2=80=99s ~/.emacs is a customization. Calling log-edit-insert-message-template as part of log-edit-hook is the default. Setting log-edit-hook to nil is a (perfectly valid) customization. Providing a rich set of filename suffix to Emacs major mode pairs in auto-mode-alist is the default. Tailoring that alist according to the modes one does and does not use is customization. Etc. I see no reason for EWW to be different in that its default behavior cannot be customized =E2=80=93 whether that=E2=80=99d mean adding elements to some list, removing others from there, or doing something else. > And anyway, I said "normally", so a couple of examples to the > contrary doesn't yet invalidate what I said. Should I look for a couple more examples on top of that couple within the Emacs source tree just for the sake of this argument? >> With these functions being explicitly listed, however, I could >> easily drop everything but vc-find-file-hook off the list to get rid >> of the functionality that tends to get in my way. > It sounds like we have some deep disagreement about what the hooks > are for. You want a hook to _remove_ some behaviors, but that's not > what hooks are for. Except for those which are. Besides, what=E2=80=99d be the point of run-hook-with-args-until-success if not to allow the user to prepend his or her own function to override the behavior of the (default) functions coming later in that same hook? >>> E. g., with your suggestion, what happens if someone customizes the >>> value to nil? >> That=E2=80=99s simple: M-x eww will assume that the URIs it=E2=80=99s g= iven never >> need any special treatment. > Which is clearly wrong with some URIs. I see no way it could be wrong for /URIs proper./ Yes, that=E2=80=99d mean that M-x eww RET mary had a little lamb RET fails. But so does Lynx, Wget and Curl, url-retrieve, C-x C-f, and what not. On the contrary, I find the eagerness of EWW to send what could easily be a mistyped URI to a third party somewhat disturbing. Customizing eww-search-prefix to refer to some non-existing service (or just setting it to a non-nil symbol) may be a decent work-around for the issue, but it also disables eww-search-words as an unfortunate side-effect. > Please let's not go that way. Sure. Let=E2=80=99s instead make C-x C-f go DDG for completion and provide no option for the user to opt-out. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A