From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.help Subject: Re: Using the same custom file in two different OSes Date: Mon, 14 Jan 2013 19:46:01 +0100 Message-ID: References: <419D9CDD3C2740E3B0E0CDE556F7BD12@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1358189184 17838 80.91.229.3 (14 Jan 2013 18:46:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2013 18:46:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 14 19:46:38 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 1Tup3L-0005Nl-VJ for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 19:46:36 +0100 Original-Received: from localhost ([::1]:37957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tup35-0006sc-Lc for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 13:46:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tup2v-0006r5-5X for help-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:46:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tup2o-0006MF-Nf for help-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:46:09 -0500 Original-Received: from mail-oa0-f54.google.com ([209.85.219.54]:44356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tup2o-0006M3-JA for help-gnu-emacs@gnu.org; Mon, 14 Jan 2013 13:46:02 -0500 Original-Received: by mail-oa0-f54.google.com with SMTP id n9so4269710oag.41 for ; Mon, 14 Jan 2013 10:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=j1uJSUyU1r0ecO9H5eHTNd3yD8jz7qnGURqT5R8l/UM=; b=AF2ESAQJLzritOqifaOkNCf1MsMvNFPELDklAkuqmjp1j0vp0bVbfARPPi1caEM/p7 SpgpdgcsfX2613N/A8FbQ93GzaYE+1wCERLHtOUXTfYqltx4ThsHgYLwdAXGfW6SL0mP QpcYpleuOWPbRRjdGjdl5OOIHS6LsLwmpntEGjN3nBT4rtaJI0y6tXKf+Iq6TU9sgrhE jBal4a7clrZ17lSajdDtx/aaEax02H8FbqqoOQdaIk3yJwJvfCApzJrLCvMGLhVbjuql H4hpExDj3Ikw2C/YZMvTVnLv7Pv5u+WIpWWiA+U8JyYDa585NDwNgymeMGck2Us5j5oI aXfQ== Original-Received: by 10.182.144.7 with SMTP id si7mr53801534obb.94.1358189161538; Mon, 14 Jan 2013 10:46:01 -0800 (PST) Original-Received: by 10.60.11.39 with HTTP; Mon, 14 Jan 2013 10:46:01 -0800 (PST) In-Reply-To: <419D9CDD3C2740E3B0E0CDE556F7BD12@us.oracle.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.219.54 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:88613 Archived-At: > 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.) Yes, that's how I have it. > 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 ...)) That works, but I've observed that each time I save any customization, my custom file is regenerated with _all_ the customization loaded at that time, and the platform-specific stuff that I removed from my custom file is then reinserted. Therefore, in my init file I must put the platform-specific customization _after_ the loading of the custom file: (setq custom-file "my-custom-file.el") (load custom-file) (if (eq system-type 'windows-nt) (custom-set-faces ) (custom-set-faces ) Thank you so much for your help. -- Dani Moncayo