all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* block based selection
@ 2005-04-15 14:04 Uwe Mayer
  2005-04-15 14:16 ` Albert Reiner
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Uwe Mayer @ 2005-04-15 14:04 UTC (permalink / raw)


Hi,

how do you change the way emacs selects regions of text? Currently it works
line based, but I need to select a rectangular region from within a text.
Can anyone help me with how to change the selection mode?

Thanks
Uwe     

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: block based selection
  2005-04-15 14:04 block based selection Uwe Mayer
@ 2005-04-15 14:16 ` Albert Reiner
  2005-04-15 14:37 ` Neon Absentius
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Albert Reiner @ 2005-04-15 14:16 UTC (permalink / raw)


[Uwe Mayer <merkosh@hadiko.de>, Fri, 15 Apr 2005 16:04:55 +0200]:
> line based, but I need to select a rectangular region from within a text.

C-x r C-h

HTH,

Albert.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: block based selection
  2005-04-15 14:04 block based selection Uwe Mayer
  2005-04-15 14:16 ` Albert Reiner
@ 2005-04-15 14:37 ` Neon Absentius
  2005-04-15 14:49 ` EScott
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Neon Absentius @ 2005-04-15 14:37 UTC (permalink / raw)


On Fri, Apr 15, 2005 at 04:04:55PM +0200, Uwe Mayer wrote:
> Hi,
> 
> how do you change the way emacs selects regions of text? Currently it works
> line based, but I need to select a rectangular region from within a text.
> Can anyone help me with how to change the selection mode?

Technically speaking, Emacs doesn't really select a region, it just
remembers two positions, point and mark, on the buffer. There are
commands that operate on the whole region between point and mark, such
as the usual kill, yank etc, but also there are command that operate
on the rectangle defined by the point and mark. Such commands usually
start with C-r, for example
                                                                                                                                              
 C-r C-k  kill rectangle
 C-r C-y  yank rectangle
                                                                                                                                               
Have a look at the info page:
  
(info "(emacs)Rectangles") <--- hit C-x C-e here. 

> 
> Thanks
> Uwe     
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

-- 
Charity in capitalism is like urinating to extinguish a forest fire.
    -- Neon Absentius
absent a.in.cirle sdf period lonestar period org
SDF Public Access UNIX System - http://sdf.lonestar.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: block based selection
  2005-04-15 14:04 block based selection Uwe Mayer
  2005-04-15 14:16 ` Albert Reiner
  2005-04-15 14:37 ` Neon Absentius
@ 2005-04-15 14:49 ` EScott
       [not found] ` <mailman.1646.1113577345.2895.help-gnu-emacs@gnu.org>
  2005-04-29  2:07 ` Alan Wehmann
  4 siblings, 0 replies; 7+ messages in thread
From: EScott @ 2005-04-15 14:49 UTC (permalink / raw)
  Cc: help-gnu-emacs, help-gnu-emacs-bounces+escott=nyiso.com


[-- Attachment #1.1: Type: text/plain, Size: 750 bytes --]

help-gnu-emacs-bounces+escott=nyiso.com@gnu.org wrote on 04/15/2005 
10:04:55 AM:

> Hi,
> 
> how do you change the way emacs selects regions of text? Currently it 
works
> line based, but I need to select a rectangular region from within a 
text.
> Can anyone help me with how to change the selection mode?
> 
> Thanks
> Uwe 

What you are looking for is rectangle editing. 

Define a rectangle in the usual way (mark upper left corner, then move to 
bottom right plus one).

Then use the commands
kill-rectangle
delete-rectangle
yank-rectangle
clear-rectangle
open-rectangle

HTH

EricS

> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

[-- Attachment #1.2: Type: text/html, Size: 1275 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: block based selection
       [not found] ` <mailman.1646.1113577345.2895.help-gnu-emacs@gnu.org>
@ 2005-04-18  0:41   ` Quokka
  2005-04-19 15:25   ` Mathias Dahl
  1 sibling, 0 replies; 7+ messages in thread
From: Quokka @ 2005-04-18  0:41 UTC (permalink / raw)


Neon Absentius wrote:
> On Fri, Apr 15, 2005 at 04:04:55PM +0200, Uwe Mayer wrote:
> 
>>Hi,
>>
>>how do you change the way emacs selects regions of text? Currently it works
>>line based, but I need to select a rectangular region from within a text.
>>Can anyone help me with how to change the selection mode?
> 

If you use cua mode it has a rectange editing mode.

In cvs emacs this is in cua-rect.el.

I find it easier to use than the "standard" rectange functions.

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: block based selection
       [not found] ` <mailman.1646.1113577345.2895.help-gnu-emacs@gnu.org>
  2005-04-18  0:41   ` Quokka
@ 2005-04-19 15:25   ` Mathias Dahl
  1 sibling, 0 replies; 7+ messages in thread
From: Mathias Dahl @ 2005-04-19 15:25 UTC (permalink / raw)


Neon Absentius <absent@sdf.lonestar.org> writes:

>
> Technically speaking, Emacs doesn't really select a region, it just
> remembers two positions, point and mark, on the buffer. There are
> commands that operate on the whole region between point and mark, such
> as the usual kill, yank etc, but also there are command that operate
> on the rectangle defined by the point and mark. Such commands usually
> start with C-r, for example
>                                                                                                                                               
>  C-r C-k  kill rectangle
>  C-r C-y  yank rectangle

They start with C-x r, not C-r

/Mathias

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: block based selection
  2005-04-15 14:04 block based selection Uwe Mayer
                   ` (3 preceding siblings ...)
       [not found] ` <mailman.1646.1113577345.2895.help-gnu-emacs@gnu.org>
@ 2005-04-29  2:07 ` Alan Wehmann
  4 siblings, 0 replies; 7+ messages in thread
From: Alan Wehmann @ 2005-04-29  2:07 UTC (permalink / raw)


I'm surprised that noone has yet suggested that you investigate the
rectangle functions.  For example:

C-x r r runs `copy-rectangle-to-register'

`copy-rectangle-to-register' is an interactive compiled Lisp function
  -- loaded from "/opt/build/xemacs-21.4.15/lisp/register.elc"
(copy-rectangle-to-register REGISTER START END &optional DELETE-FLAG)

Documentation:
Copy rectangular region into register REGISTER.
With prefix arg, delete as well.
Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
START and END are buffer positions giving two corners of rectangle.

I happen to be using XEmacs, but these functions are common to XEmacs
and Emacs.

Others are documented in the Info files, for example.

Uwe Mayer <merkosh@hadiko.de> writes:

> Hi,
>
> how do you change the way emacs selects regions of text? Currently it works
> line based, but I need to select a rectangular region from within a text.
> Can anyone help me with how to change the selection mode?
>
> Thanks
> Uwe     

-- 
Alan Wehmann
wehmann(nospam)@fnal.gov

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-04-29  2:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-15 14:04 block based selection Uwe Mayer
2005-04-15 14:16 ` Albert Reiner
2005-04-15 14:37 ` Neon Absentius
2005-04-15 14:49 ` EScott
     [not found] ` <mailman.1646.1113577345.2895.help-gnu-emacs@gnu.org>
2005-04-18  0:41   ` Quokka
2005-04-19 15:25   ` Mathias Dahl
2005-04-29  2:07 ` Alan Wehmann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.