From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#8196: 23.1; Feature request with code: "C-x TAB" to understand tab-stop-list Date: Tue, 8 Oct 2013 09:21:26 -0700 (PDT) Message-ID: References: <87d3m2equ6.fsf@imladris.arda> <87zjtp2ohh.fsf@mithlond.arda> <87hacr3hg0.fsf@mithlond.arda> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1381249346 14279 80.91.229.3 (8 Oct 2013 16:22:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Oct 2013 16:22:26 +0000 (UTC) Cc: 8196-done@debbugs.gnu.org, "Jambunathan K." To: Teemu Likonen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 08 18:22:28 2013 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 1VTa3F-000053-Q7 for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2013 18:22:26 +0200 Original-Received: from localhost ([::1]:37832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTa3F-0001fM-C2 for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Oct 2013 12:22:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTa33-0001UY-4R for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 12:22:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTa2s-0003br-Qn for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 12:22:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTa2s-0003bh-NK for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 12:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VTa2s-00011F-8U for bug-gnu-emacs@gnu.org; Tue, 08 Oct 2013 12:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Oct 2013 16:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8196 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8196-done@debbugs.gnu.org id=D8196.13812492953874 (code D ref 8196); Tue, 08 Oct 2013 16:22:02 +0000 Original-Received: (at 8196-done) by debbugs.gnu.org; 8 Oct 2013 16:21:35 +0000 Original-Received: from localhost ([127.0.0.1]:35202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTa2Q-00010Q-Dm for submit@debbugs.gnu.org; Tue, 08 Oct 2013 12:21:34 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:45761) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTa2M-00010E-Ip for 8196-done@debbugs.gnu.org; Tue, 08 Oct 2013 12:21:32 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r98GLSGJ017207 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Oct 2013 16:21:29 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r98GLR2g018616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Oct 2013 16:21:28 GMT Original-Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r98GLR2Z017024; Tue, 8 Oct 2013 16:21:27 GMT In-Reply-To: <87hacr3hg0.fsf@mithlond.arda> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] 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:79040 Archived-At: > >> I just folded it into indent-rigidly. > > > > Dunno what that means exactly, but a priori: too bad. Should be a > > separate command, as previously discussed and agreed. >=20 > The change has effect only when called interactively and when there is > no prefix argument. The new feature is more useful. Yes, we know that. Please read the thread. Remember this part, for instance? > > > What you can propose instead is that your new command get the > > > traditional binding for `indent-rigidly', `C-x TAB'. What we > > > should not do is replace the current `indent-rigidly' behavior > > > by the proposed behavior in the same command. Steal the key, > > > perhaps, but not the command. > > > > That's exactly what I'm doing. My command is called=20 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > "tl-indent-region" (ok, we can drop the tl- prefix) and it relies > > on indent-rigidly to do the job. >=20 > Great. Sounds good. I misunderstood that you wanted to change > `indent-rigidly'; sorry. >=20 > > My command behaves the same as indent-rigidly when called with > > a numeric prefix argument. >=20 > Yes, that I understood from the code. Changing the key binding but not the command itself, as you said you were doing, would be fine. There is no reason to change `indent-rigidly' itself. "My command" should have remained just that: a separate command. The fact that without a prefix arg it behaves the same as `indent-rigidly' is irrelevant, except as a (weak) argument for someone wanting to replace `indent-rigidly'. It means nothing for someone truly intending to add a new command and bind it by default to `C-x TAB'. What is important is to keep two separate functions, and not screw `indent-rigidly'. This portion of the thread is also relevant, as it seems to be what has now been implemented, in spite of the discussion: d> A mix would also be possible, but less desirable IMO: modify d> `indent-rigidly' to provide the new behavior only interactively, d> never when used in code. That has the disadvantage of not letting ^^^^^^^^^^^ d> code take advantage of the indentation-to-tab-stop behavior. d> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ d> I think it best to provide a separate command. d>=20 d> A separate command also lets any user who prefers the current default d> behavior interactively to bind `indent-rigidly', instead of your d> command, to `C-x TAB'. You find it handy to indent to a tab stop by d> default (ARG =3D nil), and then repeat (e.g., C-x z z z z). Someone d> else might find it handier to indent one column instead of one tab d> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ d> stop by default, and then repeat to indent the region incrementally. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The simplest approach is the best one, for these and other reasons discussed: Provide the new command. Even make it the new default binding for `C-x TAB'. But keep `indent-rigidly' as it has been. Simple, sane, no downside, wise.