all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Frames: selectively enabling GUI
@ 2007-08-16 17:52 Joel J. Adamson
  2007-08-16 19:33 ` Tassilo Horn
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Joel J. Adamson @ 2007-08-16 17:52 UTC (permalink / raw)
  To: help-gnu-emacs

Howdy Friends,

I've discovered how cool it is to have a "work frame" on one virtual
desktop in KDE, that is a full-screen frame with no menu-bar,
scroll-bar, toolbar or frame boundary.  It looks like a console, but
with better color rendering (try it out).  NOTE: this is using KDE's
full-screen functionality, not the Emacs command-line option
--full-screen.

However, on my "home" workspace, I also keep two frames with Gnus and
my diary.  In those frames I'd like to have the menu-bar at the
least.  I've been mucking about with make-variable-frame-local, but
the problem I'm having is controlling the modes from within a function
(perhaps a hook).  I just don't know where to go from
make-variable-frame-local --- can I even make a mode frame-local?
What's the relationship between a mode and a variable?

Has anyone found a way to do this already?

Thanks,
Joel
-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

"It can be interesting to study ancient philosophy, but more as a kind
of accident report than to teach you anything useful."
                                        --Paul Graham
					http://www.paulgraham.com/raq.html

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

* Re: Frames: selectively enabling GUI
  2007-08-16 17:52 Frames: selectively enabling GUI Joel J. Adamson
@ 2007-08-16 19:33 ` Tassilo Horn
  2007-08-16 20:15 ` Daniel Jensen
  2007-08-17  7:19 ` Frames: selectively enabling GUI Emilio Lopes
  2 siblings, 0 replies; 5+ messages in thread
From: Tassilo Horn @ 2007-08-16 19:33 UTC (permalink / raw)
  To: help-gnu-emacs

jadamson@partners.org (Joel J. Adamson) writes:

Hi Joel,

> I just don't know where to go from make-variable-frame-local --- can I
> even make a mode frame-local?  What's the relationship between a mode
> and a variable?

Most of the time a variable indicates if a mode is active, but in
general setting the variable won't toggle the mode.

> Has anyone found a way to do this already?

`M-x apropos RET scroll-bar RET' pointed me to

,----[ C-h f toggle-scroll-bar RET ]
| toggle-scroll-bar is an interactive compiled Lisp function in
| `scroll-bar.el'.
| (toggle-scroll-bar ARG)
| 
| Toggle whether or not the selected frame has vertical scroll bars.
| With arg, turn vertical scroll bars on if and only if arg is positive.
| The variable `scroll-bar-mode' controls which side the scroll bars are
| on when they are turned on; if it is nil, they go on the left.
`----

That's exactly what you're looking for. :-)

Bye,
Tassilo
-- 
My work on  free software is motivated by  an idealistic goal: spreading
freedom and  cooperation. I want  to encourage free software  to spread,
replacing proprietary  software that forbids cooperation,  and thus make
our society better. (Richard M. Stallman)

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

* Re: Frames: selectively enabling GUI
  2007-08-16 17:52 Frames: selectively enabling GUI Joel J. Adamson
  2007-08-16 19:33 ` Tassilo Horn
@ 2007-08-16 20:15 ` Daniel Jensen
  2007-08-16 21:30   ` Frames: selectively enabling GUI [SOLVED!] Joel J. Adamson
  2007-08-17  7:19 ` Frames: selectively enabling GUI Emilio Lopes
  2 siblings, 1 reply; 5+ messages in thread
From: Daniel Jensen @ 2007-08-16 20:15 UTC (permalink / raw)
  To: help-gnu-emacs

jadamson@partners.org (Joel J. Adamson) writes:

>     I've been mucking about with make-variable-frame-local, but
> the problem I'm having is controlling the modes from within a function
> (perhaps a hook).  I just don't know where to go from
> make-variable-frame-local --- can I even make a mode frame-local?

There are frame parameters for this. See the Elisp manual and/or have a
look at the source code for `menu-bar-mode', `toggle-scroll-bar' etc.

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

* Re: Frames: selectively enabling GUI [SOLVED!]
  2007-08-16 20:15 ` Daniel Jensen
@ 2007-08-16 21:30   ` Joel J. Adamson
  0 siblings, 0 replies; 5+ messages in thread
From: Joel J. Adamson @ 2007-08-16 21:30 UTC (permalink / raw)
  To: help-gnu-emacs

daniel@bigwalter.net (Daniel Jensen) writes:

> jadamson@partners.org (Joel J. Adamson) writes:
>
>>     I've been mucking about with make-variable-frame-local, but
>> the problem I'm having is controlling the modes from within a function
>> (perhaps a hook).  I just don't know where to go from
>> make-variable-frame-local --- can I even make a mode frame-local?
>
> There are frame parameters for this. See the Elisp manual and/or have a
> look at the source code for `menu-bar-mode', `toggle-scroll-bar' etc.

Here's the solution:

**********************************************************************
(defun gnus-frame-defaults ()
  (mapc 'make-variable-frame-local
	 '(height width menu-bar-lines tool-bar-lines vertical-scroll-bars))
  (modify-frame-parameters '() '((height . 40)
				 (width . 136)
				 (menu-bar-lines . 1)
				 (tool-bar-lines . 1)
				 (vertical-scroll-bars . 1))))
(add-hook 'gnus-group-mode-hook 'gnus-frame-defaults)
**********************************************************************

I am writing this now in a fully-tooled, fully-scrolled and
menu-ridden frame.  My other frames are untouched.

Thanks for your help,
Joel


-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

"It can be interesting to study ancient philosophy, but more as a kind
of accident report than to teach you anything useful."
                                        --Paul Graham
					http://www.paulgraham.com/raq.html

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

* Re: Frames: selectively enabling GUI
  2007-08-16 17:52 Frames: selectively enabling GUI Joel J. Adamson
  2007-08-16 19:33 ` Tassilo Horn
  2007-08-16 20:15 ` Daniel Jensen
@ 2007-08-17  7:19 ` Emilio Lopes
  2 siblings, 0 replies; 5+ messages in thread
From: Emilio Lopes @ 2007-08-17  7:19 UTC (permalink / raw)
  To: help-gnu-emacs

Joel J Adamson writes:

> I've discovered how cool it is to have a "work frame" on one virtual
> desktop in KDE, that is a full-screen frame with no menu-bar,
> scroll-bar, toolbar or frame boundary.  It looks like a console, but
> with better color rendering (try it out).  [...]

I use ratpoison as my window manager (keyboard driven, no window
decorations) and turned off menus, scroll bars, etc. in Emacs.

> However, on my "home" workspace, I also keep two frames with Gnus and
> my diary.  In those frames I'd like to have the menu-bar at the
> least. [...]

I've bound "<down-mouse-3>" to `mouse-major-mode-menu'.  In this way I
still have the major mode menu at my disposal but no menu bar taking
up valuable screen space.

-- 
Emílio C. Lopes
Munich, Germany

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

end of thread, other threads:[~2007-08-17  7:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16 17:52 Frames: selectively enabling GUI Joel J. Adamson
2007-08-16 19:33 ` Tassilo Horn
2007-08-16 20:15 ` Daniel Jensen
2007-08-16 21:30   ` Frames: selectively enabling GUI [SOLVED!] Joel J. Adamson
2007-08-17  7:19 ` Frames: selectively enabling GUI Emilio Lopes

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.