From: Barry Margolin <barmar@alum.mit.edu>
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 [thread overview]
Message-ID: <barmar-172938.21222026072004@comcast.dca.giganews.com> (raw)
In-Reply-To: mailman.1631.1090886583.1960.help-gnu-emacs@gnu.org
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 ***
next prev parent reply other threads:[~2004-07-27 1:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1622.1090879447.1960.help-gnu-emacs@gnu.org>
2004-07-26 23:11 ` OS X (or other OS's): how to get a fully-qualified domain name? Kevin Rodgers
2004-07-26 23:59 ` John Owens
[not found] ` <mailman.1631.1090886583.1960.help-gnu-emacs@gnu.org>
2004-07-27 1:22 ` Barry Margolin [this message]
2004-07-27 1:37 ` John Owens
[not found] ` <mailman.1641.1090892436.1960.help-gnu-emacs@gnu.org>
2004-07-27 15:16 ` Stefan Monnier
2004-07-27 17:03 ` John Owens
[not found] ` <mailman.1759.1090947989.1960.help-gnu-emacs@gnu.org>
2004-07-27 18:06 ` Stefan Monnier
2004-07-27 18:29 ` John Owens
[not found] ` <mailman.1770.1090954587.1960.help-gnu-emacs@gnu.org>
2004-07-27 19:46 ` Stefan Monnier
2004-07-27 20:30 ` John Owens
2004-07-27 19:48 ` Kevin Rodgers
2004-07-27 20:49 ` John Owens
2004-07-26 21:59 John Owens
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=barmar-172938.21222026072004@comcast.dca.giganews.com \
--to=barmar@alum.mit.edu \
/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.
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).