unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Boruch Baum <boruch_baum@gmx.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: 30085@debbugs.gnu.org, Kim Storm <storm@cua.dk>
Subject: bug#30085: 25.2: Documentation for cua-rectangle-mark-mode
Date: Wed, 28 Oct 2020 02:40:35 -0400	[thread overview]
Message-ID: <20201028064035.anyar4nzv2qv4vce@E15-2016.optimum.net> (raw)
In-Reply-To: <CADwFkmm3Yd3eoXV+QUHirtUmNdKHw106D=fusr-E5DcEU2Y20Q@mail.gmail.com>

Wow. This is what? Two years old? My vague memory was that this mode
seemed very feature-rich and desirable but slightly overlapping the more
common rectangle editing functions. When the thread went dead due to
lack of response, I stopped investigating and using it.

The desirable and unique feature that most stands out in my memory was
the mode's ability toggle POINT amongst the four corners of a selected
rectangle in order to resize it in any possible direction.

I remember the mode had other cool features, but don't remember what
they were. One of the deficiencies that I had wanted to address was the
mode's lack of documentation, but with the discouraging (lack of)
feedback, I just moved on.

Following is some feedback:

On 2020-10-26 18:50, Stefan Kangas wrote:
> Boruch Baum <boruch_baum@gmx.com> writes:
>
> > 3. I noticed that `M-m' was bound to `cua-copy-rectangle-as-text'
> >    instead of `back-to-indentation', so I took the liberty of writing a
> >    function `cua-resize-rectangle-back-to-indentation' and binding it to
> >    `M-m', which is what most users would expect. If this approved, to
> >    what should be bound `cua-copy-rectangle-as-text'
> >
> > 4. Function `cua-resize-rectangle-bot' had a bug in that it always
> >    placed point at the actual (point-max) even though the rectangle
> >    corner would not be there. This would occur when (point-max) was at a
> >    column number smaller than the left edge of the rectangle. The patch
> >    file includes the fix.
> >
> > 5. Two commonly used navigation functions, normally bound to `C-a' and
> >    `C-e' were not remapped. (DONE)
>
> Could you please provide instructions for how to test the above parts?
> I don't use this mode and it's not clear to me what to do.

I don't remember how to use the mode and its features (as I mentioned
above, it's been two years of non-response), but I see that the
notes.txt file that I included along with the patch that there are some
tips.

I *DO* remember that the remapped functions were to apply operations on
the selected rectangle instead of upon the buffer. What I mean is that
C-a would go the beginning of the line with the selected rectangle
instead of the buffer's beginning of line. And likewise for C-e, M-m.

You would need anyway to learn the basics of using the mode before
patching it. Once you've figured that out, try C-a, C-e, M-m before and
after the patch.

Again, some tips are in the notes.txt file accompanying the patch.

>  Also, could you perhaps split the patch up and make it clear which
> parts of your code belong to which of the above points?

Nope. At least not anytime reasonably soon. I have a full plate of other
FOSS stuff in my inbox just now and other life 'stuff'.

> Ideally, if possible, you would also add ChangeLog entries as per
> etc/CONTRIBUTE.
>
> > 6. The help message is remapped from `C-?' to `M-?' for the sanity of
> >    people like me who use emacs-nox and can only perform a `C-?' by
> >    typing `C-x @ c ?'.
>
> I don't understand which part of your patch this refers to, or how to
> test it.  Could you please clarify?

That's easy. It's a single line in the patch...

--8<--cut here-(start)------------------------------------------- >8
+  (define-key cua--rectangle-keymap (kbd "M-?") 'cua-help-for-rectangle)
--8<--cut here-(end)--------------------------------------------- >8

> > 7. The current keybindings are made using an old method of keystroke
> >    definition that I find a bit scary. Is it OK / desirable to change
> >    the method uniformly to use `kbd'?
>
> I have no strong opinion on this, but it seems relatively minor.  Perhaps
> it's not worth the code churn.

> > First slow steps.
>
> I've attached a diff with the parts of your patch that I didn't yet push
> to master.
>
> Thanks.

Thank you.

Word of caution: In the bigger picture, there ought to be a consensus on
whether to have two parallel packages that perform basically the same
functions in two different ways with two different code-bases. IMO, only
one should exist in emacs-core, and if that package can't incorporate
the unique features of the other by merging code, the other package
should be spun-off to ELPA/MELPA with a note that it has become
abandon-ware but retains value. In that spirit, I remember that
cua-rectangle mode was clearly *better*, but the development team might
shrink from foisting something different on users. In any case, without
clear documentation on how to even use the mode, I don't see a chance
for the development team to adopt it that way.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





  reply	other threads:[~2020-10-28  6:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12  7:14 bug#30085: 25.2: Documentation for cua-rectangle-mark-mode Boruch Baum
2018-01-12  9:22 ` Eli Zaretskii
2018-01-12 11:00   ` Kim Storm
2018-01-12 18:53     ` Eli Zaretskii
2018-01-26 18:57       ` Boruch Baum
2018-03-21 12:48       ` Boruch Baum
2020-10-27  1:50         ` Stefan Kangas
2020-10-28  6:40           ` Boruch Baum [this message]
2020-12-16  7:43           ` Boruch Baum
2018-01-12 11:06   ` Kim Storm
2019-10-19  1:21 ` Stefan Kangas
2019-10-19  6:39   ` Eli Zaretskii
2020-10-27  1:39     ` Stefan Kangas
2019-10-23 10:56   ` Boruch Baum
2019-10-23 11:10     ` Stefan Kangas
2019-10-28 10:41       ` Lars Ingebrigtsen
2019-10-28 16:11         ` Eli Zaretskii

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=20201028064035.anyar4nzv2qv4vce@E15-2016.optimum.net \
    --to=boruch_baum@gmx.com \
    --cc=30085@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    --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).