Subject: bug#18820: 25.0.50; message-mode: incorrect: newline-and-reformat on "--text follows this line--"

From: Matthew Leach <[email-masked]>
Date: Fri, 24 Oct 2014 23:03:42 +0100

Hello,

I think I've discovered a minor bug in message mode.  Recipe:

emacs -Q
C-x m
move point to:
--text follows this line--
                          ^
                         Here
M-RET

You should see that the "text follows this line" line has been shifted
down.

Buffer after bug (P denotes the position of the point):

--8<---------------cut here---------------start------------->8---
To: 
Subject: 
From: [email-masked]

P

--text follows this line--

-- 
Matt
--8<---------------cut here---------------end--------------->8---

Whereas, I would have expected it to have been:

--8<---------------cut here---------------start------------->8---
To: 
Subject: 
From: [email-masked]
--text follows this line--

P

-- 
Matt
--8<---------------cut here---------------end--------------->8---

Is this expected behaviour?  If not I'll look at creating a patch.

In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3)
 of 2014-10-17 on matt-desktop
Windowing system distributor `The X.Org Foundation', version 11.0.11601000
Configured using:
 `configure --prefix=/usr/local 'CFLAGS=-O0 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Message

Minor modes in effect:
  gnus-message-citation-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  mml-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: message-do-auto-fill
  abbrev-mode: t

Recent input:
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <down> <down> <down> <down> <down> <down> 
<down> <S-up> <end> <left> <left> <left> <left> <left> 
<left> <left> <S-down> <S-right> <up> <up> <up> <up> 
<up> <up> <up> <up> <down> <help-echo> C-c m s <switch-frame> 
C-x b g r o u p RET g n n n n n n n n p RET RET ! q 
g c g SPC <switch-frame> <switch-frame> g q g n RET 
E q g e <switch-frame> <switch-frame> g n n n n n n 
n n n p RET c g c g g <switch-frame> <down-mouse-1> 
<mouse-1> C-x C-g M-x v e r s o n <return> <backspace> 
<backspace> <backspace> s i o n <return> <up> <up> 
<up> <up> C-e M-x m e n u - b a r <tab> m o <tab> <return> 
C-h f C-g C-x 1 <down-mouse-1> <mouse-movement> <drag-mouse-1> 
M-x r e p o r t <tab> <return>

Recent messages:
Reading active file via nndraft...done
Checking new news...done
Checking new news...
Reading active file from archive via nnfolder...done
Reading active file via nndraft...done
Checking new news...done
C-x C-g is undefined
GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.3) of 2014-10-17 on matt-desktop
Menu-Bar mode enabled
Quit

Load-path shadows:
/home/matthew/.emacs.d/elpa/emms-20140820.1251/tq hides /usr/local/share/emacs/25.0.50/lisp/emacs-lisp/tq

Features:
(shadow emacsbug cus-start cus-load flow-fill tango-dark-theme mailalias
smtpmail dabbrev bbdb-message sendmail nnir shr-color color shr
mm-archive sort gnus-cite gnus-bcklg url-http url-gw url-auth gravatar
url-cache url url-proxy url-privacy url-expand url-methods url-history
url-cookie url-domsuf url-util url-parse url-vars mail-extr vc-git
ggtags ewoc flyspell ispell cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs erc-list erc-menu erc-join
erc-ring erc-networks erc-pcomplete erc-track erc-match erc-button
erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat
jka-compr eieio-opt speedbar sb-image ezimage dframe find-func help-mode
mule-util ielm misearch multi-isearch tramp-cache tramp tramp-compat
tramp-loaddefs trampver shell gnus-async qp gnus-ml gnus-topic nndraft
nnmh utf-7 nnfolder epa-file epa derived epg gnutls network-stream
auth-source cl-macs gv eieio eieio-core starttls gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg gnus-cache bbdb-gnus bbdb-mua
bbdb-com crm bbdb bbdb-site timezone gnus-demon nntp gnus-notifications
gnus-fun gnus-art mm-uu mml2015 mm-view mml-smime smime password-cache
dig mailcap gnus-sum gnus-group gnus-undo notifications dbus xml
gnus-article-treat-patch diff-mode gnus-start gnus-cloud nnimap nnmail
mail-source tls utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range
message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util
mail-prsvr wid-edit xterm server smartparens byte-opt dash preview-latex
tex-site auto-loads conf-toplev conf-ssh-agent conf-windmove windmove
conf-whitespace conf-theme conf-slime slime-repl slime-parse bytecomp
byte-compile cconv slime compile etags arc-mode archive-mode noutline
outline easy-mmode pp hyperspec browse-url conf-faces hl-sexp thingatpt
conf-eshell em-term term disp-table ehelp em-smart pcomplete comint
ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
esh-groups eshell esh-module esh-mode esh-util conf-erc conf-emms
emms-cache emms-info-ogginfo emms-info-mp3info emms-playlist-mode
emms-player-vlc advice help-fns emms-source-playlist emms-source-file
locate dired emms-player-mplayer emms-playing-time emms-player-simple
emms-info later-do emms-setup emms-mode-line emms emms-compat conf-elisp
conf-packages slime-autoloads info easymenu package epg-config conf-dir
conf-dired conf-c-mode conf-auctex conf-asm conf-ace-jump conf-personal
ido edmacro kmacro cl-loaddefs cl-lib time-date paren tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar 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 minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 1144450 101984)
 (symbols 48 51373 0)
 (miscs 40 266 1518)
 (strings 32 149783 17679)
 (string-bytes 1 4912480)
 (vectors 16 46669)
 (vector-slots 8 861116 42505)
 (floats 8 556 1142)
 (intervals 56 60218 1226)
 (buffers 976 47)
 (heap 1024 101090 3319))

-- 
Matt