help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question / proposal for emacs release.


From: David Kastrup
Subject: Re: question / proposal for emacs release.
Date: Wed, 08 Dec 2010 15:33:27 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Toy Yoda <gtdegamo@gmail.com> writes:

> On Oct 25, 12:41 pm, jpkotta <jpko...@gmail.com> wrote:
>> On Oct 25, 10:32 am, Toy Yoda <gtdeg...@gmail.com> wrote:
>>
>>
>>
>> > Hello.
>>
>> > Is there a feature in GNU emacs that can help me do the following...
>>
>> > I'd like to be able to have rectangle-edit print out a sequence of
>> > numbers.  So, many times I would like to rectangle insert -for
>> > example- the following:
>>
>> > 0
>> > 1
>> > 2
>> > 3
>> > ...
>>
>> > When you give input, if you zero prefix the starting number, it will
>> > zero prefix the sequence so that all the numbers take up the same
>> > width.  If you prefix or suffix the starting number with a white
>> > space, emacs will print all the numbers with the same width using
>> > whitespace padding that will either be right or left justified.
>>
>> > So, is there some package out there now that does this?
>>
>> > If not, would this be something cool to add as a feature to the
>> > standard rectangle edit?  And, where do I propose such a feature?
>>
>> > thanks!
>>
>> It's already in cua-rect.el.  I'm pretty sure you don't need to enable
>> CUA bindings in order to use this feature.
>>
>> M-x cua-set-rectangle-mark (CUA mode binds this to C-<return>)
>> set the rectangle with arrows or mouse
>> M-n or M-x cua-sequence-rectangle
>
>
>
> Hey that's cool.  I didn't know cua existed in emacs.  Anyways, the
> rectangle edit is better than 'old-school' rectangle edit, but it
> still falls short of what I want.  I want to be able to type as input
> to rectangle edit something like:
>
> '1'   '10'  and emacs will print in a vertical rectangle: '1', '2',
> '3', '4', '5', '6', '7', '8', '9', '10'.

C-M-% \(\) RET \,(format "%2d\n" (1+ \#)) RET

> '01'   '10'  and emacs will print in a vertical rectangle: '01', '02',
> '03', '04', '05', '06', '07', '08', '09', '10'.

Same with format %02d.

Don't forget to file a bug report when it skips strange amounts of
space.

-- 
David Kastrup


reply via email to

[Prev in Thread] Current Thread [Next in Thread]