unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: [dortmann@lsil.com: emacs customization suggestion: 'customize-existing']
Date: 06 Feb 2004 16:55:24 +0100	[thread overview]
Message-ID: <m3n07wjj83.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1Ap6Fv-0007St-Ny@fencepost.gnu.org>


> Problem Solved:
> 
>     Moving a laptop between the office and home requires customization
>     changes in gnus, for example.  The variables which need to change
>     are in different groups, however, and are hard to find.


For that specific problem, I use the following code snippet at the
top of my .emacs file:

[At home my laptop gets an IP address in the 10.22.33 subnet;
 while at work, I get something else]

(setq at-home-p
      (if (fboundp 'network-interface-info)
	  (let* ((info (network-interface-info "eth0"))
		 (ip (and info (car info))))
	    (and ip
		 (= (aref ip 0) 10)
		 (= (aref ip 1) 22)
		 (= (aref ip 2) 33)))))

Then I simply add tests 

 (if at-home-p ...home_setup...   ...work_setup...)

around settings (like which SMTP server to use) that differs
at home and at work.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2004-02-06 15:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-06 13:42 [dortmann@lsil.com: emacs customization suggestion: 'customize-existing'] Richard Stallman
2004-02-06 15:55 ` Kim F. Storm [this message]
2004-02-06 16:19   ` Daniel Ortmann
2004-02-06 23:40     ` Kim F. Storm
2004-02-06 23:30 ` Kevin Rodgers
2004-02-08 15:21   ` Richard Stallman
2004-02-09 18:11     ` Per Abrahamsen
2004-02-10 12:44       ` Richard Stallman
2004-02-10 13:44         ` Per Abrahamsen
2004-02-10 19:04           ` Kevin Rodgers
2004-02-11 11:16             ` Per Abrahamsen
2004-02-11 14:58             ` Richard Stallman
2004-02-12 15:25               ` Per Abrahamsen
2004-02-12 17:11                 ` Kim F. Storm
2004-02-14 17:17                 ` Richard Stallman
2004-02-18 15:23                   ` Per Abrahamsen
2004-02-18 15:41                     ` Jason Rumney
2004-02-19 16:02                       ` Per Abrahamsen
2004-02-19 17:45                         ` Reiner Steib
2004-02-20 13:42                         ` Richard Stallman
2004-02-18 17:03                     ` Kim F. Storm
2004-02-18 23:39                     ` Richard Stallman

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=m3n07wjj83.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /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).