From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: OS X (or other OS's): how to get a fully-qualified domain name? Date: Mon, 26 Jul 2004 21:22:20 -0400 Organization: Symantec Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <41058F9A.90905@yahoo.com> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1090891695 30089 80.91.224.253 (27 Jul 2004 01:28:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Jul 2004 01:28:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 27 03:28:04 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BpGlA-0000uI-00 for ; Tue, 27 Jul 2004 03:28:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BpGoE-00072W-5L for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jul 2004 21:31:14 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!news.ks.uiuc.edu!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 26 Jul 2004 20:22:21 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) X-Copies-To: never Original-Lines: 33 Original-NNTP-Posting-Host: 24.128.26.140 Original-X-Trace: sv3-2G9fiYYqyv38Dug9FGbRwX+nlAZqEXEfUy198j5xFkvfK7XKaHo7WbOogZBRvE6HBGbUanYR+EACYOn!96RHZM2BlzbY+XY2QWqPPL1NBVOPBbHZpg84TDz7BqiNMd2D0eOVzr7IeW12fOCo62thqWo/DBch!VIg+kGMSWlo= Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.13 Original-Xref: shelby.stanford.edu gnu.emacs.help:124479 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19815 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19815 In article , John Owens wrote: > Kevin Rodgers yahoo.com> writes: > > John Owens wrote: > > > What would be ideal is if I could use the system-name function to > > > dynamically return where I am (since if I run emacs at home, then go > > > to work, plug it in, and use emacs there, I'd like emacs to use the > > > work machine's domain name, not the one from home). > > > > C-h v user-mail-address > > C-h v mail-host-address > > Unfortunately, neither of these is dynamic (at least I don't think so - I > just set them statically in .emacs). > > > To get the domain name in Emacs on Unix, try this: > > > > (shell-command-to-string "awk '/^domain/ {printf $2}' /etc/resolv.conf") > > Also unfortunately, OS X doesn't give a FQDN (in mine, it just says > sbcglobal.net > which is my domain but not my hostname). > > Any thoughts on doing any of this dynamically? It's pretty unusual to want to put the machine name in your email address. Are you sure this is what you really want? -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***