From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "paul r" Newsgroups: gmane.emacs.devel Subject: Re: Usability suggestion : completion for M-: Date: Mon, 17 Mar 2008 10:32:00 +0100 Message-ID: References: <87hcf7r7vl.fsf@jurta.org> <003001c886f5$366f4330$0600a8c0@us.oracle.com> <874pb7ikt7.fsf@jurta.org> <000501c8873d$4ff68550$0600a8c0@us.oracle.com> <000701c88785$bd26dce0$0600a8c0@us.oracle.com> <87d4puxx2b.fsf@bzg.ath.cx> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205746339 13553 80.91.229.12 (17 Mar 2008 09:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Mar 2008 09:32:19 +0000 (UTC) Cc: Bastien , emacs-devel@gnu.org To: "Stefan Monnier" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 17 10:32:47 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JbBi1-0007Xd-T6 for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 10:32:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbBhS-00082l-7k for ged-emacs-devel@m.gmane.org; Mon, 17 Mar 2008 05:32:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JbBhN-0007zM-2U for emacs-devel@gnu.org; Mon, 17 Mar 2008 05:32:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JbBhL-0007ve-4t for emacs-devel@gnu.org; Mon, 17 Mar 2008 05:32:04 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JbBhK-0007vL-WC for emacs-devel@gnu.org; Mon, 17 Mar 2008 05:32:03 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.153]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JbBhK-0003nN-P7 for emacs-devel@gnu.org; Mon, 17 Mar 2008 05:32:03 -0400 Original-Received: by fg-out-1718.google.com with SMTP id d23so6683651fga.30 for ; Mon, 17 Mar 2008 02:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=SsoZWi8fiRxPmzuNjwm8MlkWTjVMk5zxP6eSGU3ZuWQ=; b=vMIhPUpS6OkPj69IMtpkqZIuNd21EtsUdvGN5FLikNXn7KeHo6FzphLPYjXu9Bq/U0O71Bo5Uerw5S5n0a03JgoRbM8dL2w8P4p2QJAzWBu6pDyklQtSso2nvvzS2jwmZpk11NOuanglZqHwgoV57mv0jMo7kNYl+Y9u+xw2IcQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=APBt/SDPyIRiQZrARABrf9V5rjc/UFq4ZIKPw+3A56bod5Bwo3QGsLOblijYKhutq3mfWZUpbYC4ZYIOopgTcOuh9QbO4SSbV21keL9ThIHF5y6Et0D7UobyMxn9VWe5CFJG24h4HCzFD8D+XIn8MVnTG1IhhspuzSg7TFUfARU= Original-Received: by 10.82.112.3 with SMTP id k3mr23694134buc.32.1205746320964; Mon, 17 Mar 2008 02:32:00 -0700 (PDT) Original-Received: by 10.82.176.6 with HTTP; Mon, 17 Mar 2008 02:32:00 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:92811 Archived-At: 2008/3/17, Stefan Monnier : > For what it's worth, I'm a bit annoyed by Emacs's inconsistent use of > TAB: in minibuffers, TAB behaves like in terminals to mean "complete", > where in normal buffers it usually means "indent". As a person relatively new to emacs, I can remember that those various uses of TAB made my first steps a bit more difficult. Now in my config, TAB is rebound for almost every mode I use, see below. > I have used for many years commands that do both bound to TAB: typically > my TAB first tries to indent, and if the indentation code didn't make any > change then TAB tries to complete. I'm really surprised to see how many people here have done their own implementation of this behaviour. FWIW, here is mine, fairly naive, but functional. (defun indent-for-tab-or-expand (expand-fct) "Indent line if not yet, otherwise call parameter function." (interactive) (let ((ppos (point))) (indent-for-tab-command) (if (and (looking-at "$") (not (looking-back "^\\s-*")) (eq ppos (point))) (call-interactively expand-fct)))) (defun indent-for-tab-or-dabbrev-expand () "Indent line if not yet, otherwise call dabbrev-expand." (interactive) (indent-for-tab-or-expand 'dabbrev-expand)) (defun indent-for-tab-or-hippie-expand () "Indent line if not yet, otherwise call hippie-expand." (interactive) (indent-for-tab-or-expand 'hippie-expand)) regards, -- paul