all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: npostavs@users.sourceforge.net
Cc: 25777@debbugs.gnu.org
Subject: bug#25777: 25.1; [PATCH] `rectangle--pos-cols' should not move point
Date: Mon, 27 Feb 2017 09:51:30 -0800 (PST)	[thread overview]
Message-ID: <c3db215c-16cd-4100-9635-4982937d839b@default> (raw)
In-Reply-To: <877f4beok7.fsf@users.sourceforge.net>

> > I checked the code of `rectangle--pos-cols' and saw that
> > it now does `goto-char' (and it did not do so before
> > Emacs 25.1).
> 
> I'm confused as to what you mean by this, since `rectangle--pos-cols'
> did not exist before 25.1.

Sorry, my bad about that expression.  I meant to say that
_there is no such problem in Emacs 24.5_.  In Emacs 24.5,
following the recipe DTRT: the C-p moves point up one line.
Emacs 24.5, like 25.1, has rectangle support.

Nothing changes in that regard for my code: I take advantage
of exactly the same functionality offered by rect.el as before.
What has changed is how rect.el obtains and returns the columns
delimiting the current region rectangle.  I changed my code
accordingly.

Perhaps I'm not being sufficiently clear about this regression.

I think it's great that a function such as `rectangle--pos-cols'
was added.  (But it has no business being considered "internal".)

Just as, for Emacs 24.5, I reused some code from rect.el to
do what I need to get the rectangle columns, so I reused
the corresponding code from Emacs 25.

Look at function `apply-on-rectangle'.  In Emacs 25 it calls
`rectangle--pos-cols' to get the rectangle columns - and so
do I.  In Emacs 24.5 it also does just what I do (I stole
the code) to obtain those columns.

Do you really think that a function whose only purpose is
to let you know what the rectangle columns are should move
point and leave it in a position that is not one of the
rectangle corners?

If so, then you will say that all callers of this function
should wrap with `save-excursion' if they don't want point
moved.  I think that's the job of a function whose only
purpose is to return those columns.





  reply	other threads:[~2017-02-27 17:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-17 17:51 bug#25777: 25.1; [PATCH] `rectangle--pos-cols' should not move point Drew Adams
2017-02-19 17:38 ` Drew Adams
2017-02-27  1:37   ` npostavs
2017-02-27  6:24     ` Drew Adams
2017-02-27 13:44       ` npostavs
2017-02-27 17:51         ` Drew Adams [this message]
2017-02-27 18:50           ` Noam Postavsky
2017-02-27 19:21             ` Drew Adams
2017-02-27 19:47               ` Noam Postavsky
2017-02-27 20:35                 ` Drew Adams
2017-02-28  4:57           ` npostavs
2017-02-28 15:11             ` Drew Adams
2017-03-02  1:21               ` npostavs
2017-03-02  2:32                 ` Drew Adams
2017-03-02 18:13                   ` Drew Adams
2017-03-03  2:09                     ` npostavs
2017-03-03  6:29                       ` Drew Adams
2017-03-03 13:28                         ` npostavs
2017-03-03 16:44                           ` Drew Adams
2017-03-03 18:16                             ` Noam Postavsky
2017-03-03 19:17                               ` Drew Adams
2019-06-24 17:10             ` Lars Ingebrigtsen

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=c3db215c-16cd-4100-9635-4982937d839b@default \
    --to=drew.adams@oracle.com \
    --cc=25777@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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.