all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: paal.drange@gmail.com, 20070@debbugs.gnu.org
Subject: bug#20070: 24.3; have commands such as downcase-region act on a rectangle region
Date: Mon, 16 Mar 2015 22:55:36 +0200	[thread overview]
Message-ID: <87sid4r7av.fsf@mail.linkov.net> (raw)
In-Reply-To: <83h9tm0z8s.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 15 Mar 2015 22:41:55 +0200")

> What are BEG1, END1, BEG2, END2, etc. values here?

They should have the same type as the return values of
region-beginning/region-end and the interactive space "r"
which are of the marker type.  So the patch in bug#19829 should be
improved by another patch (both will be installed after finishing
designing this feature):

diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 044939f..a314d33 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -676,9 +676,9 @@ (defun cua--extract-rectangle-positions ()
         (lambda (s e l r _v)
            (goto-char s)
            (move-to-column l)
-           (setq s (point))
+           (setq s (point-marker))
            (move-to-column r)
-           (setq e (point))
+           (setq e (point-marker))
            (setq rect (cons (cons s e) rect)))))
     (nreverse rect)))
 
diff --git a/lisp/rect.el b/lisp/rect.el
index 271f720..7a2c5a3 100644
--- a/lisp/rect.el
+++ b/lisp/rect.el
@@ -265,7 +265,8 @@ (defun extract-rectangle-positions (start end)
     (apply-on-rectangle
      (lambda (startcol endcol)
        (move-to-column startcol)
-       (push (cons (prog1 (point) (move-to-column endcol)) (point))
+       (push (cons (prog1 (point-marker) (move-to-column endcol))
+		   (point-marker))
 	     positions))
      start end)
     (nreverse positions)))





  parent reply	other threads:[~2015-03-16 20:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10  1:06 bug#20070: 24.3; have commands such as downcase-region act on a rectangle region Pål Grønås Drange
2015-03-11 20:28 ` Stefan Monnier
2015-03-12 19:23   ` Juri Linkov
2015-03-14 16:31     ` Stefan Monnier
2015-03-15 20:34       ` Juri Linkov
2015-03-15 20:41         ` Eli Zaretskii
2015-03-16 11:49           ` Nicolas Richard
2015-03-16 13:14           ` Stefan Monnier
2015-03-16 20:55           ` Juri Linkov [this message]
2015-03-16 22:07             ` Stefan Monnier
2015-03-16 13:19         ` Stefan Monnier
2015-03-16 20:58           ` Juri Linkov
2015-03-16 22:08             ` Stefan Monnier
2015-03-17 19:38               ` Juri Linkov
2015-03-25  0:37                 ` Stefan Monnier
2015-03-25 21:42                   ` Juri Linkov
2015-03-17  7:10             ` Eli Zaretskii
2015-06-30 20:44   ` Juri Linkov

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

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

  git send-email \
    --in-reply-to=87sid4r7av.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=20070@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=paal.drange@gmail.com \
    /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 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.