unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: storm@cua.dk (Kim F. Storm)
Cc: Chong Yidong <cyd@stupidchicken.com>, emacs-devel@gnu.org
Subject: Re: position on changing defaults?
Date: Sat, 08 Mar 2008 21:32:35 -0500	[thread overview]
Message-ID: <jwvod9ozly7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87iqzw3hyd.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Sun, 09 Mar 2008 00:38:02 +0100")

>>>> should be allowed to have 0-width).  
>>> Why?
>> Because that's how the region behaves and that's how Emacs rectangles
>> behave, so it's more consistent.

> Visually, this is much more pleasing than having the cursor
> sometimes inside, sometimes outside the rectangle.

Doesn't strike me as something particularly important.

> Also, with CUA-rectangles, the cursor can be at any of the four
> corners of the rectangle.  So having zero size rectangle breaks
> this - which is the main reason I didn't insist on having them.

I don't understand how that's different whether zero-width rectangles
are allowed.

> Finally, CUA-rectangles are not limited by arbitrary line endings;

Again, I don't see how that relates to whether or not zero-width
rectangles are allowed.

> you can expand a rectangle beyond the end of the current line.

Yes, I understand the problems posed by TABs and end of lines when faced
with rectangles, and yes I think the way CUA handles it is perfectly fine.

> So *I* don't want rectangles to work just like the region - I want the
> rectangles to work better than that - also in the presense of tabs in
> the middle of lines!

I meant conceptually.  To the user they should mostly behave "just like
a non-rectangular region".  But of course, there are some
necessary differences.

> I'm _definitely_ in favor of modifying basic commands to behave
> correctly/sensibly if "rectangle-active-p".

I think we all agree on this.

> BTW, shouldn't a command like upcase-region be merged into upcase-word
> so that marking the region (transient-mark-mode active) so that M-u will
> upcase the region instead of the word following the region...

Sounds like a good idea to me.

>>> The self-insert-char feature inserts OUTSIDE the rectangle, so
>>> I don' see how it compares to C-x r t?
>> If the rectangle has 0-width, C-x r t also inserts "outside".
> Ok, but you don't an iota of visible clue as to where the rectangle is.

Now, that is a very good point.  Supporting highlighting of zero-width
rectangles would probably require special-cased code.  E.g. we could add
a vertical line with overlay after-strings, tho that would tend to shift
the rest of the text.  Experimentation would be needed.

> And transient-mark-mode is damn ugly as an indicator for standard 
> rectangles.

Yes, I live with it, but there's no doubt that it's not a feature.

>>> E.g. to put ( ) around all lines of a rectangle, just mark
>>> the rectangle (top-down), and enter ) RET ( .  Can you do that
>>> faster with C-x r t ?
>> No.  But then, I never put (...) around all lines of a rectangle.
> I don't do that often either, but take it as an illustration of the
> principle of inserting on the "active" side of the rectangle.
> And moving the active corner with RET.

Yes, I understand, but I'm not convinced it deserves so
much importance.  These are operations that might better be served by
packages like picture-mode.

>>> BTW, M-s is equivalent to C-x r t (I believe).
>> Except that it applies to one more column, so it can't be used as a form
>> of insert-rectangle, contrary to C-x r t.
>> ... but restricting it to self-insert-char is problematic.
> Just use M-o M-s for that ...  It's still shorter than C-x r t :-)

The problem is not just a question of number of key presses.
C-x r t is good because with a single command I get to do most of the
operations I usually need to do: insert-rectangle (when the rectangle
is empty), delete-rectangle (when the inserted string is empty), and of
course replacement of each line of the rectangle with a given string.

Now I understand that C-x r t works fine with CUA rectangles, but I'm
just not sure that having "active-rectangle" be a minor mode with
special bindings is the way I want to go.


        Stefan




  parent reply	other threads:[~2008-03-09  2:32 UTC|newest]

Thread overview: 256+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05  6:37 position on changing defaults? Dan Nicolaescu
2008-03-05  7:02 ` Miles Bader
2008-03-05 13:33   ` Miles Bader
2008-03-05 14:54     ` Juanma Barranquero
2008-03-05 15:44     ` Drew Adams
2008-03-05 19:25       ` Stefan Monnier
2008-03-05 19:38         ` Drew Adams
2008-03-05 21:55       ` Miles Bader
2008-03-05 15:34   ` Drew Adams
2008-03-05  9:55 ` David Kastrup
2008-03-07  3:37   ` Richard Stallman
2008-03-05 15:02 ` Bastien
2008-03-05 19:45 ` Stefan Monnier
2008-03-05 22:30   ` Dan Nicolaescu
2008-03-05 23:15     ` Miles Bader
2008-03-06  3:49       ` Dan Nicolaescu
2008-03-06  4:10         ` Miles Bader
2008-03-06  4:30           ` Dan Nicolaescu
2008-03-07  3:35           ` Richard Stallman
2008-03-07  3:38       ` Richard Stallman
2008-03-05 23:28     ` Juri Linkov
2008-03-06  3:58       ` Dan Nicolaescu
2008-03-06 10:07         ` Juri Linkov
2008-03-06 11:37           ` René Kyllingstad
2008-03-06 16:20         ` Stefan Monnier
2008-03-06 19:11           ` Dan Nicolaescu
2008-03-06 21:13             ` Stefan Monnier
2008-03-09  1:00           ` Xavier Maillard
2008-03-06 16:14       ` Stefan Monnier
2008-03-06 17:52         ` Juri Linkov
2008-03-06 18:25           ` Stefan Monnier
2008-03-07  0:35             ` Juri Linkov
2008-03-07  3:38       ` Richard Stallman
2008-03-09  1:00         ` Xavier Maillard
2008-03-09  1:46         ` Dan Nicolaescu
2008-03-09 16:40           ` Richard Stallman
2008-03-06 16:13     ` Stefan Monnier
2008-03-06 16:37       ` Drew Adams
2008-03-06 17:09         ` Dan Nicolaescu
2008-03-06 17:35           ` Drew Adams
2008-03-06 20:38             ` Alan Mackenzie
2008-03-06 20:40               ` Drew Adams
2008-03-06 21:33                 ` Alan Mackenzie
2008-03-06 21:36                   ` Drew Adams
2008-03-09  1:00         ` Xavier Maillard
2008-03-06 18:10       ` Johan Bockgård
2008-03-06 19:44         ` Mathias Dahl
2008-03-07  0:43           ` Juri Linkov
2008-03-09  1:00       ` Xavier Maillard
2008-03-07  3:38     ` Richard Stallman
2008-03-07  3:48       ` Miles Bader
2008-03-07  4:07       ` Dan Nicolaescu
2008-03-08 17:40         ` Richard Stallman
2008-03-08 18:08           ` Gregory Collins
2008-03-09  0:27             ` Miles Bader
2008-03-09  0:36               ` Dan Nicolaescu
2008-03-09  0:43                 ` Miles Bader
2008-03-09  1:10                   ` Dan Nicolaescu
2008-03-09 23:08                   ` Mathias Dahl
2008-03-11  1:00                     ` Xavier Maillard
2008-03-11  6:06                       ` Drew Adams
2008-03-09 21:51                 ` Juri Linkov
2008-03-09 22:34                   ` Drew Adams
2008-03-10  0:29                     ` Juri Linkov
2008-03-10  0:57                       ` Drew Adams
2008-03-11  1:00                 ` Xavier Maillard
2008-03-11  1:00               ` Xavier Maillard
2008-03-09 20:53             ` Richard Stallman
2008-03-08 18:15           ` Dan Nicolaescu
2008-03-08 21:09           ` Juri Linkov
2008-03-09 16:39             ` Richard Stallman
2008-03-09 17:55               ` Juri Linkov
2008-03-09 22:24                 ` Stefan Monnier
2008-03-10  0:30                   ` Juri Linkov
2008-03-10 22:29               ` Juri Linkov
2008-03-08 19:11         ` Andreas Schwab
2008-03-08 19:26           ` Dan Nicolaescu
2008-03-08 19:54             ` Andreas Schwab
2008-03-08 20:03               ` Dan Nicolaescu
2008-03-08 20:28                 ` Andreas Schwab
2008-03-08 23:41                   ` Kim F. Storm
2008-03-09  0:04                     ` Andreas Schwab
2008-03-09  0:18                       ` Stephen Eglen
2008-03-11  1:00                         ` Xavier Maillard
2008-03-11 10:44                           ` Kim F. Storm
2008-03-11 12:22                             ` Tassilo Horn
2008-03-11 14:39                               ` ido-mode (was Re: position on changing defaults?) Kim F. Storm
2008-03-11 16:14                                 ` ido-mode Tassilo Horn
2008-03-09  0:27                       ` position on changing defaults? Dan Nicolaescu
2008-03-09  0:36                         ` Miles Bader
2008-03-09  9:51                         ` David Kastrup
2008-03-09 16:40                         ` Richard Stallman
2008-03-11  1:00                         ` Xavier Maillard
2008-03-09  1:00         ` Xavier Maillard
2008-03-07 12:21       ` paul r
2008-03-11  1:00         ` Xavier Maillard
2008-03-07  3:38   ` Richard Stallman
2008-03-05 20:43 ` Chong Yidong
2008-03-05 23:30   ` Juri Linkov
2008-03-05 23:45     ` Bastien
2008-03-05 23:54       ` Juri Linkov
2008-03-06  0:00         ` Lennart Borgman (gmail)
2008-03-06  0:10         ` Bastien
2008-03-07  3:38       ` Richard Stallman
2008-03-05 23:46     ` Miles Bader
2008-03-06  0:21       ` Juri Linkov
2008-03-06 10:58       ` Kim F. Storm
2008-03-07 23:14         ` Richard Stallman
2008-03-07 23:27           ` Miles Bader
2008-03-08  0:40             ` Lennart Borgman (gmail)
2008-03-09  2:18               ` Richard Stallman
2008-03-08  1:24             ` deactivation in "shift-select" mode Miles Bader
2008-03-08  2:22               ` Chong Yidong
2008-03-08  3:11                 ` Miles Bader
2008-03-08  3:27                   ` Miles Bader
2008-03-08 17:26               ` Kim F. Storm
2008-03-09 20:53             ` position on changing defaults? Richard Stallman
2008-03-09 21:58               ` Miles Bader
2008-03-09 22:34               ` Shift-movement selection (was: position on changing defaults?) Stefan Monnier
2008-03-09 23:00                 ` Shift-movement selection Miles Bader
2008-03-09 23:57                   ` Kim F. Storm
2008-03-10  0:06                     ` Miles Bader
2008-03-10 16:26                       ` Stefan Monnier
2008-03-10 16:25                     ` Stefan Monnier
2008-03-10  3:37                   ` Stefan Monnier
2008-03-10  4:11                     ` Miles Bader
2008-03-10 14:38                       ` Stefan Monnier
2008-03-10 15:06                         ` Kim F. Storm
2008-03-10 16:23                           ` Stefan Monnier
2008-03-10 16:40                             ` Lennart Borgman (gmail)
2008-03-11  9:25                               ` Richard Stallman
2008-03-11 18:40                                 ` Stefan Monnier
2008-03-12  0:19                                   ` Richard Stallman
2008-03-12 10:06                                     ` Kim F. Storm
2008-03-12 17:51                                       ` Richard Stallman
2008-03-12 22:06                                         ` Kim F. Storm
2008-03-12 23:59                                           ` Thomas Lord
2008-03-13  0:07                                             ` Thomas Lord
2008-03-13  8:28                                               ` tomas
2008-03-11 22:42                           ` Alan Mackenzie
2008-03-11 22:38                             ` Lennart Borgman (gmail)
2008-03-11 23:31                               ` David Kastrup
2008-03-11 23:46                                 ` Lennart Borgman (gmail)
2008-03-12  1:35                                   ` Stefan Monnier
2008-03-12 15:11                                 ` Richard Stallman
2008-03-12 15:11                             ` Richard Stallman
2008-03-12 15:54                               ` Kim F. Storm
2008-03-12 17:39                                 ` Thomas Lord
2008-03-12 20:03                                   ` Richard Stallman
2008-03-12 22:00                                     ` Thomas Lord
2008-03-13  1:06                                       ` Richard Stallman
2008-03-13  2:00                                         ` Thomas Lord
2008-03-10 22:32                         ` Miles Bader
2008-03-11 18:38                           ` Stefan Monnier
2008-03-11  9:24                         ` Richard Stallman
2008-03-10 17:16                     ` Richard Stallman
2008-03-10 18:40                       ` Stefan Monnier
2008-03-11 20:25                         ` Richard Stallman
2008-03-11 20:41                           ` Lennart Borgman (gmail)
2008-03-12 15:11                             ` Richard Stallman
2008-03-11 22:33                     ` Alan Mackenzie
2008-03-06 16:46       ` position on changing defaults? Stefan Monnier
2008-03-07  2:08         ` Miles Bader
2008-03-08  6:28           ` Richard Stallman
2008-03-08 17:40         ` Richard Stallman
2008-03-08 19:08           ` Kim F. Storm
2008-03-08 18:07         ` Kim F. Storm
2008-03-08 20:09           ` Stefan Monnier
2008-03-09 16:40             ` Richard Stallman
2008-03-09 22:22               ` Stefan Monnier
2008-03-09 22:56               ` Kim F. Storm
2008-03-09 23:17                 ` Lennart Borgman (gmail)
2008-03-11  9:25                 ` Richard Stallman
2008-03-11 10:24                   ` Kim F. Storm
2008-03-11 16:02                     ` Lennart Borgman (gmail)
2008-03-09 20:53           ` Richard Stallman
2008-03-07  3:38     ` Richard Stallman
2008-03-05 23:52   ` Kim F. Storm
2008-03-06  0:34     ` Miles Bader
2008-03-06  1:00     ` Lennart Borgman (gmail)
2008-03-06  1:18       ` Bastien
2008-03-06 17:07     ` Stefan Monnier
2008-03-08 17:40       ` Richard Stallman
2008-03-08 19:12         ` Kim F. Storm
2008-03-09 16:40           ` Richard Stallman
2008-03-09 22:35             ` Kim F. Storm
2008-03-09 23:11               ` CUA mode's C-RET binding [was: position on changing defaults?] Drew Adams
2008-03-09 23:36                 ` Kim F. Storm
2008-03-09 23:46                   ` CUA mode's C-RET binding Miles Bader
2008-03-09 23:50                   ` CUA mode's C-RET binding [was: position on changing defaults?] Lennart Borgman (gmail)
2008-03-10  0:00                     ` CUA mode's C-RET binding Miles Bader
2008-03-10  0:18                       ` Lennart Borgman (gmail)
2008-03-10  0:02                   ` CUA mode's C-RET binding [was: position on changing defaults?] Drew Adams
2008-03-10 10:13                     ` Mathias Dahl
2008-03-10 13:47                       ` Lennart Borgman (gmail)
2008-03-10 14:32                         ` Johan Bockgård
2008-03-10 14:53                           ` Lennart Borgman (gmail)
2008-03-11  0:07                             ` Juri Linkov
2008-03-11 20:25                               ` Richard Stallman
2008-03-11 20:50                                 ` CUA mode's C-RET binding Manoj Srivastava
2008-03-12  0:37                                   ` Juri Linkov
2008-03-12 15:12                                   ` Richard Stallman
2008-03-12 17:30                                     ` Manoj Srivastava
2008-03-12 20:21                                       ` Dangerous shell commands? (was: CUA mode's C-RET binding) Reiner Steib
2008-03-12 21:23                                         ` Dangerous shell commands? David Kastrup
2008-03-13  0:14                                         ` Manoj Srivastava
2008-03-11 14:44                         ` CUA mode's C-RET binding [was: position on changing defaults?] Mathias Dahl
2008-03-11 15:09                           ` Drew Adams
2008-03-13 11:20                             ` Mathias Dahl
2008-03-13 17:26                               ` Drew Adams
2008-03-11  9:25               ` position on changing defaults? Richard Stallman
2008-03-08 19:25       ` Kim F. Storm
2008-03-08 20:38         ` Stefan Monnier
2008-03-08 23:38           ` Kim F. Storm
2008-03-08 23:51             ` Miles Bader
2008-03-09  2:32             ` Stefan Monnier [this message]
2008-03-09 16:39             ` Richard Stallman
2008-03-10 16:11             ` Chong Yidong
2008-03-11 10:28               ` Kim F. Storm
2008-03-08 20:56       ` Kim F. Storm
2008-03-09  8:38         ` Making the command loop mode-dependent [was: position on changing defaults?] Alan Mackenzie
2008-03-07  3:38     ` position on changing defaults? Richard Stallman
2008-03-07 10:50       ` Kim F. Storm
2008-03-09  2:18         ` Richard Stallman
2008-03-09  2:40           ` Miles Bader
2008-03-09 22:06             ` Kim F. Storm
2008-03-09 22:13               ` Miles Bader
2008-03-09 22:15               ` Stefan Monnier
2008-03-09 23:44                 ` Kim F. Storm
2008-03-09 23:57                   ` Miles Bader
2008-03-10  1:00                   ` Johan Bockgård
2008-03-10 17:16                   ` Richard Stallman
2008-03-11 10:35                     ` Kim F. Storm
2008-03-11 18:31                       ` Stefan Monnier
2008-03-12  0:19                         ` Richard Stallman
2008-03-12  9:56                         ` Kim F. Storm
2008-03-12 14:03                           ` Stefan Monnier
2008-03-12 23:56                             ` Lennart Borgman (gmail)
2008-03-13  1:52                               ` Stefan Monnier
2008-03-13  2:01                                 ` Lennart Borgman (gmail)
2008-03-13  2:31                                   ` Stefan Monnier
2008-03-13 16:57                                     ` Lennart Borgman (gmail)
2008-03-14  2:55                                       ` Richard Stallman
2008-03-14  9:51                                         ` David Kastrup
2008-03-13  7:45                                 ` David Kastrup
2008-03-13 12:45                                   ` Kim F. Storm
2008-03-13 13:28                                     ` David Kastrup
2008-03-13 20:39                                       ` Stephen J. Turnbull
2008-03-13 21:55                                         ` David Kastrup
2008-03-13 23:56                                           ` Stephen J. Turnbull
2008-03-13 22:24                               ` Richard Stallman
2008-03-13 22:47                                 ` Kim F. Storm
2008-03-13 22:49                                   ` David Kastrup
2008-03-14 16:44                                   ` Richard Stallman
2008-03-13 23:30                                 ` Lennart Borgman (gmail)
2008-03-13 15:41                             ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvod9ozly7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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).