3/11/2014

Weird function in Emacs 24.4: x-display-pixel-width

When you use two or more monitors, Mac, Emacs 24.4, actually it's Emacs 24.3.50.3.

You will find weird behavior about the function: x-display-pixel-width.

In Emacs 24.4, the function return the width of your all monitors.

This is the description in Emacs 24.4:
x-display-pixel-width is a built-in function in `C source code'.
(x-display-pixel-width &optional TERMINAL)
Return the width in pixels of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On "multi-monitor" setups this refers to the pixel width for all
physical monitors associated with TERMINAL.  To get information for
each physical monitor, use `display-monitor-attributes-list'.

This is the description in Emacs 24.3:
x-display-pixel-width is a built-in function in `C source code'.
(x-display-pixel-width &optional DISPLAY)
Return the width in pixels of the Nextstep display DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame, a display name (a string), or terminal ID.
If omitted or nil, that stands for the selected frame's display.

3/08/2014

Install Emacs from homebrew, Mac user only

For brand new install, just run this 4 lines in shell:

brew install --cocoa --srgb emacs
ln -s /usr/local/Cellar/emacs/24.3/Emacs.app /Applications/Emacs.app
ln -s /usr/local/Cellar/emacs/24.3/bin/emacs /usr/local/bin
ln -s /usr/local/Cellar/emacs/24.3/bin/emacsclient /usr/local/bin

Please make sure that "/usr/local/bin" before "/usr/bin" in your $PATH