From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Barker Newsgroups: gmane.emacs.devel Subject: Re: PATCH: Add the ability to give rcirc servers an alias name Date: Wed, 16 Dec 2015 12:29:09 +0000 Message-ID: References: <877flsgut2.fsf@gmail.com> <1447008724.187480.432504041.0E012C01@webmail.messagingengine.com> <1450246571.999218.468767129.1BD269CA@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113e8c669792230527030db0 X-Trace: ger.gmane.org 1450268982 17296 80.91.229.3 (16 Dec 2015 12:29:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Dec 2015 12:29:42 +0000 (UTC) Cc: Leo Liu , Artur Malabarba , emacs-devel@gnu.org To: Ryan Yeske Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 16 13:29:37 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a9BD2-0008Op-3Q for ged-emacs-devel@m.gmane.org; Wed, 16 Dec 2015 13:29:32 +0100 Original-Received: from localhost ([::1]:46887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9BD1-0000v2-GK for ged-emacs-devel@m.gmane.org; Wed, 16 Dec 2015 07:29:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9BCi-0000uv-I1 for emacs-devel@gnu.org; Wed, 16 Dec 2015 07:29:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9BCh-00082U-4L for emacs-devel@gnu.org; Wed, 16 Dec 2015 07:29:12 -0500 Original-Received: from mail-ig0-x235.google.com ([2607:f8b0:4001:c05::235]:37454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9BCg-00082H-Sm for emacs-devel@gnu.org; Wed, 16 Dec 2015 07:29:11 -0500 Original-Received: by mail-ig0-x235.google.com with SMTP id to18so45333259igc.0 for ; Wed, 16 Dec 2015 04:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kzar-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6EdFpRA3q/mUfLrq8QIyi5xHp5iFkjIpo7pyzl2TJw4=; b=QAuA/CH1Q3OIGbHsjqJhRlpcTPfMb65PNgRHrOeAZEGStglq3lf5Z2BfZf5kBIeEGk fE0TEULN4OPsy/4xA6X5WaZC0AafCy13xtMslyWE9zo5mom5LF+MZ2l3nCblNUhzZ1kd k/oJj8Sewqes3V8oHT1f8xY4RHmeEOCi4XmoEx3/XhCgFsVztso2WLfW9kCGPnvIYBon b+aqpMY6lY58g3OmfvIb6bSIFp9XQgRz3A+KXNDPFmIw6NbIkLL6yZAwWXJcY/ldFuhN x2rWjP/HeI6GhAocyWIeGFq23FebTmp4TRww7ecCrevMlJ67bysm0eBF6dydOLIN7PgL 605Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6EdFpRA3q/mUfLrq8QIyi5xHp5iFkjIpo7pyzl2TJw4=; b=fTSL4U0O4immls+y91Or4sOx8i40MoYJI/ArI1j6ZVvMA6ZeOtVbSQm2q8/Ic34Zxw KtUZ6gNga+ysy3WTLm8ORwYBHILEKWgxQoQy5OOcpWaT99AVl4t7DawJAfAA7VFZ5EVC H566ADB1LOGRgKNZcMwWVr5abPm47+FfjiGFVgg1Oh1JZilSQGp8x4Jwt+XO6siBGtmu lV26UKt6ClwTC4ZJpz1VZn/weDgrfV7eXszZ/+Raj127CYrl9pCrUj2at08eSSF8Eddp 4342Q+d48JT5ltu/rsIAjCfVryRubvFeTPZgES8Sv07cuZVHAM1nkfvFogBMAFZ29zf/ 2wfw== X-Gm-Message-State: ALoCoQmtmeRCM4U9yK52h3YAW4arIEMNQHgccjxxzSjNTlPSDbbZQZmf8qqByu8rCM1NFru5/B+8+V0jBlwQNRhL8UUh/Haezw== X-Received: by 10.107.15.139 with SMTP id 11mr10751891iop.66.1450268949960; Wed, 16 Dec 2015 04:29:09 -0800 (PST) Original-Received: by 10.107.38.130 with HTTP; Wed, 16 Dec 2015 04:29:09 -0800 (PST) In-Reply-To: <1450246571.999218.468767129.1BD269CA@webmail.messagingengine.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c05::235 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196366 Archived-At: --001a113e8c669792230527030db0 Content-Type: text/plain; charset=UTF-8 Thanks for taking a look Ryan. I agree that `(or server-alias server)` shows up quite frequently. I don't think creating a function server-or-alias would help however as in all cases both the `server` and `server-alias` variables are local to the function (`rcirc` and `rcirc-connect`), so we would have to pass them through. In other words we would be replacing `(or server-alias server)` with something like `(server-or-alias server server-alias)`! I could let a new local variable `server-or-alias` in both functions if you think that would look nicer? As for the automatic server alias, I'm undecided. I think _usually_ the desired behaviour is to just warn the user that server X is already connected if she/he attempt to connect again. That's certainly how I use rcric, for example I might have only lost connection to one of four servers but I would still just call `rcirc` to reconnect to that one. I'm struggling to think of many use cases where connecting multiple times is required, and perhaps it's good for those that the alias needs to be defined manually? Cheers, Dave. On Wed, Dec 16, 2015 at 6:16 AM, Ryan Yeske wrote: > Hi Dave, > > I got a chance to review this. It works fine for me here. > > I think it might be good to replace the several instances of `(or > server-alias server)' with calls to a new function `rcirc-server-or-alias`. > > Also, what about automatically creating this alias when connecting to a > server multiple times, without requiring the user to come up with an > alias? Like automatically creating the server name `*irc.freenode.net*' > and `*irc.freenode.net<1>'. This would only happen if disambiguating > aliases were not provided via your new mechanism. > > What do you think? > > Ryan > > --001a113e8c669792230527030db0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for taking a look Ryan.

I agree that `(or server-alias server)` shows up quite frequently.
=

I don't think creating a function server-or-alias w= ould help however as in all
cases both the `server` and `server-a= lias` variables are local to the function
(`rcirc` and `rcirc-con= nect`), so we would have to pass them through. In other
words we = would be replacing `(or server-alias server)` with something like
`(server-or-alias server server-alias)`! I could let a new local variable<= /div>
`server-or-alias` in both functions if you think that would look = nicer?

As for the automatic server alias, I'm = undecided. I think _usually_ the desired
behaviour is to just war= n the user that server X is already connected if she/he
attempt t= o connect again. That's certainly how I use rcric, for example I might<= /div>
have only lost connection to one of four servers but I would stil= l just call
`rcirc` to reconnect to that one. I'm struggling = to think of many use cases
where connecting multiple times is req= uired, and perhaps it's good for those
that the alias needs t= o be defined manually?

Cheers, Dave.

On Wed, Dec 16, 2015 at 6= :16 AM, Ryan Yeske <ryan@ryanyeske.com> wrote:
Hi Dave,
=C2=A0
I got a chance to review this.=C2=A0 It works fine for me here.
=C2=A0
I think it might be good to replace the several instances of `(or serv= er-alias server)' with calls to a new function `rcirc-server-or-alias`.=
=C2=A0
Also, what about automatically creating this alias when connecting to = a server multiple times, without requiring the user to come up with an alia= s?=C2=A0 Like automatically creating the server name `*irc.freenode.net*' and `*irc.freenode.net<1>= ;'.=C2=A0 This would only happen if disambiguating aliases were not pro= vided via your new mechanism.
=C2=A0
What do you think?
<= /font>
=C2=A0
Ryan
=C2=A0
--001a113e8c669792230527030db0--