GNU bug report logs - #16145
ERC disregards data to be logged when reconnecting

Previous Next

Package: emacs;

Reported by: Ivan Shmakov <ivan <at> siamics.net>

Date: Sat, 14 Dec 2013 14:45:02 UTC

Severity: normal

Tags: patch

Fixed in version 24.5

Done: Ivan Shmakov <ivan <at> siamics.net>

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 16145 in the body.
You can then email your comments to 16145 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 bug-gnu-emacs <at> gnu.org:
bug#16145; Package emacs. (Sat, 14 Dec 2013 14:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Shmakov <ivan <at> siamics.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 14 Dec 2013 14:45:03 GMT) Full text and rfc822 format available.

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

From: Ivan Shmakov <ivan <at> siamics.net>
To: bug-gnu-emacs <at> gnu.org
Subject: ERC disregards data to be logged when reconnecting 
Date: Sat, 14 Dec 2013 14:43:35 +0000
	Upon reconnecting to the server, erc-connect-pre-hook is run,
	which, by default, results in erc-initialize-log-marker being
	called, and the erc-last-saved-position marker reinitialized.

	The problem is that no calls to erc-save-buffer-in-logs are made
	when the connection is closed, resulting in the entire previous
	ERC session silently disregarded, and never saved in the logs.

	Presuming that erc-initialize-log-marker was really meant to
	only initialize erc-last-saved-position when there’s none, my
	suggestion would be for it to be amended with an appropriate
	‘unless’ guard.

	Alternatively (or perhaps complementarily), a call to
	erc-log-save-all-buffers may be added to the
	erc-disconnected-hook’s default value.  (Please note that this
	alone, however, may be less reliable a measure.)

-- 
FSF associate member #7257




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16145; Package emacs. (Sun, 05 Oct 2014 11:23:02 GMT) Full text and rfc822 format available.

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

From: Ivan Shmakov <ivan <at> siamics.net>
To: 16145 <at> debbugs.gnu.org, control <at> debbugs.gnu.org
Subject: Re: bug#16145: ERC disregards data to be logged when reconnecting 
Date: Sun, 05 Oct 2014 11:22:25 +0000
[Message part 1 (text/plain, inline)]
tag 16145 + patch
thanks

	I hereby suggest the patch MIMEd.  (In the same spirit as the
	one for Bug#18599.)

2014-10-05  Ivan Shmakov  <ivan <at> siamics.net>

	* erc.el (erc-initialize-log-marker): Only initialize
	  erc-last-saved-position if not already a marker.  (Closes
	  #16145.)

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
[Message part 2 (text/plain, inline)]
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2052,9 +2052,10 @@ defun erc-initialize-log-marker (buffer)
   "Initialize the `erc-last-saved-position' marker to a sensible position.
 BUFFER is the current buffer."
   (with-current-buffer buffer
-    (setq erc-last-saved-position (make-marker))
-    (move-marker erc-last-saved-position
-                 (1- (marker-position erc-insert-marker)))))
+    (unless (markerp erc-last-saved-position)
+      (setq erc-last-saved-position (make-marker))
+      (move-marker erc-last-saved-position
+                   (1- (marker-position erc-insert-marker))))))
 
 ;; interactive startup
 

Added tag(s) patch. Request was from Ivan Shmakov <ivan <at> siamics.net> to control <at> debbugs.gnu.org. (Sun, 05 Oct 2014 11:23:03 GMT) Full text and rfc822 format available.

Reply sent to Ivan Shmakov <ivan <at> siamics.net>:
You have taken responsibility. (Fri, 21 Nov 2014 19:32:02 GMT) Full text and rfc822 format available.

Notification sent to Ivan Shmakov <ivan <at> siamics.net>:
bug acknowledged by developer. (Fri, 21 Nov 2014 19:32:02 GMT) Full text and rfc822 format available.

Message #15 received at 16145-done <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 16145-done <at> debbugs.gnu.org
Subject: Re: bug#16145: ERC disregards data to be logged when reconnecting 
Date: Fri, 21 Nov 2014 19:31:02 +0000
Version: 24.5

	I no longer observe the issue (as of 2014-11-18 build,
	cb4f666ade76.)  Per my reading of the Git log, it was fixed in
	Git master back this October:

commit 43f52995ea9d4846c84f81d64107314a6577e595
Author:     Ivan Shmakov <ivan <at> siamics.net>
AuthorDate: Fri Oct 10 09:16:12 2014 -0400
Commit:     Kelvin White <kwhite <at> gnu.org>
CommitDate: Fri Oct 10 09:16:12 2014 -0400

    Only initialize erc-last-saved-position if not already a marker.
    
    Fixes: debbugs:16145

	In emacs-24, this bug was fixed as part of the following
	“backport” change:

commit d1036d288de1e047f7f6043188a1063f0d6b044d
Author:     l3thal <l3thal <at> debian>
AuthorDate: Sat Nov 8 20:51:43 2014 -0500
Commit:     l3thal <l3thal <at> debian>
CommitDate: Sat Nov 8 20:51:43 2014 -0500

    backport: erc bugfixes

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Dec 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 150 days ago.

Previous Next


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