unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
@ 2013-07-08 17:29 Richard Stallman
  2013-07-08 17:47 ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2013-07-08 17:29 UTC (permalink / raw)
  To: 14824


I type C-x m rms C-c C-s, and it sends the message.
(I am using Mail mode.)  The buffer is marked unmodified.

I type 1, and the buffer becomes modified.
I type C-x u, and it deletes the 1,
but the buffer is still marked as modified.

In Emacs 23.2, that undo also marks the buffer as unmodified again.

Unfortunately I can't try intermediate versions; they don't
remain in my machine.



In GNU Emacs 24.3.50.2 (mips64el-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2013-05-25 on chiefs-gnewsense
Bzr revision: 112729 monnier@iro.umontreal.ca-20130525030804-6onx9rhvib7pv3fc
System Description:	gNewSense GNU/Linux 3.0 (parkes)

Configured using:
 `configure CFLAGS=-g -O0'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: RMAIL

Minor modes in effect:
  shell-dirtrack-mode: t
  gpm-mouse-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
o ESC > RET RET ESC , C-@ C-p C-p C-p C-w C-x C-s C-x 
b R TAB RET ESC , C-_ C-x o r y ESC , C-o RET I SPC 
a m SPC s o r r y SPC t o SPC h e a r SPC i t . SPC 
SPC I t SPC i s SPC a SPC g o o d SPC i d e a SPC t 
o SPC g e t SPC m e d i c a l SPC t r e a t m e n t 
RET i f SPC y o u SPC a r e SPC d e p r e s s e d . 
C-a C-k C-p ESC e SPC SPC C-y C-x C-x ESC c ESC f ESC 
f ESC f C-d C-d , ESC l ESC q C-n . C-p ESC f ESC f 
ESC f ESC f ESC f C-f C-o SPC a n d SPC i t SPC i s 
SPC n o t SPC c a u s e d RET b SPC y SPC DEL DEL DEL 
DEL y SPC DEL DEL b y SPC t h e SPC r e a l SPC s i 
t u a t i o n SPC a r o n d SPC DEL DEL DEL u d SPC 
y o u , SPC ESC q ESC b ESC b C-f C-f C-f C-f n ESC 
q C-n C-n C-x o C-x 1 C-u C-v C-u C-v C-u C-n C-u C-n 
C-n C-u C-v C-u C-v C-u C-v C-u C-v C-u C-v c C-c C-c 
C-d x x m C-x 0 ESC x r e p o r t SPC e m a c s SPC 
b SPC u g DEL DEL RET

Recent messages:
Undo!
Unsent message being composed; erase it? (y or n)  y
Mark set
Auto-saving...done
Mark set
Auto save file for draft message exists; consider M-x mail-recover
Sending...
Wrote /home/rms/outgoing/out-23
Sending...done
Expunging deleted messages...done

Load-path shadows:
/home/rms/emacs-bzr/trunk/lisp/net/shr-color hides /home/rms/emacs-bzr/trunk/lisp/gnus/shr-color
/home/rms/emacs-bzr/trunk/lisp/net/shr hides /home/rms/emacs-bzr/trunk/lisp/gnus/shr

Features:
(shadow emacsbug epa-mail epa derived epg epg-config ispell dired-aux
parse-time vc-cvs sgml-mode quail shell pcomplete grep compile comint
ansi-color rmailout dabbrev novice misearch multi-isearch etags ring
help-mode rmailsum mailalias qp rmailmm message sendmail format-spec
rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader mail-parse rfc2231 dired t-mouse time-date
finder-inf package rmailedit rmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils paren cus-start cus-load nadvice advice help-fns
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-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 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 inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
        [ To any NSA and FBI agents reading my email: please consider
        [ whether defending the US Constitution against all enemies,
        [ foreign or domestic, requires you to follow Snowden's example.


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call.






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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-08 17:29 bug#14824: 24.3.50; Regression: problem with undo in Mail mode Richard Stallman
@ 2013-07-08 17:47 ` Glenn Morris
  2013-07-09  0:46   ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-07-08 17:47 UTC (permalink / raw)
  To: rms; +Cc: 14824

Richard Stallman wrote:

> I type C-x m rms C-c C-s, and it sends the message.
> (I am using Mail mode.)  The buffer is marked unmodified.
>
> I type 1, and the buffer becomes modified.
> I type C-x u, and it deletes the 1,
> but the buffer is still marked as modified.
>
> In Emacs 23.2, that undo also marks the buffer as unmodified again.
>
> Unfortunately I can't try intermediate versions; they don't
> remain in my machine.

Seems to have nothing to do with Mail mode. Minimal example with current
trunk:

emacs -Q
1
C-x u
    ; buffer still marked modified


Issue not present in 24.3.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-08 17:47 ` Glenn Morris
@ 2013-07-09  0:46   ` Glenn Morris
  2013-07-09  8:56     ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-07-09  0:46 UTC (permalink / raw)
  To: aaron.s.hawley, monnier; +Cc: 14824, rms

Glenn Morris wrote:

> Seems to have nothing to do with Mail mode. Minimal example with current
> trunk:
>
> emacs -Q
> 1
> C-x u
>     ; buffer still marked modified
>
>
> Issue not present in 24.3.

Bisected to:

revno: 111447
author: Aaron S. Hawley <aaron.s.hawley@gmail.com>
committer: Stefan Monnier <monnier@iro.umontreal.ca>
branch nick: trunk
timestamp: Tue 2013-01-08 14:13:31 -0500
message:
  * lisp/simple.el (primitive-undo): Move from undo.c.
  * src/undo.c (Fprimitive_undo): Move to simple.el.
  (syms_of_undo): Remove declaration for Sprimitive_undo.
  * test/automated/undo-tests.el: New file.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09  0:46   ` Glenn Morris
@ 2013-07-09  8:56     ` Stefan Monnier
  2013-07-09 14:20       ` Aaron S. Hawley
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2013-07-09  8:56 UTC (permalink / raw)
  To: aaron.s.hawley; +Cc: 14824, rms

>> emacs -Q
>> 1
>> C-x u
>> ; buffer still marked modified

> Bisected to:

> revno: 111447
> author: Aaron S. Hawley <aaron.s.hawley@gmail.com>
> committer: Stefan Monnier <monnier@iro.umontreal.ca>
> branch nick: trunk
> timestamp: Tue 2013-01-08 14:13:31 -0500
> message:
>   * lisp/simple.el (primitive-undo): Move from undo.c.
>   * src/undo.c (Fprimitive_undo): Move to simple.el.
>   (syms_of_undo): Remove declaration for Sprimitive_undo.
>   * test/automated/undo-tests.el: New file.

A shot in the dark: it might be due to the finer timestamps (since
these were introduced fairly recently, whereas Aaron's code is actually
pretty old (even tho it was installed only recently)).

Aaron?


        Stefan





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09  8:56     ` Stefan Monnier
@ 2013-07-09 14:20       ` Aaron S. Hawley
  2013-07-09 15:59         ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Aaron S. Hawley @ 2013-07-09 14:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 14824, rms

> A shot in the dark: it might be due to the finer timestamps (since
> these were introduced fairly recently, whereas Aaron's code is actually
> pretty old (even tho it was installed only recently)).

That is a good theory.  I remember studying the time precision changes
by Paul Eggert from last year.  I think these were them:

http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/108687
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9000

The changes to time values in Emacs were a concern of mine when the
new Lisp version of undo was finally merged to trunk.  I don't have an
Emacs trunk build at the moment, so I can't confirm.  It would be this
section of the new undo code, though:

http://bzr.savannah.gnu.org/lh/emacs/trunk/annotate/113327/lisp/simple.el#L2132

I am a little surprised this was broken in trunk for the last 6
months, and nobody had noticed.  The automated test suite could catch
this by adding a line containing (should (not (buffer-modified-p))) to
one of the unit tests.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09 14:20       ` Aaron S. Hawley
@ 2013-07-09 15:59         ` Glenn Morris
  2013-07-09 17:58           ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-07-09 15:59 UTC (permalink / raw)
  To: Aaron S. Hawley; +Cc: 14824, rms


>> A shot in the dark: it might be due to the finer timestamps (since
>> these were introduced fairly recently, whereas Aaron's code is actually
>> pretty old (even tho it was installed only recently)).

As another data point, the problem only happens with buffers that are
not visiting files.

> I am a little surprised this was broken in trunk for the last 6
> months, and nobody had noticed. 

I'm not that surprised.

> The automated test suite could catch this by adding a line containing
> (should (not (buffer-modified-p))) to one of the unit tests.

Yep.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09 15:59         ` Glenn Morris
@ 2013-07-09 17:58           ` Glenn Morris
  2013-07-09 18:20             ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-07-09 17:58 UTC (permalink / raw)
  To: Aaron S. Hawley; +Cc: 14824, rms

Glenn Morris wrote:

> As another data point, the problem only happens with buffers that are
> not visiting files.

I think the issue might be:

buffer-undo-list has an element of the form:

 (t 0 0 0 -2000)

I don't know where -2000 picosecs comes from.

In undo.c, the test was:

  EMACS_TIME_NE (mod_time, base_buffer->modtime)

Now the test is:

(equal time (visited-file-modtime))

But visited-file-modtime returns 0 rather than -2000 picoseconds.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09 17:58           ` Glenn Morris
@ 2013-07-09 18:20             ` Glenn Morris
  2013-07-09 18:26               ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-07-09 18:20 UTC (permalink / raw)
  To: Aaron S. Hawley; +Cc: 14824, rms

Glenn Morris wrote:

>  (t 0 0 0 -2000)
>
> I don't know where -2000 picosecs comes from.

Oh, I guess it is UNKNOWN_MODTIME_NSECS = -2.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09 18:20             ` Glenn Morris
@ 2013-07-09 18:26               ` Glenn Morris
  2013-07-10  6:29                 ` Paul Eggert
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-07-09 18:26 UTC (permalink / raw)
  To: Aaron S. Hawley; +Cc: Paul Eggert, 14824, rms

Glenn Morris wrote:

> Glenn Morris wrote:
>
>>  (t 0 0 0 -2000)
>>
>> I don't know where -2000 picosecs comes from.
>
> Oh, I guess it is UNKNOWN_MODTIME_NSECS = -2.

So I guess the actual problem is that there seems no way to replicate

EMACS_TIME_NE (mod_time, base_buffer->modtime)

at the Lisp level.





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

* bug#14824: 24.3.50; Regression: problem with undo in Mail mode
  2013-07-09 18:26               ` Glenn Morris
@ 2013-07-10  6:29                 ` Paul Eggert
  0 siblings, 0 replies; 10+ messages in thread
From: Paul Eggert @ 2013-07-10  6:29 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 14824, Aaron S. Hawley, rms

I installed what I hope is a fix for the bug --
please try Emacs trunk bzr 113351 or later.
It works for me, for the simple test case
that Glenn gave yesterday.





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

end of thread, other threads:[~2013-07-10  6:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-08 17:29 bug#14824: 24.3.50; Regression: problem with undo in Mail mode Richard Stallman
2013-07-08 17:47 ` Glenn Morris
2013-07-09  0:46   ` Glenn Morris
2013-07-09  8:56     ` Stefan Monnier
2013-07-09 14:20       ` Aaron S. Hawley
2013-07-09 15:59         ` Glenn Morris
2013-07-09 17:58           ` Glenn Morris
2013-07-09 18:20             ` Glenn Morris
2013-07-09 18:26               ` Glenn Morris
2013-07-10  6:29                 ` Paul Eggert

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