emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 3d09d53 2/2: rcirc: Document /reconnect as a buil


From: Noam Postavsky
Subject: [Emacs-diffs] emacs-26 3d09d53 2/2: rcirc: Document /reconnect as a built-in command (Bug#29656)
Date: Wed, 29 Aug 2018 23:06:51 -0400 (EDT)

branch: emacs-26
commit 3d09d533d15eae2974f3858df43746cf6e8f897b
Author: Miciah Masters <address@hidden>
Commit: Noam Postavsky <address@hidden>

    rcirc: Document /reconnect as a built-in command (Bug#29656)
    
    The change "New command rcirc-cmd-reconnect" from 2014-04-09 (shipped
    in Emacs 25.1) added a /reconnect command to rcirc but did not
    document it and did not delete the example /reconnect command
    definition in the manual.
    * doc/misc/rcirc.texi (rcirc commands): Document the built-in /reconnect
    command.
    (Hacking and Tweaking): Delete example reconnect command.
    
    Copyright-paperwork-exempt: yes
---
 doc/misc/rcirc.texi | 60 +++++++++++++++--------------------------------------
 1 file changed, 17 insertions(+), 43 deletions(-)

diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index 2437e02..0287054 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -88,7 +88,6 @@ Hacking and Tweaking
 * Scrolling conservatively::
 * Changing the time stamp format::
 * Defining a new command::
-* Reconnecting after you have lost the connection::
 
 @end detailmenu
 @end menu
@@ -401,6 +400,23 @@ This disconnects from the server and parts all channels.  
You can
 optionally provide a reason for quitting.  When you kill the server
 buffer, you automatically quit the server and part all channels.  (Also
 @code{/quit ZZZzzz...}.)
+
address@hidden /reconnect
address@hidden /reconnect
address@hidden reconnect
address@hidden lost connection
address@hidden disconnecting servers, reconnecting
+This reconnects after you have lost the connection.
+
+If you're chatting from a laptop, then you might be familiar with this
+problem: When your laptop falls asleep and wakes up later, your IRC
+client doesn't realize that it has been disconnected.  It takes several
+minutes until the client decides that the connection has in fact been
+lost.  The simple solution is to use @kbd{M-x rcirc}.  The problem is
+that this opens an @emph{additional} connection, so you'll have two
+copies of every channel buffer, one dead and one live.
+
+The real answer, therefore, is the @code{/reconnect} command.
 @end table
 
 @node Useful IRC commands
@@ -787,7 +803,6 @@ Here are some examples of stuff you can do to configure 
@code{rcirc}.
 * Scrolling conservatively::
 * Changing the time stamp format::
 * Defining a new command::
-* Reconnecting after you have lost the connection::
 @end menu
 
 @node Skipping /away messages using handlers
@@ -888,47 +903,6 @@ because @code{defun-rcirc-command} is not yet available, 
and without
                          (concat "I use " rcirc-id-string))))
 @end smallexample
 
address@hidden Reconnecting after you have lost the connection
address@hidden Reconnecting after you have lost the connection
address@hidden reconnecting
address@hidden disconnecting servers, reconnecting
-
-If you're chatting from a laptop, then you might be familiar with this
-problem: When your laptop falls asleep and wakes up later, your IRC
-client doesn't realize that it has been disconnected.  It takes several
-minutes until the client decides that the connection has in fact been
-lost.  The simple solution is to use @kbd{M-x rcirc}.  The problem is
-that this opens an @emph{additional} connection, so you'll have two
-copies of every channel buffer, one dead and one live.
-
-The real answer, therefore, is a @code{/reconnect} command:
-
address@hidden
-(with-eval-after-load 'rcirc
-  (defun-rcirc-command reconnect (arg)
-    "Reconnect the server process."
-    (interactive "i")
-    (unless process
-      (error "There's no process for this target"))
-    (let* ((server (car (process-contact process)))
-           (port (process-contact process :service))
-           (nick (rcirc-nick process))
-           channels query-buffers)
-      (dolist (buf (buffer-list))
-        (with-current-buffer buf
-          (when (eq process (rcirc-buffer-process))
-            (remove-hook 'change-major-mode-hook
-                         'rcirc-change-major-mode-hook)
-            (if (rcirc-channel-p rcirc-target)
-                (setq channels (cons rcirc-target channels))
-              (setq query-buffers (cons buf query-buffers))))))
-      (delete-process process)
-      (rcirc-connect server port nick
-                     rcirc-default-user-name
-                     rcirc-default-full-name
-                     channels))))
address@hidden smallexample
-
 @node GNU Free Documentation License
 @appendix GNU Free Documentation License
 @include doclicense.texi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]