all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Ralston <wubbulous@gmail.com>
To: 12857@debbugs.gnu.org
Cc: deniz@dogan.se
Subject: bug#12857: Re: rcirc.el: make default PART and QUIT reasons customizable
Date: Thu, 13 Dec 2012 07:05:08 -0800	[thread overview]
Message-ID: <CADWcrk5ESKCjzS_rUv=1fKFYGm_kaE8JPKuoaQ6wFGHcX5dz0A@mail.gmail.com> (raw)
In-Reply-To: <50BE7E86.9020601@dogan.se>


[-- Attachment #1.1: Type: text/plain, Size: 1207 bytes --]

Hi Deniz,

Sorry for my glacially tardy response.
That's a much cleaner way of doing it. I hadn't really looked into
composite types before, so thanks for the suggestion! I have attached the
new patch file to this message. Let me know what you think, and if you'd
like me to tweak it any further. I'll try to respond more promptly next
time.

    Daniel

Changelog entry:

2012-11-10  Daniel Ralston  <Wubbulous@gmail.com>

    * rcirc.el: Make the default PART and QUIT reasons used by
    rcirc-cmd-part and rcirc-cmd-quit customizable.
    (rcirc-default-part-reason,rcirc-default-quit-reason): New
    customizable vars.


Subject: Re: rcirc.el: make default PART and QUIT reasons customizable
> Date: Fri, 23 Nov 2012 18:25:30 +0100
> From: Deniz Dogan <deniz@dogan.se>
> To: 12857@debbugs.gnu.org
>
> Hi, Daniel
>
> This is a good patch! In my opinion it would be nicer if we use a
> composite customization type for rcirc-default-part-reason and
> rcirc-default-quit-reason, letting the user choose between the default
> (rcirc-id-string) and a custom message.
>
> What do you think about this idea?  Would you be willing to write a new
> patch implementing this instead?
>
> Cheers,
> Deniz
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 1665 bytes --]

[-- Attachment #2: rcirc-default-part-quit-reasons.patch --]
[-- Type: application/octet-stream, Size: 2811 bytes --]

=== modified file 'lisp/net/rcirc.el'
*** lisp/net/rcirc.el	2012-10-23 15:06:07 +0000
--- lisp/net/rcirc.el	2012-12-13 14:42:24 +0000
***************
*** 47,52 ****
--- 47,54 ----
  (require 'time-date)
  (eval-when-compile (require 'cl))
  
+ (defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version))
+ 
  (defgroup rcirc nil
    "Simple IRC client."
    :version "22.1"
*************** for connections using SSL/TLS."
*** 138,143 ****
--- 140,159 ----
    :type 'string
    :group 'rcirc)
  
+ (defcustom rcirc-default-part-reason rcirc-id-string
+   "The default reason to send when parting from a channel, when
+ no reason is explicitly given."
+   :type `(choice (const :tag "Value of `rcirc-id-string'" ,rcirc-id-string)
+                  (string :tag "Custom string"))
+   :group 'rcirc)
+ 
+ (defcustom rcirc-default-quit-reason rcirc-id-string
+   "The default reason to send when quitting a server, when no
+ reason is explicitly given."
+   :type `(choice (const :tag "Value of `rcirc-id-string'" ,rcirc-id-string)
+                  (string :tag "Custom string"))
+   :group 'rcirc)
+ 
  (defcustom rcirc-fill-flag t
    "Non-nil means line-wrap messages printed in channel buffers."
    :type 'boolean
*************** will be killed."
*** 412,419 ****
  (defvar rcirc-timeout-seconds 600
    "Kill connection after this many seconds if there is no activity.")
  
- (defconst rcirc-id-string (concat "rcirc on GNU Emacs " emacs-version))
- \f
  (defvar rcirc-startup-channels nil)
  
  (defvar rcirc-server-name-history nil
--- 428,433 ----
*************** CHANNELS is a comma- or space-separated
*** 2199,2205 ****
    "Part CHANNEL."
    (interactive "sPart channel: ")
    (let ((channel (if (> (length channel) 0) channel target)))
!     (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string))))
  
  (defun-rcirc-command quit (reason)
    "Send a quit message to server with REASON."
--- 2213,2220 ----
    "Part CHANNEL."
    (interactive "sPart channel: ")
    (let ((channel (if (> (length channel) 0) channel target)))
!     (rcirc-send-string process (concat "PART " channel " :"
!                                        rcirc-default-part-reason))))
  
  (defun-rcirc-command quit (reason)
    "Send a quit message to server with REASON."
*************** CHANNELS is a comma- or space-separated
*** 2207,2213 ****
    (rcirc-send-string process (concat "QUIT :"
  				     (if (not (zerop (length reason)))
  					 reason
! 				       rcirc-id-string))))
  
  (defun-rcirc-command nick (nick)
    "Change nick to NICK."
--- 2222,2228 ----
    (rcirc-send-string process (concat "QUIT :"
  				     (if (not (zerop (length reason)))
  					 reason
! 				       rcirc-default-quit-reason))))
  
  (defun-rcirc-command nick (nick)
    "Change nick to NICK."


  parent reply	other threads:[~2012-12-13 15:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-10 21:43 bug#12857: rcirc.el: make default PART and QUIT reasons customizable Daniel Ralston
2012-11-23 17:25 ` Deniz Dogan
     [not found]   ` <50BE7E86.9020601@dogan.se>
2012-12-13 15:05     ` Daniel Ralston [this message]
2016-02-24  6:02       ` bug#12857: " Lars Ingebrigtsen
2019-06-02  0:11       ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADWcrk5ESKCjzS_rUv=1fKFYGm_kaE8JPKuoaQ6wFGHcX5dz0A@mail.gmail.com' \
    --to=wubbulous@gmail.com \
    --cc=12857@debbugs.gnu.org \
    --cc=deniz@dogan.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.