unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: Peter Oliver <p.d.oliver@mavit.org.uk>
Cc: emacs-devel@gnu.org
Subject: Re: Server port
Date: Sun, 24 Oct 2010 03:29:35 +0800	[thread overview]
Message-ID: <m1pqv0btcw.fsf@cam.ac.uk> (raw)
In-Reply-To: <alpine.LFD.2.00.1010231332510.3350@froglet.home.mavit.org.uk> (Peter Oliver's message of "Sat, 23 Oct 2010 19:44:51 +0100 (BST)")

On 2010-10-24 02:44 +0800, Peter Oliver wrote:
> Can this now be applied?  I have posted an updated patch to
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=854

I also proposed this in private email to Juanma but was turned down due
to security concern. This is what I used locally:

commit 014a288ac84b11453334397c77f439071fa138f2
Date:   Fri Aug 20 16:47:03 2010 +0100

    Make port number of emacs server customisable

	Modified lisp/server.el
diff --git a/lisp/server.el b/lisp/server.el
index 7e2c35a..50d08b0 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -112,6 +112,14 @@ If set, the server accepts remote connections; otherwise it is local."
   :version "22.1")
 (put 'server-host 'risky-local-variable t)
 
+(defcustom server-port t
+  "TCP socket port for the server process.
+If t use a random port number."
+  :group 'server
+  :type '(choice (const :tag "Random" t)
+		 (integer :tag "Port" 10007))
+  :version "24.1")
+
 (defcustom server-auth-dir (locate-user-emacs-file "server/")
   "Directory for server authentication files.
 
@@ -561,7 +569,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.")
 		       ;; The other args depend on the kind of socket used.
 		       (if server-use-tcp
 			   (list :family 'ipv4  ;; We're not ready for IPv6 yet
-				 :service t
+				 :service server-port
 				 :host (or server-host "127.0.0.1") ;; See bug#6781
 				 :plist '(:authenticated nil))
 			 (list :family 'local


Leo



  reply	other threads:[~2010-10-23 19:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.1.10.0808311533530.2934@froglet.home.mavit.org.uk>
2008-08-31 18:22 ` Server port Stefan Monnier
     [not found]   ` <alpine.LFD.1.10.0808312118210.2934@froglet.home.mavit.org.uk>
2008-09-01  3:02     ` Stefan Monnier
2010-10-23 18:44       ` Peter Oliver
2010-10-23 19:29         ` Leo [this message]
2010-10-23 19:38           ` Juanma Barranquero
2010-10-23 20:01             ` Leo
2010-10-24  1:11         ` Stefan Monnier
2010-10-24 16:48           ` Remote TCP server through ssh tunnel [Was: Re: Server port] Lluís
2010-10-24 21:50             ` Ken Raeburn
2010-10-25 12:50               ` Remote TCP server through ssh tunnel Lluís
2010-10-25 15:33                 ` Chad Brown
2010-10-25 16:28                 ` Stefan Monnier
2010-10-25 17:28                 ` Peter Oliver
2010-10-25 20:22                   ` Lluís
2010-10-26  4:05                     ` Ken Raeburn

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m1pqv0btcw.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=p.d.oliver@mavit.org.uk \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).