* Indent region @ 2009-08-24 14:55 Rodolfo Medina 2009-08-24 15:02 ` Peter Brett ` (2 more replies) 0 siblings, 3 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-24 14:55 UTC (permalink / raw) To: help-gnu-emacs `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 service -- she could have seen through a pair of stove-lids just as well. She looked perplexed for a moment, and then said, not fiercely, but still loud enough for the furniture to hear: . In Emacs manual I couldn't find an answer to the problem. Thanks for any help Rodolfo ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 14:55 Indent region Rodolfo Medina @ 2009-08-24 15:02 ` Peter Brett 2009-08-24 15:16 ` Alan 2009-08-24 16:40 ` B. T. Raven 2 siblings, 0 replies; 22+ messages in thread From: Peter Brett @ 2009-08-24 15:02 UTC (permalink / raw) To: help-gnu-emacs Rodolfo Medina <rodolfo.medina@gmail.com> writes: > `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 service -- > she could have seen through a pair of stove-lids just as well. She looked > perplexed for a moment, and then said, not fiercely, but still loud enough > for the furniture to hear: > > . In Emacs manual I couldn't find an answer to the problem. If it's a one-off, have you tried picture-mode? Peter ;-) -- Peter Brett <peter@peter-b.co.uk> Remote Sensing Research Group Surrey Space Centre ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 14:55 Indent region Rodolfo Medina 2009-08-24 15:02 ` Peter Brett @ 2009-08-24 15:16 ` Alan 2009-08-24 16:40 ` B. T. Raven 2 siblings, 0 replies; 22+ messages in thread From: Alan @ 2009-08-24 15:16 UTC (permalink / raw) To: help-gnu-emacs On Aug 24, 9:55 am, Rodolfo Medina <rodolfo.med...@gmail.com> 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 service -- > she could have seen through a pair of stove-lids just as well. She looked > perplexed for a moment, and then said, not fiercely, but still loud enough > for the furniture to hear: > > . In Emacs manual I couldn't find an answer to the problem. > > Thanks for any help > Rodolfo C-x r t runs `string-rectangle' `string-rectangle' is an interactive compiled Lisp function -- loaded from "rect" (string-rectangle START END STRING) Documentation: Insert STRING on each line of the region-rectangle, shifting text right. The left edge of the rectangle specifies the column for insertion. If `pending-delete-mode' is active the string replace the region. Otherwise this command does not delete or overwrite any existing text. When called from a program, the rectangle's corners are START and END. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 14:55 Indent region Rodolfo Medina 2009-08-24 15:02 ` Peter Brett 2009-08-24 15:16 ` Alan @ 2009-08-24 16:40 ` B. T. Raven 2009-08-24 18:22 ` Rodolfo Medina 2 siblings, 1 reply; 22+ messages in thread From: B. T. Raven @ 2009-08-24 16:40 UTC (permalink / raw) To: help-gnu-emacs 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 service -- > she could have seen through a pair of stove-lids just as well. She looked > perplexed for a moment, and then said, not fiercely, but still loud enough > for the furniture to hear: > > . In Emacs manual I couldn't find an answer to the problem. > > Thanks for any help > Rodolfo 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 16:40 ` B. T. Raven @ 2009-08-24 18:22 ` Rodolfo Medina 2009-08-24 20:35 ` Lennart Borgman ` (2 more replies) 0 siblings, 3 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-24 18:22 UTC (permalink / raw) To: help-gnu-emacs 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" <nihil@nihilo.net> 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 18:22 ` Rodolfo Medina @ 2009-08-24 20:35 ` Lennart Borgman 2009-08-24 21:15 ` B. T. Raven [not found] ` <mailman.5270.1251146161.2239.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 22+ messages in thread From: Lennart Borgman @ 2009-08-24 20:35 UTC (permalink / raw) To: Rodolfo Medina; +Cc: help-gnu-emacs On Mon, Aug 24, 2009 at 8:22 PM, Rodolfo Medina<rodolfo.medina@gmail.com> wrote: > 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 think some of us are trying to guess what you mean right now. Do you perhaps mean that filling and indenting should work in concert here? ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 18:22 ` Rodolfo Medina 2009-08-24 20:35 ` Lennart Borgman @ 2009-08-24 21:15 ` B. T. Raven 2009-08-24 22:28 ` Rodolfo Medina [not found] ` <mailman.5270.1251146161.2239.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 22+ messages in thread From: B. T. Raven @ 2009-08-24 21:15 UTC (permalink / raw) To: help-gnu-emacs Rodolfo Medina wrote: > 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" <nihil@nihilo.net> 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. Another feature you might look at is fill prefixes: C-x . Btw, C-u 10 C-M-\ isn't exactly the same as C-space at beginning and C-x r o at end since the former doesn't seem to preserve a possibly hanging or over indented first line. Ed ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 21:15 ` B. T. Raven @ 2009-08-24 22:28 ` Rodolfo Medina 2009-08-25 2:04 ` B. T. Raven 0 siblings, 1 reply; 22+ messages in thread From: Rodolfo Medina @ 2009-08-24 22:28 UTC (permalink / raw) To: help-gnu-emacs "B. T. Raven" <nihil@nihilo.net> 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" <nihil@nihilo.net> 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 22:28 ` Rodolfo Medina @ 2009-08-25 2:04 ` B. T. Raven 0 siblings, 0 replies; 22+ messages in thread From: B. T. Raven @ 2009-08-25 2:04 UTC (permalink / raw) To: help-gnu-emacs Rodolfo Medina wrote: > "B. T. Raven" <nihil@nihilo.net> 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" <nihil@nihilo.net> 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.5270.1251146161.2239.help-gnu-emacs@gnu.org>]
* Re: Indent region [not found] ` <mailman.5270.1251146161.2239.help-gnu-emacs@gnu.org> @ 2009-08-24 22:13 ` Rodolfo Medina 2009-08-24 21:51 ` Lennart Borgman [not found] ` <mailman.5272.1251150746.2239.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-24 22:13 UTC (permalink / raw) To: help-gnu-emacs On Mon, Aug 24 Rodolfo Medina<rodolfo.medina@gmail.com> wrote: >> 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. Lennart Borgman <lennart.borgman@gmail.com> writes: > I think some of us are trying to guess what you mean right now. Do you > perhaps mean that filling and indenting should work in concert here? Yes, that's it: sorry for not having been clear. I'm driving mad about that because can't find a solution in Emacs manual, which seems strange. Any hint?? Thanks Rodolfo ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region 2009-08-24 22:13 ` Rodolfo Medina @ 2009-08-24 21:51 ` Lennart Borgman [not found] ` <mailman.5272.1251150746.2239.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 22+ messages in thread From: Lennart Borgman @ 2009-08-24 21:51 UTC (permalink / raw) To: Rodolfo Medina; +Cc: help-gnu-emacs On Tue, Aug 25, 2009 at 12:13 AM, Rodolfo Medina<rodolfo.medina@gmail.com> wrote: > On Mon, Aug 24 Rodolfo Medina<rodolfo.medina@gmail.com> wrote: > >>> 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. > > > > Lennart Borgman <lennart.borgman@gmail.com> writes: > >> I think some of us are trying to guess what you mean right now. Do you >> perhaps mean that filling and indenting should work in concert here? > > > Yes, that's it: sorry for not having been clear. I'm driving mad about that > because can't find a solution in Emacs manual, which seems strange. > > Any hint?? Can't you just indent first and then fill? Or doesn't that work for you? (What version of Emacs are you using?) If you have any better idea for how this could be done, then please tell us. I can't see how Emacs should know that it should fill to when it indents, but maybe there could be a command that does both. What do you think? ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.5272.1251150746.2239.help-gnu-emacs@gnu.org>]
* Re: Indent region [not found] ` <mailman.5272.1251150746.2239.help-gnu-emacs@gnu.org> @ 2009-08-24 23:19 ` Rodolfo Medina 2009-08-26 9:42 ` Indent region in LaTeX mode Rodolfo Medina 0 siblings, 1 reply; 22+ messages in thread From: Rodolfo Medina @ 2009-08-24 23:19 UTC (permalink / raw) To: help-gnu-emacs Lennart Borgman <lennart.borgman@gmail.com> writes: > On Tue, Aug 25, 2009 at 12:13 AM, Rodolfo > Medina<rodolfo.medina@gmail.com> wrote: >> On Mon, Aug 24 Rodolfo Medina<rodolfo.medina@gmail.com> wrote: >> >>>> 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. >> >> >> >> Lennart Borgman <lennart.borgman@gmail.com> writes: >> >>> I think some of us are trying to guess what you mean right now. Do you >>> perhaps mean that filling and indenting should work in concert here? >> >> >> Yes, that's it: sorry for not having been clear. I'm driving mad about that >> because can't find a solution in Emacs manual, which seems strange. >> >> Any hint?? > > > Can't you just indent first and then fill? Or doesn't that work for > you? (What version of Emacs are you using?) Yes, it does, but not in LaTeX mode: that's why it didn't work for me: I was in LaTeX mode. So, this seems to be an issue for AUCTeX mailing list. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-24 23:19 ` Rodolfo Medina @ 2009-08-26 9:42 ` Rodolfo Medina 2009-08-26 11:24 ` Peter Dyballa ` (2 more replies) 0 siblings, 3 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-26 9:42 UTC (permalink / raw) To: help-gnu-emacs Rodolfo Medina <rodolfo.medina@gmail.com> writes: > Lennart Borgman <lennart.borgman@gmail.com> writes: > >> On Tue, Aug 25, 2009 at 12:13 AM, Rodolfo >> Medina<rodolfo.medina@gmail.com> wrote: >>> On Mon, Aug 24 Rodolfo Medina<rodolfo.medina@gmail.com> wrote: >>> >>>>> 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. >> >> >> Can't you just indent first and then fill? Or doesn't that work for >> you? (What version of Emacs are you using?) > > > Yes, it does, but not in LaTeX mode: that's why it didn't work for me: I was > in LaTeX mode. So, this seems to be an issue for AUCTeX mailing list. It seems that from AUCTeX ml no help could come about that issue, so I'm coming back to the present list in the hope that some elisp expert can suggest a proper code in order to achieve what I want. I resume the problem: 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; 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 . 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. Thanks for any help Rodolfo ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-26 9:42 ` Indent region in LaTeX mode Rodolfo Medina @ 2009-08-26 11:24 ` Peter Dyballa [not found] ` <mailman.5415.1251285889.2239.help-gnu-emacs@gnu.org> 2009-08-26 17:10 ` Ralf Angeli 2 siblings, 0 replies; 22+ messages in thread From: Peter Dyballa @ 2009-08-26 11:24 UTC (permalink / raw) To: Rodolfo Medina; +Cc: help-gnu-emacs Am 26.08.2009 um 11:42 schrieb Rodolfo Medina: > Can anyone suggest a proper code to make those above commands work > _also_ under > LaTeX mode? Make it an one-liner, i.e., fill-column set to 99999 or more. -- Greetings Pete Let's face it; we don't want a free market economy either. – James Farley, president, Coca-Cola Export Corp., 1959 ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.5415.1251285889.2239.help-gnu-emacs@gnu.org>]
* Re: Indent region in LaTeX mode [not found] ` <mailman.5415.1251285889.2239.help-gnu-emacs@gnu.org> @ 2009-08-26 13:23 ` Rodolfo Medina 2009-08-26 12:54 ` Peter Dyballa [not found] ` <mailman.5423.1251291261.2239.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-26 13:23 UTC (permalink / raw) To: help-gnu-emacs 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 <Peter_Dyballa@Web.DE> writes: > Make it an one-liner, i.e., fill-column set to 99999 or more. ...and then? Can you be more clear? Thanks Rodolfo ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-26 13:23 ` Rodolfo Medina @ 2009-08-26 12:54 ` Peter Dyballa [not found] ` <mailman.5423.1251291261.2239.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 22+ messages in thread From: Peter Dyballa @ 2009-08-26 12:54 UTC (permalink / raw) To: Rodolfo Medina; +Cc: help-gnu-emacs Am 26.08.2009 um 15:23 schrieb Rodolfo Medina: > ...and then? Can you be more clear? Every \item will have its own dedicated line. And so the paragraphs. Can't you simply try it? -- Greetings Pete "A designer knows he has arrived at perfection not when there is no longer anything to add, but when there is no longer anything to take away." – Antoine de Saint-Exupéry ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.5423.1251291261.2239.help-gnu-emacs@gnu.org>]
* Re: Indent region in LaTeX mode [not found] ` <mailman.5423.1251291261.2239.help-gnu-emacs@gnu.org> @ 2009-08-26 14:17 ` Rodolfo Medina 2009-08-26 14:23 ` Peter Dyballa ` (3 more replies) 0 siblings, 4 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-26 14:17 UTC (permalink / raw) To: help-gnu-emacs 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 <Peter_Dyballa@Web.DE> 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-26 14:17 ` Rodolfo Medina @ 2009-08-26 14:23 ` Peter Dyballa 2009-08-26 17:52 ` B. T. Raven ` (2 subsequent siblings) 3 siblings, 0 replies; 22+ messages in thread From: Peter Dyballa @ 2009-08-26 14:23 UTC (permalink / raw) To: Rodolfo Medina; +Cc: help-gnu-emacs Am 26.08.2009 um 16:17 schrieb Rodolfo Medina: > . It's not what I want. Maybe I misunderstood what you meant. It's what I want. Otherwise I would use M$ Word. -- Greetings Pete Never be led astray onto the path of virtue ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-26 14:17 ` Rodolfo Medina 2009-08-26 14:23 ` Peter Dyballa @ 2009-08-26 17:52 ` B. T. Raven 2009-08-27 9:00 ` Peter Dyballa [not found] ` <mailman.5507.1251363817.2239.help-gnu-emacs@gnu.org> 3 siblings, 0 replies; 22+ messages in thread From: B. T. Raven @ 2009-08-26 17:52 UTC (permalink / raw) To: help-gnu-emacs 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 <Peter_Dyballa@Web.DE> 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-26 14:17 ` Rodolfo Medina 2009-08-26 14:23 ` Peter Dyballa 2009-08-26 17:52 ` B. T. Raven @ 2009-08-27 9:00 ` Peter Dyballa [not found] ` <mailman.5507.1251363817.2239.help-gnu-emacs@gnu.org> 3 siblings, 0 replies; 22+ messages in thread From: Peter Dyballa @ 2009-08-27 9:00 UTC (permalink / raw) To: Rodolfo Medina; +Cc: help-gnu-emacs Am 26.08.2009 um 16:17 schrieb Rodolfo Medina: > 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. OK, another try! Reduce fill-column to previous value less the indentation. Starting in a new and fresh line at first column. There write your text and format it with M-Q. Now cut it as a rectangle and insert the rectangle after the \item or whatever. It will be automatically indented. Set fill-column back to the original value. -- Greetings Pete A child of five could understand this! Fetch me a child of five. ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <mailman.5507.1251363817.2239.help-gnu-emacs@gnu.org>]
* Re: Indent region in LaTeX mode [not found] ` <mailman.5507.1251363817.2239.help-gnu-emacs@gnu.org> @ 2009-08-27 11:58 ` Rodolfo Medina 0 siblings, 0 replies; 22+ messages in thread From: Rodolfo Medina @ 2009-08-27 11:58 UTC (permalink / raw) To: help-gnu-emacs Rodolfo Medina 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 >> 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 >> >> . 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 <Peter_Dyballa@Web.DE> writes: > OK, another try! Reduce fill-column to previous value less the > indentation. Starting in a new and fresh line at first column. There write > your text and format it with M-Q. Now cut it as a rectangle and insert the > rectangle after the \item or whatever. It will be automatically indented. Set > fill-column back to the original value. That seems to work, thanks. "When you must specify a rectangle for a command to work on, you do it by putting the mark at one corner and point at the opposite corner." Then, `C-x r r R' to copy or `C-x r k' to kill it it and `C-x r y' to paste it at the desired point. It's not to jump for joy, it's a bit complicated, but it works. When I think that in text mode it's very simple... So, another way could be to switch to text mode, do the job and then switch back to LaTeX mode. Maybe, then, we needn't become M$ Word users, do we? ;) Rodolfo ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Indent region in LaTeX mode 2009-08-26 9:42 ` Indent region in LaTeX mode Rodolfo Medina 2009-08-26 11:24 ` Peter Dyballa [not found] ` <mailman.5415.1251285889.2239.help-gnu-emacs@gnu.org> @ 2009-08-26 17:10 ` Ralf Angeli 2 siblings, 0 replies; 22+ messages in thread From: Ralf Angeli @ 2009-08-26 17:10 UTC (permalink / raw) To: help-gnu-emacs * Rodolfo Medina (2009-08-26) writes: > It seems that from AUCTeX ml no help could come about that issue Duly noted. -- Ralf ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2009-08-27 11:58 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-08-24 14:55 Indent region Rodolfo Medina 2009-08-24 15:02 ` Peter Brett 2009-08-24 15:16 ` Alan 2009-08-24 16:40 ` B. T. Raven 2009-08-24 18:22 ` Rodolfo Medina 2009-08-24 20:35 ` Lennart Borgman 2009-08-24 21:15 ` B. T. Raven 2009-08-24 22:28 ` Rodolfo Medina 2009-08-25 2:04 ` B. T. Raven [not found] ` <mailman.5270.1251146161.2239.help-gnu-emacs@gnu.org> 2009-08-24 22:13 ` Rodolfo Medina 2009-08-24 21:51 ` Lennart Borgman [not found] ` <mailman.5272.1251150746.2239.help-gnu-emacs@gnu.org> 2009-08-24 23:19 ` Rodolfo Medina 2009-08-26 9:42 ` Indent region in LaTeX mode Rodolfo Medina 2009-08-26 11:24 ` Peter Dyballa [not found] ` <mailman.5415.1251285889.2239.help-gnu-emacs@gnu.org> 2009-08-26 13:23 ` Rodolfo Medina 2009-08-26 12:54 ` Peter Dyballa [not found] ` <mailman.5423.1251291261.2239.help-gnu-emacs@gnu.org> 2009-08-26 14:17 ` Rodolfo Medina 2009-08-26 14:23 ` Peter Dyballa 2009-08-26 17:52 ` B. T. Raven 2009-08-27 9:00 ` Peter Dyballa [not found] ` <mailman.5507.1251363817.2239.help-gnu-emacs@gnu.org> 2009-08-27 11:58 ` Rodolfo Medina 2009-08-26 17:10 ` Ralf Angeli
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).