From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Indent region Date: Mon, 24 Aug 2009 21:04:44 -0500 Message-ID: References: <87tyzx1cti.fsf@gmail.com> <87fxbhysvd.fsf@gmail.com> <8763cckfru.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1251168045 11149 80.91.229.12 (25 Aug 2009 02:40:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Aug 2009 02:40:45 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 25 04:40:38 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mflxe-0002gq-3e for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Aug 2009 04:40:38 +0200 Original-Received: from localhost ([127.0.0.1]:52958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mflxd-0007vH-EM for geh-help-gnu-emacs@m.gmane.org; Mon, 24 Aug 2009 22:40:37 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!207.99.111.53.MISMATCH!newspeer1.nac.net!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 24 Aug 2009 21:04:39 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: <8763cckfru.fsf@gmail.com> X-No-Archive: yes Original-Lines: 62 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.38 Original-X-Trace: sv3-UxDC5O9f0QGu3Z0OjCXNz5FeN7f/jvwPejVLLscVU+M1oBQGfD0HYwsdybzTYzJSCb54/S41FomlXM1!uB1LIrvrpE+YnKXWenscj94YUY3SzjyjWyqpUwR+7YWki6LntGiV6iEb2Tezm+XL/aavu/FJyzxA!wTqKjWj3gaXy2ymhZkHGVFm5EzVr/w== Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Original-Xref: news.stanford.edu gnu.emacs.help:172348 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Gmane-Expiry: 2009-09-08 Xref: news.gmane.org gmane.emacs.help:67490 Archived-At: Rodolfo Medina wrote: > "B. T. Raven" writes: > >>>> Rodolfo Medina wrote: >>>>> `C-u 10 C-x TAB' or `C-M-\' indent a region `line by line', whereas I want >>>>> the whole region to be indented, like: >>>>> >>>>> The old lady pulled her spectacles down and looked over them about the >>>>> room; then she put them up and looked out under them. She seldom or >>>>> never looked through them for so small a thing as a boy; they were her >>>>> state pair, the pride of her heart, and were built for "style," not >>>>> >>>>> . In Emacs manual I couldn't find an answer to the problem. >>> >>> >>> >>> "B. T. Raven" writes: >>> >>>> At beginning of region do: >>>> >>>> C-space >>>> >>>> move to last line of region >>>> move cursor rightward as far as you want the region indented >>>> >>>> do: >>>> C-x r o >>> >>> Thanks, but that's the same as `C-u 10 C-x TAB' or `C-M-\': each line of the >>> region is indented separately, but not the region all together, as in my >>> example. >>> >>> Rodolfo >> I understand the distinction in theory. What does it amount to in practice? If >> I copy-paste your original paragraph into Emacs (from Thunderbird) there are >> linefeeds after the, never, state, service --, >> etc. What you show above has changes (possibly due to word wrap or quote >> prefixes). A paragraph is defined by paragraph-separate and paragraph-start, I >> think. Is the original paragraph(s) one long line in Emacs? If not then there >> are line-feeds within the paragraph(s) (or region) and it will have to be >> treated as individual lines. > > > > All I want is the same that `M-q' does, only that the paragraph lines should > all begin from column, say, 10 instead of 1. It looks strange to me that it > is, as I see, difficult and original. > > Thanks > Rodolfo Well, you could wrap setq fill-column, fill-paragraph, and open rectangle all in some function. Do you want indenting to be built into the fill-paragraph (fill-region) functions? Why do you care how it's done if the result is satisfactory? All M-q does is reformat paragraph to break lines at the nearest space before or at fill-column. After moving everthing over ten spaces you can still do M-q without losing that 10 space margin. Remember to add 10 to fill-column or the result will be narrower than you expect. Ed