github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

rmm5t / maxframe-el

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 4
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

[Elisp] maxframe provides the ability to maximize the emacs frame and stay within the display resolution. — Read more

  cancel

http://www.emacsblog.org/2007/02/22/maximize-on-startup-part-2/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Removed comment about limitations that no longer exist in Emacs 22+ 
rmm5t (author)
Tue Jan 26 09:29:03 -0800 2010
commit  27beb9a59a33a3a7e2de1db63c5140fad6ba4f4d
tree    a54b4d6274021dcd247a168e65e9a30cddaf7739
parent  4eeb0b11b9af28b56fa77422589a33904667a00d
maxframe-el /
name age
history
message
file README.markdown Thu Feb 19 17:55:11 -0800 2009 Readme -> markdown [rmm5t]
file maxframe.el Tue Jan 26 09:29:38 -0800 2010 Removed comment about limitations that no longe... [rmm5t]
README.markdown

Purpose

maxframe provides the ability to maximize the emacs frame and stay within the display resolution.

Usage

Example of lines to be added to your .emacs:

(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)

If using two framebuffers (monitors), it might be necesssary to specify a mf-max-width value set to the pixel width of main framebuffer. This is necessary because emacs does not yet support sniffing different framebuffers. Example:

(require 'maxframe)
(setq mf-max-width 1600)  ;; Pixel width of main monitor.
(add-hook 'window-setup-hook 'maximize-frame t)

To restore the frame to it's original dimensions, call restore-frame:

M-x restore-frame

How it works

puts the emacs frame in the top left corner of the display and calculates the maximum number of columns and rows that can fit in the display

Limitations

Requires Emacs 22 (for fringe support), but maximize-frame still works under Emacs 21 on Windows.

Emacs does not recognize when the display's resolution is changed. This is a problem because I would like to be able to re-maximize the frame after connecting to a display with different resolution. Unfortunately, display-pixel-width and display-pixel-height yield the display resolution values from when emacs was started instead of the current display values. Perhaps there's a way to have emacs re-sniff these values, but I'm not yet sure how.

Credits

The w32 specific functions were borrowed from the Emacs Manual: http://www.gnu.org/software/emacs/windows/big.html#windows-like-window-ops

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server