all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* terminal & X configuration
@ 2002-04-23 10:20 Luis O. Silva
  2002-04-23 18:36 ` Chuck Siska
  0 siblings, 1 reply; 3+ messages in thread
From: Luis O. Silva @ 2002-04-23 10:20 UTC (permalink / raw)


Dearest Emacs Community,

Would you please help me to know how I can have different
configurations of my Emacs for working in X and for
working on a terminal (emacs -nw), without having to call
different dot-files?

Thank you very much in advance.

Sincerely yours,
luis

-- 
Luis Octavio Silva P.
St. Petersburg State University.
66/3 Botanicheskaya St., Apt.119/2
Stary Peterhof
St. Petersburg, Russia.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: terminal & X configuration
  2002-04-23 10:20 terminal & X configuration Luis O. Silva
@ 2002-04-23 18:36 ` Chuck Siska
  2002-04-24 14:42   ` In reply to: " Luis O. Silva
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Siska @ 2002-04-23 18:36 UTC (permalink / raw)


luis --

i run the same .emacs file on unix, mswind95/98 and 
mswindnt.  it's done in 2 parts (although it can be
done in one part).  one part is to define a function 
to describe the system characteristics:

(message "Set my cs-what-env...")
(defun cs-what-env ()
  "Returns a string indicating what kind of environment emacs runs in.
'E.g., Windows_95', 'Windows_NT', 'X11_windows'."
  (interactive)
  (let ((doze32 (if (>= emacs-major-version 20) 'w32 'win32)))
    (cond ((eq window-system doze32)
           (or (getenv "OS") "Windows_95"))
          ((eq window-system 'x)
           (concat "X" window-system-version "_windows"))
          (t "Console"))))

the second part is to use the defined function to choose
what to do in a given circumstance:

(message "Set my fonts...")
(let ((sys-env (cs-what-env)))
  (cond
   ;;---------------------------------------- Unix ----
   ((string= "X11_windows" sys-env)
    (message "Set my X11_windows fonts...")
    (setq cs-default-font "5x8") 
    (setq initial-frame-alist
          (append '((width . 100)
                    (height . 50))
                  initial-frame-alist))
    (setq cs-default-font "5x8")
    )
   ;;---------------------------------------- MSwind ----
   ((or (string= "Windows_95" sys-env)
        (string= "Windows_NT" sys-env))
    (message "Set my MSwind fonts...")
    ; set font to terminal, regular, 6 point.
    (setq cs-default-font "-*-Terminal-normal-r-*-*-8-60-*-*-c-*-*-oem-")
    )
   (t nil)))

good luck.

-- chuck

"Luis O. Silva" wrote:
> 
> Dearest Emacs Community,
> 
> Would you please help me to know how I can have different
> configurations of my Emacs for working in X and for
> working on a terminal (emacs -nw), without having to call
> different dot-files?
> 
> Thank you very much in advance.
> 
> Sincerely yours,
> luis
> 
> --
> Luis Octavio Silva P.
> St. Petersburg State University.
> 66/3 Botanicheskaya St., Apt.119/2
> Stary Peterhof
> St. Petersburg, Russia.
> 
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

-- 
                                           |\_/\_.-'""``:-._       
What is life without looking for           . . `; -._      )-;-,_`)
the next cute little bug to play with?     v_,-    _  ),(,.\  ``-' 
                                          _.- _.,-_/ /  ((.'       
-- chuck.siska@conexant.com  `<}:..     ((,.-'   ((,/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* In reply to: Re: terminal & X configuration
  2002-04-23 18:36 ` Chuck Siska
@ 2002-04-24 14:42   ` Luis O. Silva
  0 siblings, 0 replies; 3+ messages in thread
From: Luis O. Silva @ 2002-04-24 14:42 UTC (permalink / raw)
  Cc: Help Gnu Emacs

Dear Chuck,

Thank you for your help. Indeed, I've already been advised to use the
variable "window-system".

Regards,
luis


-- 
Luis Octavio Silva P.
St. Petersburg State University.
66/3 Botanicheskaya St., Apt.119/2
Stary Peterhof
St. Petersburg, Russia.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-24 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-23 10:20 terminal & X configuration Luis O. Silva
2002-04-23 18:36 ` Chuck Siska
2002-04-24 14:42   ` In reply to: " Luis O. Silva

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.