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 in LaTeX mode Date: Wed, 26 Aug 2009 12:52:37 -0500 Message-ID: References: <87tyzx1cti.fsf@gmail.com> <87fxbhysvd.fsf@gmail.com> <873a7gj1ws.fsf@gmail.com> <87eir0yf4i.fsf@gmail.com> <87hbvuhpwz.fsf_-_@gmail.com> <8763ca7lp6.fsf@gmail.com> <87my5my7zl.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 1251314619 11972 80.91.229.12 (26 Aug 2009 19:23:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Aug 2009 19:23:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 26 21:23:32 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 1MgO5i-0001CC-57 for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Aug 2009 21:23:30 +0200 Original-Received: from localhost ([127.0.0.1]:49859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgO5h-0003YP-Ed for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Aug 2009 15:23:29 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!news.enother.com!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: Wed, 26 Aug 2009 12:52:31 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: <87my5my7zl.fsf@gmail.com> X-No-Archive: yes Original-Lines: 60 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.132.179 Original-X-Trace: sv3-o5FxfB/HfGxXtDOm8u7uoVGUfg9szKndrcP9EUw7FO9+/PrPkuhZViFjvW3lGsM5FbNR2Dei/gLXvmQ!GA1bIqEvtmaHGRM4JMOs44ugZN0ekI3Mq6Fc6gtoIEosSv9WMfrWTM4NPP31NHm3gq/9OFbckfdR!X23bXX8OCOIO1Xgg5Qi9NKDXKwbw2Hs= 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:172426 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-09 Xref: news.gmane.org gmane.emacs.help:67567 Archived-At: Rodolfo Medina wrote: > Rodolfo wrote: > >> I want a certain paragraph to be indented and filled, like this: >> >> \item{1)} 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; were >> her state pair, the pride of her heart, and were built for "style," >> not service -- she could have seen through a pair of stove-lids just >> >> . I get this easily in text mode with `C-u 10 C-x TAB' and then `M-q'. >> Instead, in LaTeX mode, `M-q' does not fill the region. I don't know why it >> works fine in text mode but not in LaTeX mode. >> >> Can anyone suggest a proper code to make those above commands work _also_ >> under LaTeX mode? >> >> The issue looks important to me because, just in LaTeX, mode, you can often >> use such \item environments. > > > > Peter Dyballa writes: > >> Make it an one-liner, i.e., fill-column set to 99999 or more. >> Every \item will have its own dedicated line. And so the paragraphs. > > > Then my example above becomes: > > \item{1)} 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 service -- she could have seen through a pair of stove-lids just > > . It's not what I want. Maybe I misunderstood what you meant. > > Rodolfo If you can't get a guru interested in your problem then I guess you're screwed. Here is an elisp function that doesn't work: (defun my-latex-indent-item (&optional n) (interactive "p") (mark-paragraph) (unless n (setq n 10)) (open-rectangle 1 n) ) What this wants to do is move the \item paragraph (made into a region) n spaces right if C-u n prefix exists, otherwise ten spaces. What it does is go to the beginning of the buffer and move the first line n spaces. ??? Maybe it needs unwind-protect, save-excursion or something else I don't understand. Or maybe you can't implicitly create a region in an elisp program. Ed