Article View: gnu.emacs.help
Article #188694Re: Starting emacs as an icon in X?
From: karl.kleinpaste
Date: Wed, 26 Jun 1991 14:43
Date: Wed, 26 Jun 1991 14:43
53 lines
3098 bytes
3098 bytes
krawchuk@cpsc.UCalgary.ca writes:
I'd love to be able to start Gnu emacs as an icon in X.
Unfortunately, the -iconic flag is not supported,
Rather than using icons in their usual sense, I suggest using font
switching as a way of getting an emacs out of the way or bringing it
back up. Tie a mouse hit to a font switch and you have active-iconic
emacs, and you can see, e.g., compile activity in the window if you
like while actually being busy with something else that takes up most
of your screen. In .emacs, I have the following for this:
(if (equal window-system 'x)
(if (= window-system-version 11)
(progn
(setq active-icon-iconic nil)
(defun x-active-icon-toggle (arg)
"Toggles between the nil2 font and a 12pt font"
(interactive)
(if active-icon-iconic
(progn
(setq active-icon-iconic nil)
(x-set-font "*-courier-medium-r-*-*-*-120-*-*-*-*-*-*"))
(setq active-icon-iconic t)
(x-set-font "nil2")))
(require 'x-mouse)
;Active icon, point & mark
(define-key mouse-map x-button-left 'x-active-icon-toggle)
(define-key mouse-map x-button-middle 'x-mouse-set-point)
(define-key mouse-map x-button-right 'x-mouse-set-mark)
;Cut text
(define-key mouse-map x-button-s-left 'x-mouse-set-point)
(define-key mouse-map x-button-s-left-up 'x-cut-text)
(define-key mouse-map x-button-c-left 'x-cut-text)
;Paste text
(define-key mouse-map x-button-s-middle 'x-mouse-set-point)
(define-key mouse-map x-button-s-middle-up 'x-paste-text)
(define-key mouse-map x-button-c-middle 'x-paste-text)
;Cut & kill text
(define-key mouse-map x-button-s-right 'x-mouse-set-point)
(define-key mouse-map x-button-s-right-up 'x-cut-and-wipe-text)
(define-key mouse-map x-button-c-right 'x-cut-and-wipe-text)
;Window/Buffer manipulation
(define-key mouse-map x-button-m-left 'x-mouse-keep-one-window)
(define-key mouse-map x-button-m-middle 'x-mouse-select-and-split)
(define-key mouse-map x-button-m-right 'x-buffer-menu)
(x-active-icon-toggle nil))))
This causes emacs to start up in the smallified font. Hit it with
mouse-left and it springs up to a 12-pt font that I usually use.
Remove the last x-active-icon-toggle call, and it'll be ready to
smallify, but will start up in full-size mode.
--karl
Technical Details
Message-ID:
<1991Jun26.134624.15183@oar.net>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucunix.san.uc.edu!malgudi!osc.edu!karl.kleinpasteReferences:
<KRAWCHUK.91Jun25154409@fsd.cpsc.UCalgary.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103b8b,699d5e9cd2ffc26a X-Google-Attributes: gid103b8b,public X-Google-ArrivalTime: 1991-06-26 07:07:20 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!cis.ohio-state.edu!tut.cis.ohio-state.edu!ucunix.san.uc.edu!malgudi!osc.edu!karl.kleinpaste From: karl.kleinpaste@osc.edu Newsgroups: gnu.emacs.help Subject: Re: Starting emacs as an icon in X? Message-ID: <1991Jun26.134624.15183@oar.net> Date: 26 Jun 91 14:43:35 GMT References: <KRAWCHUK.91Jun25154409@fsd.cpsc.UCalgary.ca> Sender: news@oar.net Organization: Ohio Supercomputer Center, Viento Testbed Lines: 53 Nntp-Posting-Host: ashley.osc.edu