From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: eww Date: Mon, 13 Jan 2014 12:20:59 +0100 Message-ID: <87zjn0gmas.fsf@bzg.ath.cx> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1389612074 29001 80.91.229.3 (13 Jan 2014 11:21:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jan 2014 11:21:14 +0000 (UTC) Cc: Richard Stallman , Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 13 12:21:20 2014 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 1W2fa2-0005Rs-QQ for ged-emacs-devel@m.gmane.org; Mon, 13 Jan 2014 12:21:19 +0100 Original-Received: from localhost ([::1]:41873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2fa2-0006BL-Ak for ged-emacs-devel@m.gmane.org; Mon, 13 Jan 2014 06:21:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2fZu-0006Aa-2c for emacs-devel@gnu.org; Mon, 13 Jan 2014 06:21:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2fZo-0006ax-Jx for emacs-devel@gnu.org; Mon, 13 Jan 2014 06:21:10 -0500 Original-Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:60845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2fZo-0006af-Co; Mon, 13 Jan 2014 06:21:04 -0500 Original-Received: by mail-wg0-f45.google.com with SMTP id n12so2848725wgh.12 for ; Mon, 13 Jan 2014 03:21:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=CtdGRNrgK5+7CQogCeYuex0OWdvvVovrf5nQngJI2aU=; b=UGaWIH2UgZmNA/RKs8A8oetuUNbVtLzMfuIIH+Zc/KEiKO24XSYDqnMUPZLXNdbN9w w9zntUXagChlKcfmGQJLO9oKFtGTmpnzRsqNqF8wA8A3IW0jCvxxTCZBFksIg491x0qe AklgQpgiN9FqjnF8t89mFickqfILBzs05E41320soqg7ibrwmEdlWWQRJnUSmQQoaO08 Lv+OLPmV1KQuO/euY1xSefAOTjtUhOzv2dzidUOtOLcTIEbTaF9Mqp2hSfzPwX/XQP9t IayMGZIYD9CdiY0NjfSA4XR0yXnvwECn/cPbA7wz+qYOwwQg3+rrla6uXHDIg4+HgP93 1U4A== X-Received: by 10.194.61.3 with SMTP id l3mr21148042wjr.18.1389612063536; Mon, 13 Jan 2014 03:21:03 -0800 (PST) Original-Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPSA id y8sm11171973wje.12.2014.01.13.03.21.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jan 2014 03:21:01 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id 7F2891C20860; Mon, 13 Jan 2014 12:20:59 +0100 (CET) In-Reply-To: (Juanma Barranquero's message of "Sun, 12 Jan 2014 14:50:31 +0100") 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: 2a00:1450:400c:c00::22d 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:168287 Archived-At: --=-=-= Content-Type: text/plain Juanma Barranquero writes: > On Sun, Jan 12, 2014 at 2:46 PM, Richard Stallman wrote: > >> Before the first release that contains eww, I think we should set up >> natural aliases for the commands, perhaps using the name "browse" or >> "www" or "web" instead of "eww". With natural names, users won't have >> to wonder, "What in the world did they call that?" We can avoid >> adding one more difficulty to learning to use Emacs. >> >> I think epa also needs a set of natural aliases, with "crypt" instead >> of "epa". > > We introduced define-alternatives for exactly that case. It's just > that nobody has used it yet. Try this: (define-alternatives web) (setq web-alternatives '(("eww" . eww))) M-x web RET TAB RET Does not work without the attached patch. I think it's safe to recommend `define-alternatives' for commands only, not for function, and the docstring suggests this too. If so, I'll apply the patch. Two other problems: 1) when there is only one "alternative", the user is asked which one he wants. I think COMMAND should use the alternative without asking, and tell the user how to add other alternatives through COMMAND-alternatives for 2 secs the first time the alternative is chosen. 2) Once an alternative is chosen, setting COMMAND-alternatives will not take any effect, and I don't see a way to cancel the first choice. What do you think? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=simple.el.patch === modified file 'lisp/simple.el' *** lisp/simple.el 2014-01-12 04:00:03 +0000 --- lisp/simple.el 2014-01-13 11:10:41 +0000 *************** *** 7694,7700 **** (customize-save-variable ',varimp-sym (cdr (assoc-string val ,varalt-sym)))))) (if ,varimp-sym ! (funcall ,varimp-sym) (message ,(format "No implementation selected for command `%s'" command-name))))))) --- 7694,7700 ---- (customize-save-variable ',varimp-sym (cdr (assoc-string val ,varalt-sym)))))) (if ,varimp-sym ! (call-interactively ,varimp-sym) (message ,(format "No implementation selected for command `%s'" command-name))))))) --=-=-= Content-Type: text/plain -- Bastien --=-=-=--