[Top][All Lists]

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

Re: Bug in `open-rectangle'?

From: Mathias Dahl
Subject: Re: Bug in `open-rectangle'?
Date: Fri, 22 Jul 2005 13:29:14 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt)

Mathias Dahl <address@hidden> writes:

> address@hidden (Kim F. Storm) writes:
>>> The text is "moved" as it should but cursor is also moved to where you
>>> set the mark.
>> This is how open-rectangle works...  
>> It positions point in the opened rectangle.
>>> What I do not like is that I cannot get back to where I was, neither
>>> using `exchange-point-and-mark' (C-x C-x), nor using C-u C-SPC
>>> (`set-mark-command' with prefix argument).
>>> Is this a bug?
>> I don't think so.
> Maybe it could be a request then, to set mark before point is moved,
> so that I can get back to where I was?

(let me comment my own comment)

We shpuld at least document it. The documentation for `open-rectangle'
says nothing about where point ends up:

   open-rectangle is an interactive compiled Lisp function in `rect'.
   It is bound to C-x r o.  (open-rectangle start end &optional fill)

   Blank out the region-rectangle, shifting text right.

   The text previously in the region is not overwritten by the blanks,
   but instead winds up to the right of the rectangle.

   When called from a program the rectangle's corners are start and
   end.  With a prefix (or a fill) argument, fill with blanks even if
   there is no text on the right side of the rectangle.

even though in the code this is very visible:

   (goto-char start)

The info page says the following:

  `C-x r o'

       Insert blank space to fill the space of the region-rectangle
       (`open-rectangle').  This pushes the previous contents of the
       region-rectangle rightward.

I would prefer if open-rectangle set a mark as it seems like a Bad
Thing (TM) to move the point without telling the user or saving the
old position.

I will shut up about this now. :)


reply via email to

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