emacs + chrome

99 views
Skip to first unread message

William Stein

unread,
Jul 12, 2013, 10:16:40 AM7/12/13
to sage-...@googlegroups.com
Hi,

I've added this FAQ [1] entry, for those who want to use emacs in
https://cloud.sagemath.com:

### Question: I would like to use Emacs in a Terminal on Chrome. Help!

Chrome absolutely doesn't allow normal web applications to intercept
certain keystrokes, which
makes Emacs-in-a-terminal horrible. E.g., Ctrl-N brings up a new
window, instead of going
to the next line! (It is possible to eventually get around this by
creating a Chrome extension,
but I haven't done this yet.) In the meantime, you can [install the
Sagemath Cloud
chrome app](https://chrome.google.com/webstore/detail/the-sagemath-cloud/eocdndagganmilahaiclppjigemcinmb)
from the app store or on linux, type
`google-chrome --app=https://cloud.sagemath.com`
to local the website as an app (if you use chromium instead, type
`chromium-browser --app=https://cloud.sagemath.com`).

This is not a completely solution since in some cases,
control-shift-minus and control-shift-plus still zoom in and out (on
ChromeOS they
zoom the entire desktop -- every window, all icons, the time, etc., in
and out!).
This is a major problem, because control-shift-minus is "undo" in emacs.
The workaround I currently use is to put this in my .emacs file, and instead
type "alt-u" for undo:

(define-key esc-map "u" 'undo)



[1] https://github.com/sagemath/cloud/wiki/FAQ

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

John H Palmieri

unread,
Jul 12, 2013, 10:25:46 AM7/12/13
to sage-...@googlegroups.com


On Friday, July 12, 2013 7:16:40 AM UTC-7, William Stein wrote:

This is a major problem, because control-shift-minus is "undo" in emacs.
The workaround I currently use is to put this in my .emacs file, and instead
type "alt-u" for undo:

    (define-key esc-map "u" 'undo)

Note that undo is also available by default through other key bindings, like C-x u and C-/. (Execute "M-x where-is undo".) So there are other options available, and you include them in the FAQ.

--
John

William Stein

unread,
Jul 12, 2013, 10:52:40 AM7/12/13
to sage-...@googlegroups.com
Thanks! I was totally unaware of that, and have added it to the FAQ.

-- William

Samuel Coskey

unread,
Dec 2, 2013, 11:04:16 PM12/2/13
to sage-...@googlegroups.com
Using emacs keybindings in the text editor in Safari/Chrome today:

Pressing ctrl+o inserted a newline after the cursor AND opened the sage Open file screen (instead of just the former). I don't recall this happening in recent weeks.

Sam C

PS: I love that SMC supports emacs keybindings.
Reply all
Reply to author
Forward
0 new messages