From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.bugs Subject: bug#8196: 23.1; Feature request with code: "C-x TAB" to understand tab-stop-list Date: Fri, 12 Jul 2013 23:05:00 +0300 Message-ID: <87k3kv4k9f.fsf@mithlond.arda> References: <87d3m2equ6.fsf@imladris.arda> <87oba74rww.fsf@mithlond.arda> <2b9b23f3-8622-4a4e-847f-a2f751c2c881@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373659575 1613 80.91.229.3 (12 Jul 2013 20:06:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jul 2013 20:06:15 +0000 (UTC) Cc: 8196@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 22:06:16 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 1Uxjba-0006sw-PA for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 22:06:14 +0200 Original-Received: from localhost ([::1]:36925 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxjba-0001YT-AC for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 16:06:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjbT-0001Ts-As for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 16:06:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxjbP-0004Rm-3j for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 16:06:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjbO-0004RO-W5 for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 16:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UxjbO-0005Gx-1x for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 16:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Teemu Likonen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2013 20:06: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-submit@debbugs.gnu.org id=B8196.137365951220153 (code B ref 8196); Fri, 12 Jul 2013 20:06:02 +0000 Original-Received: (at 8196) by debbugs.gnu.org; 12 Jul 2013 20:05:12 +0000 Original-Received: from localhost ([127.0.0.1]:51240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxjaZ-0005Ey-Mg for submit@debbugs.gnu.org; Fri, 12 Jul 2013 16:05:12 -0400 Original-Received: from mta-out.inet.fi ([195.156.147.13]:60512 helo=kirsi1.inet.fi) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxjaV-0005Em-MM for 8196@debbugs.gnu.org; Fri, 12 Jul 2013 16:05:09 -0400 Original-Received: from mithlond.arda (84.251.134.110) by kirsi1.inet.fi (8.5.140.03) id 51BB5BE302110459; Fri, 12 Jul 2013 23:05:02 +0300 Original-Received: from dtw by mithlond.arda with local (Exim 4.80) (envelope-from ) id 1UxjaO-0001k6-2r; Fri, 12 Jul 2013 23:05:00 +0300 In-Reply-To: <2b9b23f3-8622-4a4e-847f-a2f751c2c881@default> (Drew Adams's message of "Fri, 12 Jul 2013 12:11:31 -0700 (PDT)") 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:76299 Archived-At: Drew Adams [2013-07-12 12:11:31 -07:00] wrote: >>> I think it would be better if "C-x TAB" (bound to indent-rigidly) >>> advanced the indentation to the next tab stop (as in tab-stop-list) >>> by default, instead of by 1. Similarly, if negative prefix argument >>> were given (with "C-u -") it would change the indentation to the >>> previous tab stop. > > Sorry, that does not make sense to me. First, here's some reference where this came from: http://lists.gnu.org/archive/html/help-gnu-emacs/2011-03/msg00243.html The feature supersedes indent-rigidly. If filed this wishlist bug report because Stefan Monnier suggested so: Indeed, it sounds like a good improvement to the behavior of C-x TAB. Maybe you could propose it for inclusion via M-x report-emacs-bug. Here's a concrete use-case. Let's say my tab-stop-list variable is like (4 8 12 16 20 etc.). I'm in a message-mode buffer writing some email or news message which is about Lisp programming. I copy a piece of code from some other buffer, like this: (defun foo (bar) (setq some-variable some-value) (some-function-call bar) ...) I want to indent it so that it stands out from my normal text. I mark the code piece with M-h and press C-x TAB (which runs my improved indent-rigidly). It results in this: (defun foo (bar) (setq some-variable some-value) (some-function-call bar) ...) The lowest indentation of that paragraph is now column 4. If I had kept repeating TAB key the code would have been indented to columns 8, 12, 16 etc. as the tab-stop-list variable defines. The doc string of that command could be like this: Indent region to a tab stop column or to the specified column. Indent the region from BEG to END according to the command's prefix argument ARG. If ARG is nil (i.e., there is no prefix argument) indent the region to the next tab stop column in `tab-stop-list'. With negative prefix ARG (C-u -) indent the region to the previous tab stop column. If ARG is an integer indent the region by ARG columns (just like `indent-rigidly' command). If this command is invoked by a multi-character key sequence, it can be repeated by repeating the final character of the sequence.