GNU bug report logs - #5399
23.1.50; fill-region

Previous Next

Package: emacs;

Reported by: rms <at> gnu.org

Date: Sat, 16 Jan 2010 21:10:03 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 24.2

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5399 in the body.
You can then email your comments to 5399 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5399; Package emacs. (Sat, 16 Jan 2010 21:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to rms <at> gnu.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 16 Jan 2010 21:10:03 GMT) Full text and rfc822 format available.

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

From: Richard Stallman <rms <at> gnu.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; fill-region
Date: Sat, 16 Jan 2010 16:09:31 -0500
I insert the following text

    This is
    a test

    of fill region
    and how it affects the mark.

(but not indented), then put the mark at the end and point at the beginning,
and type M-x fill-region.

It finishes with point and the mark both at the end.

It ought to leave point at the beginning if it was there before,
at the end if it was there before.  And likewise with the mark.


In GNU Emacs 23.1.50.3 (mipsel-unknown-linux-gnu, GTK+ Version 2.12.12)
 of 2009-11-19 on theobromine2
configured using `configure  'CFLAGS=-O0 -g -Wno-pointer-sign' 'mipsel-unknown-linux-gnu' 'build_alias=mipsel-unknown-linux-gnu' 'host_alias=mipsel-unknown-linux-gnu' 'target_alias=mipsel-unknown-linux-gnu''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  display-battery-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
a t u s SPC w i t h SPC A T I . C-a ESC f ESC f ESC 
f SPC b r i e f l y C-e RET C-p C-p C-p C-p C-o b c 
c : SPC r e s p 5 d C-u C-n C-n ( I F SPC w e SPC n 
e e d C-a ESC c C-e SPC t o SPC t a l k SPC m o r e 
SPC w e SPC c a n SPC u s e SPC t h e SPC p h n e . 
DEL DEL DEL o n e . ) RET C-c C-s C-p C-p C-p C-p C-p 
C-e x DEL ESC DEL O p e n O f f i c e C-n C-n C-n C-e 
ESC DEL O p e n ESC / . C-c C-c C-x 1 d d d d u x SPC 
SPC d x d d x d x d x x C-x C-s SPC d d x d d d d x 
d x d x C-x C-f f o o RET C-n C-n T h i s SPC i s RET 
a SPC t e s t RET RET o f SPC f i l l SPC r e g i o 
n RET a n d SPC h o w SPC i t SPC a f f e c t s SPC 
t h e SPC m a r k . RET C-@ C-u C-p C-p C-p ESC x f 
i l l SPC r e TAB RET C-x C-x C-x 4 C-g C-_ C-@ C-u 
C-n C-n C-n ESC w C-x C-g ESC x r e p o r t SPC e m 
a s DEL c s SPC b u g RET

Recent messages:
Saving file /home/rms/RMAIL...
Wrote /home/rms/RMAIL
Expunging deleted messages...done
Expunging deleted messages...done
Expunging deleted messages...done
Expunging deleted messages...done
Mark set
Undo in region!
Mark set
Source file `/home/rms/emacs-cvs/lisp/mail/emacsbug.el' newer than byte-compiled file

Load-path shadows:
/home/rms/emacs-cvs/lisp/hahaha/foo hides /home/rms/emacs-cvs/lisp/emacs-lisp/foo
/home/rms/emacs-cvs/lisp/progmodes/sym-comp hides /home/rms/emacs-cvs/lisp/obsolete/sym-comp

Features:
(shadow emacsbug sgml-mode sh-script executable cal-move cal-menu
calendar cal-loaddefs tabify man noutline outline easy-mmode ispell
mule-util rlogin tex-mode shell latexenc time-stamp parse-time vc-cvs
texinfo compare-w grep compile novice dired-aux dabbrev multi-isearch
quail help-mode view rmailout mailalias sendmail rmail speedbar
sb-image ezimage dframe assoc mail-utils dired regexp-opt t-mouse
battery paren cus-start cus-load mailcrypt rfc822 comint ring easymenu
mailcrypt-init tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face text-properties overlay md5
base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
font-render-setting system-font-setting gtk x-toolkit x multi-tty
emacs)




Added tag(s) patch. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 11:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5399; Package emacs. (Sun, 18 Sep 2011 12:12:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: rms <at> gnu.org
Cc: 5399 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: 23.1.50; fill-region
Date: Sun, 18 Sep 2011 13:44:17 +0200
Richard Stallman <rms <at> gnu.org> writes:

> I insert the following text
>
>     This is
>     a test
>
>     of fill region
>     and how it affects the mark.
>
> (but not indented), then put the mark at the end and point at the beginning,
> and type M-x fill-region.
>
> It finishes with point and the mark both at the end.
>
> It ought to leave point at the beginning if it was there before,
> at the end if it was there before.  And likewise with the mark.

The mark doesn't really change currently, I think?

The following patch should fix the problem, but it is a change in
behaviour.  Would it be OK to install this during the feature freeze?

=== modified file 'lisp/textmodes/fill.el'
--- lisp/textmodes/fill.el	2011-07-16 20:05:54 +0000
+++ lisp/textmodes/fill.el	2011-09-18 11:42:16 +0000
@@ -1010,7 +1010,8 @@
 		       (if current-prefix-arg 'full))))
   (unless (memq justify '(t nil none full center left right))
     (setq justify 'full))
-  (let (max beg fill-pfx)
+  (let ((start-point (point-marker))
+	max beg fill-pfx)
     (goto-char (max from to))
     (when to-eop
       (skip-chars-backward "\n")
@@ -1041,6 +1042,8 @@
 	    (setq fill-pfx
 		  (fill-region-as-paragraph (point) end justify nosqueeze))
 	  (goto-char end))))
+    (goto-char start-point)
+    (set-marker start-point nil)
     fill-pfx))
 
 



-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5399; Package emacs. (Sun, 18 Sep 2011 12:12:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5399; Package emacs. (Mon, 19 Sep 2011 18:17:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 5399 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#5399: 23.1.50; fill-region
Date: Mon, 19 Sep 2011 14:11:22 -0400
> The following patch should fix the problem, but it is a change in
> behaviour.  Would it be OK to install this during the feature freeze?

I think this should wait for after the freeze.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5399; Package emacs. (Mon, 19 Sep 2011 18:19:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5399 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#5399: 23.1.50; fill-region
Date: Mon, 19 Sep 2011 20:10:11 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> The following patch should fix the problem, but it is a change in
>> behaviour.  Would it be OK to install this during the feature freeze?
>
> I think this should wait for after the freeze.

Ok; I'll mark it as "pending".

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) pending. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 19 Sep 2011 18:19:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5399; Package emacs. (Tue, 10 Apr 2012 02:08:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5399 <at> debbugs.gnu.org, rms <at> gnu.org
Subject: Re: bug#5399: 23.1.50; fill-region
Date: Tue, 10 Apr 2012 04:06:49 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> The following patch should fix the problem, but it is a change in
>> behaviour.  Would it be OK to install this during the feature freeze?
>
> I think this should wait for after the freeze.

I've now applied the patch to trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 Apr 2012 02:08:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.2, send any further explanations to 5399 <at> debbugs.gnu.org and rms <at> gnu.org Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 Apr 2012 02:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 May 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 357 days ago.

Previous Next


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