unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Enhancement request for fill-region
@ 2003-01-27 16:35 Dale R Worley
  0 siblings, 0 replies; 4+ messages in thread
From: Dale R Worley @ 2003-01-27 16:35 UTC (permalink / raw)


Emacs version: 21.2

It would be convenient if when fill-region was done, it would leave
the point where it originally was.  Currently, it moves the point to
the bottom of the region, where the mark is, making it impossible to
immediately use any other "<verb>-region" commands.  By comparison,
most <verb>-region commands (e.g., indent-region) leave the point and
mark where they are, so they can be used in succession.

Thanks,

Dale

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Enhancement request for fill-region
@ 2003-01-29  2:22 Luc Teirlinck
  2003-01-29  3:44 ` Dale R Worley
  0 siblings, 1 reply; 4+ messages in thread
From: Luc Teirlinck @ 2003-01-29  2:22 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dale Worley wrote:

    It would be convenient if when fill-region was done, it would
    leave the point where it originally was.  Currently, it moves the
    point to the bottom of the region, where the mark is, making it
    impossible to immediately use any other "<verb>-region" commands.
    By comparison, most <verb>-region commands (e.g., indent-region)
    leave the point and mark where they are, so they can be used in
    succession.

I agree that this is inconvenient.  You can not even use the usual way
(C-x C-x) to restore the original region.  Just fixing this would be
completely trivial: just enclose the fill-region body in a
save-excursion form and everything is done.

There are two problems with just applying this trivial fix, however.

The first one is that there probably is some good reason for the
behavior, even though I must admit I personally can not think of any.
Indeed, from looking at the code I get the impression that the
behavior is deliberate and not the result of inadvertently forgetting
a save-excursion form.  There is an explicit:
(goto-char end)

Secondly, even if there is no good reason for the behavior, plenty of
existing code might rely it and might become broken by changing it.

There might be the possibility of giving a sixth argument
`keep-point', or similar, to fill-region and put it interactively to
t, meaning that interactively you would get the behavior you want and
a programmer could pick the behavior (s)he wants.  This in case that
the motivation for the behavior (whatever it is) applies only to its
non-interactive use.

Sincerely,

Luc Teirlinck.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Enhancement request for fill-region
  2003-01-29  2:22 Luc Teirlinck
@ 2003-01-29  3:44 ` Dale R Worley
  0 siblings, 0 replies; 4+ messages in thread
From: Dale R Worley @ 2003-01-29  3:44 UTC (permalink / raw)
  Cc: bug-gnu-emacs

   From: Luc Teirlinck <teirllm@dms.auburn.edu>

   [...]

   There might be the possibility of giving a sixth argument
   `keep-point', or similar, to fill-region and put it interactively to
   t, meaning that interactively you would get the behavior you want and
   a programmer could pick the behavior (s)he wants.  This in case that
   the motivation for the behavior (whatever it is) applies only to its
   non-interactive use.

Are you the official maintainer (and thus implying but not stating
that this request is turned down) or are you just a commentator?

Dale

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Enhancement request for fill-region
@ 2003-01-29  4:24 Luc Teirlinck
  0 siblings, 0 replies; 4+ messages in thread
From: Luc Teirlinck @ 2003-01-29  4:24 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dale Worley wrote:

    Are you the official maintainer (and thus implying but not stating
    that this request is turned down) or are you just a commentator?

Sorry for the confusion.  I somehow forgot that I was posting to this
newsgroup and not to Emacs-devel, a site for Emacs development (and
hence writing in the wrong style, in particular being way too
technical.)

I am not the official maintainer and have no decision power.  I can
make suggestions and that was what I was doing.  So I was neither
turning down nor accepting your proposal, just discussing possible
ways to implement it (as well as possible difficulties involved),
should it be accepted.

I was neither stating nor implying that your request should be turned
down.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-29  4:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-29  4:24 Enhancement request for fill-region Luc Teirlinck
  -- strict thread matches above, loose matches on Subject: below --
2003-01-29  2:22 Luc Teirlinck
2003-01-29  3:44 ` Dale R Worley
2003-01-27 16:35 Dale R Worley

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