all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
To: Stefan Kangas <skangas@skangas.se>, Ryan Yeske <rcyeske@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] rcirc.el (rcirc-connect): Make process name configurable.
Date: Sat, 15 Jan 2011 12:14:39 +0100	[thread overview]
Message-ID: <AANLkTinok_BFR8p2hmpiz+N8Oaz0xSGBz8W-fhohmRNk@mail.gmail.com> (raw)
In-Reply-To: <87aaj3ny3i.fsf@skangas.se>

2011/1/14 Stefan Kangas <skangas@skangas.se>:
> When using rcirc to connect to a proxy that uses several ports on the
> same host, one will get confusing results if joining a channel with the
> same name on several servers.
>
> If the proxy is running on localhost, one will get buffers (and log
> files) named e.g. #emacs@localhost, #emacs@localhost<1> etc.
>
> The attached patch changes (rcirc-connect) so that one can specify what
> name the connecting process will have.
>
> Thanks,
> Stefan Kangas
>
>
> # Bazaar merge directive format 2 (Bazaar 0.90)
> # revision_id: skangas@skangas.se-20110114011521-glws2d6ojsa0fyjp
> # target_branch: http://bzr.savannah.gnu.org/r/emacs/trunk
> # testament_sha1: bae2aee2a7aea3671fed35dae50f3a0c64c34f28
> # timestamp: 2011-01-14 02:28:45 +0100
> # base_revision_id: monnier@iro.umontreal.ca-20110113231430-\
> #   chaw2vxixdrrj3g4
> #
> # Begin patch
> === modified file 'lisp/net/rcirc.el'
> --- lisp/net/rcirc.el   2011-01-13 23:14:30 +0000
> +++ lisp/net/rcirc.el   2011-01-14 01:15:21 +0000
> @@ -471,7 +471,7 @@
>
>  ;;;###autoload
>  (defun rcirc-connect (server &optional port nick user-name
> -                             full-name startup-channels password)
> +                             full-name startup-channels password process-name)
>   (save-excursion
>     (message "Connecting to %s..." server)
>     (let* ((inhibit-eol-conversion)
> @@ -484,7 +484,9 @@
>           (user-name (or user-name rcirc-default-user-name))
>           (full-name (or full-name rcirc-default-full-name))
>           (startup-channels startup-channels)
> -           (process (make-network-process :name server :host server :service port-number)))
> +           (process (make-network-process
> +                     :name (if process-name process-name server)
> +                     :host server :service port-number)))
>       ;; set up process
>       (set-process-coding-system process 'raw-text 'raw-text)
>       (switch-to-buffer (rcirc-generate-new-buffer-name process nil))
>
> # Begin bundle
> IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWQ9MrSEAAYj/gACQICBQc//3
> UgoIAL////BQA4170b3ncpddde9hJRBpk1MkeDQVPIymm0QekGIYSkajSeVP1NPUyaaEZoCDE0NG
> hgaaEE0T1MoeoGmhoPUAaeo0AGSk/SjTTGk00epoHqNAAAABJIEMiYmRop6nqehqPUekeoA0PSe/
> MedfTtZJt9H7wT5sNyC/Gqmd8qJs96SaHSO7rj0tYEjP1Tc8zoVRwQVyK7rrNlR7/u3ZLCwrIexi
> 4wYKOIX2W7T+KaxEl3Mfwt2a3df7NsPQKhTkbA22Fm/Egx/6hxXDhGk7AoE0vIM9VraqU0kmGCni
> DnrxYRAIeCgCBIDblmLCw7X9mK4G0DES9QRSrwrhlqiEYKxOAIRrshO3KtCuWQdjSkRZec+kzwxk
> qi3XdCGb8sbS5CgtopSis1EGi6G680iUzji8NmJxFgX7z/Bg/INYSJpWUzjgSvvh/AmUKC2DJzwc
> KpVa6vHY70SgQkyR6rwya+gU9xHYMpuUPdc1KzHjhtrldRIi0lVODB9RQoj1mmFxqD4U0+EEWpjE
> e1wux0C1wZrZILOKpKidFaX3saWjEVYPIYSbLS0Liaus9J840YI0GQ2zXkkFoBZQ+Qjlw2Yqcjz7
> X6wO1EdNkx+XUPK19GCrrA4g8TwuM4YGvvtnmYt131EYG1jg9f7SHncldzd7dBLGO9DvJJNiqA8O
> 52ejVSxv+XBFiNHFN2fQJ8OtXmLKf7InFCazvoiU2a8D5fWEVxFUnPUS5VSHNvO4SwuWh9OfJ4YC
> dA66Fw4v5cffOEeZybGoIcswbl2OXlnWrXMpkaFkOIaRvYz+NKLTmmJg+WVeoZRYm2ikVqsHKai7
> lYGnf4qagoVriv3z5vYn6N7BfYIpLUj4CnkZgyKygZGOe5qT7pnA7/rLAUr2hF1lKyCQnUJBuzeg
> OWsP0T1EerIiW42hoFbwcEAe4N3gxnLzxaVXUWy5RqSzmb17AQAgogrgNdqALwA1ROecnhFERogO
> xA+kvQ4JOUnLjqB6ZLsLSIdHGIETkFCxdB67XegYathhixiY0mpme7synCrBX4MQOeGuAn5SYyFP
> aE0P4XFvt0CsLQxFOLuYRqajk5bB7cWTkt4mJs3gVsbyZmhA5JWgJUTQKAjM8hnhjJbPBJCQ1iZ5
> 82Ns66xwztfgW0RhEeEAFYl9sbUwXDrQpfr3pOpqYdgvDkq7MRXK8OgWKavFOJD1F3JFOFCQD0yt
> IQ==
>
>

Thanks for the patch!

However, I'm a bit reluctant to introducing new parameters such as
process-name to such a central function. Since process-name is
essentially used as an argument to make-network-process, maybe it
would be better if we replace the process-name parameter by a plist
which is passed to make-network-process containing :name.

What do you think?

-- 
Deniz Dogan



  reply	other threads:[~2011-01-15 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 18:23 [PATCH] rcirc.el (rcirc-connect): Make process name configurable Stefan Kangas
2011-01-15 11:14 ` Deniz Dogan [this message]
2011-01-16  0:20   ` Stefan Kangas

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=AANLkTinok_BFR8p2hmpiz+N8Oaz0xSGBz8W-fhohmRNk@mail.gmail.com \
    --to=deniz.a.m.dogan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=rcyeske@gmail.com \
    --cc=skangas@skangas.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.