GNU bug report logs - #19829
25.0.50; query-replace in rectangle regions do not honor boundaries

Previous Next

Package: emacs;

Reported by: Bastien <bzg <at> gnu.org>

Date: Tue, 10 Feb 2015 15:00:02 UTC

Severity: normal

Merged with 20070, 20626

Found in versions 24.3, 25.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 19829 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: Bastien <bzg <at> gnu.org>, 19829 <at> debbugs.gnu.org
Subject: Re: bug#19829: 25.0.50;
 query-replace in rectangle regions do not honor boundaries
Date: Wed, 18 Feb 2015 17:56:21 -0500
> +  (lambda (delete &optional positions)

No: additional *value*, not additional *argument*.

> +  (let (start end)
> +    (move-to-column startcol)
> +    (setq start (point))
> +    (move-to-column endcol)
> +    (setq end (point))
> +    (setcdr positions (cons (cons start end) (cdr positions)))))

Aka
     (move-to-column startcol)
     (let ((start (point)))
       (move-to-column endcol)
       (push (cons start (point)) (cdr positions)))

> +    (apply-on-rectangle 'extract-rectangle-position
                          ^^^
                          #'

You could also inline this function so as to avoid the dummy (list
nil) cell.

> +         ;; Use local binding in add-function below.
> +         (isearch-filter-predicate isearch-filter-predicate)
> +         (rectangular-region-positions nil)

replace.el should not know about rectangles and shouldn't check
rectangle-mark-mode.  It should simply always call
region-extract-function to get the various elements that make up the
"region".


        Stefan




This bug report was last modified 9 years and 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.