From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Using the same custom file in two different OSes Date: Sun, 13 Jan 2013 14:18:54 -0800 Message-ID: <419D9CDD3C2740E3B0E0CDE556F7BD12@us.oracle.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358115560 32045 80.91.229.3 (13 Jan 2013 22:19:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2013 22:19:20 +0000 (UTC) To: "'Dani Moncayo'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 13 23:19:37 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TuVtx-0002iO-3h for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Jan 2013 23:19:37 +0100 Original-Received: from localhost ([::1]:32955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuVtg-0008Rh-UF for geh-help-gnu-emacs@m.gmane.org; Sun, 13 Jan 2013 17:19:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuVtT-0008RZ-F8 for help-gnu-emacs@gnu.org; Sun, 13 Jan 2013 17:19:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuVtR-0008B3-Ut for help-gnu-emacs@gnu.org; Sun, 13 Jan 2013 17:19:07 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:28975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuVtR-0008Az-On for help-gnu-emacs@gnu.org; Sun, 13 Jan 2013 17:19:05 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0DMJ3Xb027951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 13 Jan 2013 22:19:04 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0DMJ3rq024371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 13 Jan 2013 22:19:03 GMT Original-Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r0DMJ23c019520; Sun, 13 Jan 2013 16:19:02 -0600 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 13 Jan 2013 14:19:02 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3x2WNQgCm5edY3SnuRhK1cqJfs1AAAXDkg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88602 Archived-At: > I'd like to use the same Emacs custom file in two different OSes: > MS-Windows and Ubuntu, but I have one problem: I want to define the > :family property of the `default' and `variable-pitch' faces based on > the `system-type' (because my favorite family on MS-Windows isn't > available on Ubuntu and vice-versa), but without having to duplicate > my custom file (one for each system-type), so that I can tweak my > customization at any time, in any OS, and get an updated custom file > that is still valid for both OSes. > > Is there a way to achieve that goal? If so, how? With a single `custom-file', using Customize, no, I don't think so. But you can do it using Lisp, in your init file (~/.emacs). (Use a separate `custom-file' for the stuff that Customize manages. Keep your init file for Lisp that you manage.) Try first using Customize on each of the platforms separately, to see what values it gives you for those faces, for the automatically generated `custom-set-faces' sexp. Then remove the settings for those exceptional faces from `custom-file', moving them to your init file instead and wrapping them with (custom-set-faces ...): (if (eq system-type 'windows-nt) (custom-set-faces ...) (custom-set-faces ...))