all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16145: ERC disregards data to be logged when reconnecting
@ 2013-12-14 14:43 Ivan Shmakov
  2014-10-05 11:22 ` Ivan Shmakov
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Shmakov @ 2013-12-14 14:43 UTC (permalink / raw
  To: 16145

	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





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

* bug#16145: ERC disregards data to be logged when reconnecting
  2013-12-14 14:43 bug#16145: ERC disregards data to be logged when reconnecting Ivan Shmakov
@ 2014-10-05 11:22 ` Ivan Shmakov
  2014-11-21 19:31   ` Ivan Shmakov
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Shmakov @ 2014-10-05 11:22 UTC (permalink / raw
  To: 16145, control

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

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@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

[-- Attachment #2: Type: text/plain, Size: 637 bytes --]

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

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

* bug#16145: ERC disregards data to be logged when reconnecting
  2014-10-05 11:22 ` Ivan Shmakov
@ 2014-11-21 19:31   ` Ivan Shmakov
  0 siblings, 0 replies; 3+ messages in thread
From: Ivan Shmakov @ 2014-11-21 19:31 UTC (permalink / raw
  To: 16145-done

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@siamics.net>
AuthorDate: Fri Oct 10 09:16:12 2014 -0400
Commit:     Kelvin White <kwhite@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@debian>
AuthorDate: Sat Nov 8 20:51:43 2014 -0500
Commit:     l3thal <l3thal@debian>
CommitDate: Sat Nov 8 20:51:43 2014 -0500

    backport: erc bugfixes

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





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

end of thread, other threads:[~2014-11-21 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14 14:43 bug#16145: ERC disregards data to be logged when reconnecting Ivan Shmakov
2014-10-05 11:22 ` Ivan Shmakov
2014-11-21 19:31   ` Ivan Shmakov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.