From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Allow specifying services as symbols? Date: Tue, 19 Oct 2010 20:07:46 +0200 Organization: Programmerer Ingebrigtsen Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1287511703 13347 80.91.229.12 (19 Oct 2010 18:08:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 18:08:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 19 20:08:22 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P8Gbm-0001ZG-9K for ged-emacs-devel@m.gmane.org; Tue, 19 Oct 2010 20:08:22 +0200 Original-Received: from localhost ([127.0.0.1]:46006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8Gbl-0000d6-NQ for ged-emacs-devel@m.gmane.org; Tue, 19 Oct 2010 14:08:21 -0400 Original-Received: from [140.186.70.92] (port=39675 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8GbW-0000HX-7p for emacs-devel@gnu.org; Tue, 19 Oct 2010 14:08:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8GbM-00075A-2E for emacs-devel@gnu.org; Tue, 19 Oct 2010 14:08:06 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:54524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8GbL-00074f-OL for emacs-devel@gnu.org; Tue, 19 Oct 2010 14:07:56 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P8GbJ-0001SD-Mr for emacs-devel@gnu.org; Tue, 19 Oct 2010 20:07:53 +0200 Original-Received: from cm-84.215.34.171.getinternet.no ([84.215.34.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Oct 2010 20:07:53 +0200 Original-Received: from larsi by cm-84.215.34.171.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Oct 2010 20:07:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 52 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.34.171.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEXf4OTs7OwdHR2np6vd 3uP4+Pbi4+fg4eXa2+ADAgPZKEQ8AAACY0lEQVQ4jVWTMY+jMBCFp7BwWgryA0i17dJQurAOWgp6 kDaeLb0S8lwZCQrX6fJv79mQZM9FEubjvTczBJpLnO+mqXHauOXLshxKSh/nNdUf9yZu3TzmM1A5 jMN384n643FpoynKDLIiCx7pXKJVoXoqcsJHBillNwMoz/FZTykxZrNkNa3NUc8p0cxVVpyX+AZ1 024UDqB+gXvTRioggdVXj4wXuLSb0iEN6Gx8h2dANmB2mjbbr5/1L2CTV0mn2Mf1JanRryWChHoo 4vr5Bu1NZxC3Pm7rMz4pNk9/EogWmsPrDmA3LTInhbXmGV9fmtiTkpCBUV7tHX8kACd3ACIFr/rj XtfYFXnvnNutNPX50SawdYXjIoPOGD41TXqK2OFNJEhwuSurJAGIGkQQidBuRUarNUmaBKwRIyGB mzIGITgtnGgh0TopbiTKEtayNunxiXg5ujJCC/a1n06HiSSDmOYw5oTqjZQnP4kv9q468mJOt8UK fAgXwnly6rQWrwQGITiF+rFEZdDFNCExYGQOWG74yZNrDIT7fUBDBS8FMnaFZo9S8CSdY/bM4q4D nfoOkV40M/YKowlOoRroa9NcBE6bs3CHD4DDP5F7DSlrmZg0SeFJSzEDuL8Gt3PBOm1JNCiFK8DM SlhSuvL4Dp02Sqr8fgiGnVyAwHj2flnUD14QADTLThwJ6eCQQFTtoETjGMx4oeDQESdBBhgbMT05 DSU7dz3AeGZcifUOX24J+5tOeBOHMwpozqXDrnqBnUw7OOo7GIfSZZ93faTjR3n+v34osqgs5+fF 0dWhqX6Vx/EffAJuGPlqH/kAAAAASUVORK5CYII= Mail-Copies-To: never X-Now-Playing: His Name Is Alive's _The Eclipse_: "The Eclipse" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:pbamjHiKcy0+9HaoeYVhyu7ILUU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131844 Archived-At: It was suggested that we should allow specifying port names (e.g., "imap") as symbols, too, in addition to strings and numbers. Any objections to something like the following? === modified file 'src/process.c' *** src/process.c 2010-10-08 10:14:47 +0000 --- src/process.c 2010-10-19 18:06:05 +0000 *************** *** 2977,2987 **** for a server process, it must be a valid name or address for the local host, and only clients connecting to that address will be accepted. ! :service SERVICE -- SERVICE is name of the service desired, or an ! integer specifying a port number to connect to. If SERVICE is t, ! a random port number is selected for the server. (If Emacs was ! compiled with getaddrinfo, a port number can also be specified as a ! string, e.g. "80", as well as an integer. This is not portable.) :type TYPE -- TYPE is the type of connection. The default (nil) is a stream type connection, `datagram' creates a datagram type connection, --- 2977,2988 ---- for a server process, it must be a valid name or address for the local host, and only clients connecting to that address will be accepted. ! :service SERVICE -- SERVICE is name of the service desired (a string ! or a symbol) or an integer specifying a port number to connect to. If ! SERVICE is t, a random port number is selected for the server. (If ! Emacs was compiled with getaddrinfo, a port number can also be ! specified as a string, e.g. "http", as well as an integer. This is ! not portable.) :type TYPE -- TYPE is the type of connection. The default (nil) is a stream type connection, `datagram' creates a datagram type connection, *************** *** 3313,3318 **** --- 3314,3323 ---- sprintf (portbuf, "%ld", (long) XINT (service)); portstring = portbuf; } + else if (SYMBOLP (service)) + { + portstring = SDATA (SYMBOL_NAME (service)); + } else { CHECK_STRING (service); -- (domestic pets only, the antidote for overdose, milk.) larsi@gnus.org * Lars Magne Ingebrigtsen