Subject: bug#8196: 23.1; Feature request with code: "C-x TAB" to understand tab-stop-list

From: Drew Adams <[email-masked]>
Date: Fri, 12 Jul 2013 14:18:27 -0700 (PDT)

> http://lists.gnu.org/archive/html/help-gnu-emacs/2011-03/msg00243.html

OK, so you take as the reference column the indentation of the leftmost
line.  Without some such specification what you described earlier was
incomplete.

> Here's a concrete use-case....

My point is that this does not belong in `indent-rigidly'.  Create a new
command for it.  That's all.  `indent-rigidly' is a very old function
that is used not only interactively but in Lisp code.  There's no telling
how much existing code out there might use the fact that ARG = nil
indents one column.

> The feature supersedes indent-rigidly.

I don't think so.  And I hope not.  It is a different function.
Superseding means nothing useful is lost.  In this case what is lost
is the default behavior (ARG = nil) that you are replacing.  Depending
on the context and the user, that lost behavior is at least as useful
as its replacement.

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.

A mix would also be possible, but less desirable IMO: modify
`indent-rigidly' to provide the new behavior only interactively, never
when used in code.  That has the disadvantage of not letting code take
advantage of the indentation-to-tab-stop behavior.  I think it best to
provide a separate command.

A separate command also lets any user who prefers the current default
behavior interactively to bind `indent-rigidly', instead of your command,
to `C-x TAB'.  You find it handy to indent to a tab stop by default
(ARG = nil), and then repeat (e.g., C-x z z z z).  Someone else might
find it handier to indent one column instead of one tab stop by default,
and then repeat to indent the region incrementally.

FWIW, I would no doubt do that (but that has nothing to do with why I
replied to this thread), since I never use tab stops and I do indent
regions rigidly and incrementally.

Just one opinion.  Two separate commands provide more options for users,
including Lisp coders.  I do not object to your appropriating `C-x TAB'
for the new command.  But please do not touch the existing command.

I would also suggest polling the users wrt the key binding.  It's not
obvious a priori that more people will want to indent via tab stops.