From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Daniel Ortmann Newsgroups: gmane.emacs.devel Subject: Re: [dortmann@lsil.com: emacs customization suggestion: 'customize-existing'] Date: 06 Feb 2004 10:19:35 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076084900 16170 80.91.224.253 (6 Feb 2004 16:28:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Feb 2004 16:28:20 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Feb 06 17:28:05 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ap8pp-0007dK-00 for ; Fri, 06 Feb 2004 17:28:05 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ap8po-0006oy-00 for ; Fri, 06 Feb 2004 17:28:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ap8oL-0006fZ-0z for emacs-devel@quimby.gnus.org; Fri, 06 Feb 2004 11:26:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Ap8ni-0006dA-Ca for emacs-devel@gnu.org; Fri, 06 Feb 2004 11:25:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1Ap8nB-0006Sn-2r for emacs-devel@gnu.org; Fri, 06 Feb 2004 11:25:52 -0500 Original-Received: from [147.145.40.20] (helo=mail0.lsil.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Ap8iJ-0005dL-St for emacs-devel@gnu.org; Fri, 06 Feb 2004 11:20:20 -0500 Original-Received: from new-mhbs.co.lsil.com (mhbs.lsil.com [172.21.20.49]) by mail0.lsil.com (8.12.8/8.12.8) with ESMTP id i16GGuN2009372; Fri, 6 Feb 2004 08:16:56 -0800 (PST) Original-Received: from praxis.lsil.com ([147.145.140.88]) by new-mhbs.co.lsil.com (8.12.11/8.12.10) with ESMTP id i16GKBw2023319; Fri, 6 Feb 2004 09:20:11 -0700 Original-Received: from praxis.lsil.com (praxis [127.0.0.1]) by praxis.lsil.com (8.12.8/8.12.8) with ESMTP id i16GJawi002892; Fri, 6 Feb 2004 10:19:36 -0600 Original-Received: (from dortmann@localhost) by praxis.lsil.com (8.12.8/8.12.8/Submit) id i16GJZvr002888; Fri, 6 Feb 2004 10:19:35 -0600 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: Original-Lines: 45 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-Scanned-By: MIMEDefang 2.39 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19771 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19771 Can this be extended to handle the customization settings in a system wide way? storm@cua.dk (Kim F. Storm) writes: > > 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 http://www.cua.dk > -- Daniel Ortmann, LSI Logic, 3425 40th Av NW, Suite 200, Rochester MN 55901 work: Daniel.Ortmann@lsil.com / 507.535.3861 / 63861 int / 8012.3861 gdds home: ortmann@venturecs.net / 507.288.7732, 2414 30Av NW #D, Rochester MN 55901 gpg/pgp public key: http://wwwkeys.us.pgp.net jabber: daniel_ortmann@jabber.org / dortmann@jabber.co.lsil.com