help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS X (or other OS's): how to get a fully-qualified domain name?


From: Barry Margolin
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
User-agent: MT-NewsWatcher/3.4 (PPC Mac OS X)

In article <mailman.1631.1090886583.1960.help-gnu-emacs@gnu.org>,
 John Owens <john_owens@yahoo.com> wrote:

> Kevin Rodgers <ihs_4664 <at> 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 ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]