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: John Owens
Subject: Re: OS X (or other OS's): how to get a fully-qualified domain name?
Date: Mon, 26 Jul 2004 23:59:29 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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? 

JDO







reply via email to

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