From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.bugs Subject: Enhancement request for fill-region Date: Tue, 28 Jan 2003 20:22:20 -0600 (CST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200301290222.UAA05206@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1043806867 25641 80.91.224.249 (29 Jan 2003 02:21:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2003 02:21:07 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18dhqb-0006fN-00 for ; Wed, 29 Jan 2003 03:21:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dhrd-0002jL-02 for gnu-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2003 21:22:09 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18dhrV-0002fs-00 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2003 21:22:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18dhrK-0002Uk-00 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2003 21:21:51 -0500 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dhr8-0002Fn-00 for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2003 21:21:38 -0500 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.9.1a/8.9.1) with ESMTP id UAA29305; Tue, 28 Jan 2003 20:21:37 -0600 (CST) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id UAA05206; Tue, 28 Jan 2003 20:22:20 -0600 (CST) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: Dale R Worley X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4337 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4337 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 "-region" commands. By comparison, most -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.