* emacs ssh
@ 2006-07-25 23:57 Jurgen Sidgman
2006-07-26 19:44 ` A better way to factor custom-set-faces Denis Bueno
[not found] ` <mailman.4506.1153943128.9609.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Jurgen Sidgman @ 2006-07-25 23:57 UTC (permalink / raw)
I am sorry. I just solved the problem. It was a stupid mistake of mine.
--
---------------
Jürgen Sidgman
CBA 378
School of Accountancy
University of Nebraska-Lincoln
Phone: 402-472-3823
Email: sidgmanj1@unlnotes.unl.edu
^ permalink raw reply [flat|nested] 6+ messages in thread
* A better way to factor custom-set-faces
2006-07-25 23:57 emacs ssh Jurgen Sidgman
@ 2006-07-26 19:44 ` Denis Bueno
[not found] ` <mailman.4506.1153943128.9609.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Denis Bueno @ 2006-07-26 19:44 UTC (permalink / raw)
All--
Is there a better way than below [1] to conditionalise my one custom-set-faces call?
I use the same .emacs on several machines which are either OS X or Linux
machines. Currently I use different fonts on both machines. However, that is the
principal difference I'm trying to account for in conditionalising the calls to
custom-set-faces.
Is there a better way to accomplish what I'm trying to accomplish?
-Denis
[1]
;; This occurs at the end of my .emacs. Assume any free variable occurring
;; below has been properly defined.
(defvar linux-x-font-string "-*-clean-medium-r-normal--*-120-*-*-*-*-*-*")
(cond ((os-is "linux")
(set-default-font linux-x-font-string)
(push `(font . ,linux-x-font-string) default-frame-alist)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:stipple nil :background "black" :foreground "white"
:inverse-video nil :box nil
;; :strike-through nil
;; :overline nil :underline nil :slant normal
;; :weight normal :height 100 :width normal
;; :family "courier"
)))))
)
((os-is "darwin")
(push '(background-color . "grey") default-frame-alist)
(set-background-color "grey")
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
`(default ((t (:stipple nil :background "black" :foreground "white"
:inverse-video nil :box nil :strike-through nil :overline nil :underline nil
:slant normal :weight normal :height ,mac-font-height :width condensed :family
,mac-font-family))))
'(highlight ((((class color) (min-colors 88) (background dark))
(:background "navy"))))
'(slime-display-edit-face ((((class color) (background dark)) nil)))
'(trailing-whitespace ((((class color) (background dark)) (:background
"dark slate gray")))))))
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A better way to factor custom-set-faces (per OS)
[not found] ` <mailman.4506.1153943128.9609.help-gnu-emacs@gnu.org>
@ 2006-07-27 19:29 ` Colin S. Miller
2006-07-28 0:12 ` Denis Bueno
0 siblings, 1 reply; 6+ messages in thread
From: Colin S. Miller @ 2006-07-27 19:29 UTC (permalink / raw)
Denis Bueno wrote:
> All--
>
> Is there a better way than below [1] to conditionalise my one
> custom-set-faces call?
>
> I use the same .emacs on several machines which are either OS X or Linux
> machines. Currently I use different fonts on both machines. However,
> that is the principal difference I'm trying to account for in
> conditionalising the calls to custom-set-faces.
>
> Is there a better way to accomplish what I'm trying to accomplish?
>
>
Denis,
On XEmacs, which separates out the init.el and custom.el files, I use
(setq custom-file (concat "~/.xemacs/custom-" (symbol-name system-type) ".el"))
in my init.el (.emacs.el) so that the customisation file is different for
each OS I run XEmacs on.
See
http://www.gnu.org/software/emacs/manual/emacs.html#Saving-Customizations
for further details of how to get this to work for GNU Emacs. (Large file)
The page-at-time manual has this section missing, it should be referenced from
http://www.gnu.org/software/emacs/manual/html_node/Easy-Customization.html
but that leads to a 404 error.
HTH,
Colin S. Miller
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A better way to factor custom-set-faces (per OS)
2006-07-27 19:29 ` A better way to factor custom-set-faces (per OS) Colin S. Miller
@ 2006-07-28 0:12 ` Denis Bueno
2006-07-28 0:36 ` Denis Bueno
2006-07-28 9:29 ` Peter Dyballa
0 siblings, 2 replies; 6+ messages in thread
From: Denis Bueno @ 2006-07-28 0:12 UTC (permalink / raw)
Cc: help-gnu-emacs
Colin S. Miller wrote:
> Denis,
>
> On XEmacs, which separates out the init.el and custom.el files, I use
> (setq custom-file (concat "~/.xemacs/custom-" (symbol-name system-type)
> ".el"))
> in my init.el (.emacs.el) so that the customisation file is different for
> each OS I run XEmacs on.
>
This is a good suggestion; I am using a set-up like this now.
My only quibble is that my custom-set-variables form, and not just
custom-set-faces, ends up there, too. Is there a compelling reason that it
should be OS-specific? Currently all my custom-set-variables apply to both
platforms:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(auto-save-interval 100)
'(case-fold-search t)
'(column-number-mode t)
'(current-language-environment "English")
'(default-major-mode (quote text-mode))
'(global-auto-revert-mode t)
'(indent-tabs-mode nil)
'(inhibit-splash-screen t)
'(mark-even-if-inactive t)
'(org-agenda-files (quote ("~/org/school.org" "~/org/bscs.org"
"~/org/home.org" "~/org/jnp-verify.org" "~/org/phd.org" "~/org/manolios.org"
"~/org/abl.org")))
'(ring-bell-function (quote ignore) t)
'(save-place t nil (saveplace))
'(scroll-bar-mode (quote left))
'(show-paren-style (quote mixed))
'(show-trailing-whitespace nil)
'(transient-mark-mode t)
'(truncate-lines nil)
'(uniquify-buffer-name-style (quote forward) nil (uniquify)))
Is there an easy way to maintain all these variable settings across both custom
files?
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A better way to factor custom-set-faces (per OS)
2006-07-28 0:12 ` Denis Bueno
@ 2006-07-28 0:36 ` Denis Bueno
2006-07-28 9:29 ` Peter Dyballa
1 sibling, 0 replies; 6+ messages in thread
From: Denis Bueno @ 2006-07-28 0:36 UTC (permalink / raw)
Cc: help-gnu-emacs
Denis Bueno wrote:
> Colin S. Miller wrote:
>> Denis,
>>
>> On XEmacs, which separates out the init.el and custom.el files, I use
>> (setq custom-file (concat "~/.xemacs/custom-" (symbol-name
>> system-type) ".el"))
>> in my init.el (.emacs.el) so that the customisation file is different for
>> each OS I run XEmacs on.
>>
>
> This is a good suggestion; I am using a set-up like this now.
>
And for anyone who might be interested in this thread in the present/future, I
created ~/.emacs-custom-gtk.el & ~/.emacs-custom-carbon.el, put the correct
custom-set-faces in each, and included the following in my .emacs:
;; `custom-file' is treated specially by Emacs. See
;; http://www.gnu.org/software/emacs/manual/emacs.html#Saving-Customizations
(cond ((os-is "linux") (setq custom-file "~/.emacs-custom-gtk.el"))
((os-is "darwin") (setq custom-file "~/.emacs-custom-carbon.el")))
(message "Using custom-file: '%s'" custom-file)
(load custom-file)
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A better way to factor custom-set-faces (per OS)
2006-07-28 0:12 ` Denis Bueno
2006-07-28 0:36 ` Denis Bueno
@ 2006-07-28 9:29 ` Peter Dyballa
1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2006-07-28 9:29 UTC (permalink / raw)
Cc: emacs mailing list
Am 28.07.2006 um 02:12 schrieb Denis Bueno:
> My only quibble is that my custom-set-variables form, and not just
> custom-set-faces, ends up there, too. Is there a compelling reason
> that it should be OS-specific?
No, I don't think so.
I am living with a few Emacsen on Mac OS X, versions 20...23, and a
few window-systems. So I start with:
(defconst mEV (emacs-version)
"Keep the Emacs version string,
that is needed a few times.")
(defconst mWS (symbol-value 'window-system)
"Running as some windowing system's client,
or as slave of a terminal emulator?")
and become serious here:
(if (not (string-match "XEmacs" mEV))
(if (not (string-match "21.2" mEV))
(progn
;--- (desktop-load-default)
(setq history-length 250)
(setq desktop-globals-to-save '(desktop-missing-file-warning))
(setq desktop-dirname (format "~/.emacs.d/PDesktop-%d" emacs-major-
version))
(desktop-save-mode 1)
(require 'session)
(add-hook 'after-init-hook 'session-initialize)
(setq session-save-file-coding-system 'utf-8-unix)
(setq session-save-file (format "%s/Psession-%d" desktop-dirname
emacs-major-version))
(setq custom-file (format "~/.emacs-Abrichtung-%d.el" emacs-major-
version))
(if (string-match "Aquamacs" mEV)
(progn
(setq desktop-dirname "~/.emacs.d/PDesktop-Aqua")
(setq session-save-file (format "%s/Psession-Aqua" desktop-dirname))
(setq custom-file "~/.emacs-Abrichtung-AquaMacs.el")
))
(if (string-match "Step" mEV) ;; could become the default GNU Emacs
(progn
(setq desktop-dirname "~/.emacs.d/PDesktop-NS")
(setq session-save-file (format "%s/Psession-NS" desktop-dirname))
(add-hook 'dired-load-hook
(lambda ()
(load "dired-x")
;; Set dired-x global variables here. For example:
;; (setq dired-guess-shell-gnutar "gtar")
(setq dired-x-hands-off-my-keys nil)
))
(add-hook 'dired-mode-hook
(lambda ()
;; Set dired-x buffer-local variables here. For example:
(setq dired-omit-files-p t)
))
))
(setq desktop-path (list desktop-dirname))
; (desktop-change-dir desktop-dirname)
; (desktop-read desktop-dirname)
(load custom-file) ;;<<<<
(load (format "~/.emacs_%s" mWS)) ;;<<<<
; (add-hook 'write-file-hooks 'time-stamp)
(add-hook 'before-save-hook 'time-stamp)
(setq search-whitespace-regexp nil)
(desktop-lazy-complete)
; (setq search-spaces-regexp t)
)
)) ;; desktop is read automatically
So I have now:
-rw-r--r-- 1 pete pete 21464 26 Jul 14:54 .emacs
-rw-r--r-- 1 pete pete 175 19 Mai 2005 .emacs_shell
-rw-r--r-- 1 pete pete 27 8 Mär 13:52 .emacs_tcsh
-rw-r--r-- 1 pete pete 211 18 Nov 2005 .emacs_bash
-rw-r--r-- 1 pete pete 4988 25 Jun 16:54 .emacs-
Abrichtung-20.el
-rw-r--r-- 1 pete pete 6243 26 Jun 00:54 .emacs-
Abrichtung-21.el
-rw-r--r-- 1 pete pete 11362 23 Jul 22:11 .emacs-
Abrichtung-22.el
-rw-r--r-- 1 pete pete 7422 26 Jul 17:02 .emacs-
Abrichtung-23.el
-rw-r--r-- 1 pete pete 8913 23 Jul 23:25 .emacs-Abrichtung-
AquaMacs.el
-rw-r--r-- 2 pete pete 22656 24 Jul 00:53 .emacs_mac
-rw-r--r-- 1 pete pete 1939 8 Apr 12:45 .emacs_nil
-rw-r--r-- 2 pete pete 6550 23 Jul 21:30 .emacs_ns
-rw-r--r-- 2 pete pete 2298 24 Jul 00:02 .emacs_x
drwxr-xr-x 2 pete pete 68 25 Jun 16:00 .emacs.d/PDesktop-20
drwxr-xr-x 3 pete pete 102 22 Jul 14:57 .emacs.d/PDesktop-21
drwxr-xr-x 6 pete pete 204 27 Jul 10:37 .emacs.d/PDesktop-22
drwxr-xr-x 6 pete pete 204 26 Jul 23:26 .emacs.d/PDesktop-23
drwxr-xr-x 4 pete pete 136 23 Jul 23:07 .emacs.d/PDesktop-
Aqua
drwxr-xr-x 5 pete pete 170 25 Jul 13:04 .emacs.d/PDesktop-NS
-rw------- 1 pete pete 6277 26 Jul 23:26 .emacs.d/
PDesktop-23/.emacs.desktop
-rw------- 1 pete pete 457 24 Jul 00:56 .emacs.d/
PDesktop-23/.emacs.desktop-Mac
-rw------- 1 pete pete 36923 26 Jul 23:26 .emacs.d/
PDesktop-23/Psession-23
-rw------- 1 pete pete 170 24 Jul 00:56 .emacs.d/
PDesktop-23/Psession-Mac23
I am thinking of putting most of the .emacs files into the .emacs.d
directory and of re-organizing the use of desktop and session files.
Aquamacs Emacs is a GNU Emacs 22, and Emacs.app, which runs in the NS
window-system, is version 23.
For me the 'sorting' in versions is the first key, because there are
so many differences particularly in using non-ASCII encodings. Then I
add support for the different windowing systems and meanings of key
events and modifiers. Finally every Emacs has its own "environment"
based on session and desktop.
This design became necessary when Aquamacs Emacs introduced irregular
extensions, so that regular Emacsen would not launch. So I moved the
working set of customisations and faces into an external file and
copied that to supply a starting point for all. My Emacsen use
colours (in fringe, modeline, shell prompt) to distinguish them
easily. In tcsh I have an alias grepem that greps for the given
argument in the set of "customisation" files to see where differences
are.
--
Greetings
Pete
"A designer knows he has arrived at perfection not when there is no
longer anything to add, but when there is no longer anything to take
away."
-- Antoine de Saint-Exupéry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-07-28 9:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-25 23:57 emacs ssh Jurgen Sidgman
2006-07-26 19:44 ` A better way to factor custom-set-faces Denis Bueno
[not found] ` <mailman.4506.1153943128.9609.help-gnu-emacs@gnu.org>
2006-07-27 19:29 ` A better way to factor custom-set-faces (per OS) Colin S. Miller
2006-07-28 0:12 ` Denis Bueno
2006-07-28 0:36 ` Denis Bueno
2006-07-28 9:29 ` Peter Dyballa
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.