Windows 7 používam chvíli.
Když jsem začal po reinstalaci programovat, začali taktéž moje problémy se psaním některých znaků. Například kdykoliv jsem chtěl napsat úvozovky (což je při programování docela často), tak jsem musel místo obvyklého jednoho stisknutí klavesy s úvozovkami, stisknout klávesu úvozovek dvakrat, což ale kromě otravného dalšího mačkání klavesy, vedlo navíc k napsání dvou úvozovek.
Problém je v tom, že jako defaultní anglická klávesnice je nainstalováno rozvžení "Anglické (Mezinárodní)", která umožňuje vkládat speciální národní znaky kombinací pravého ALTu a speciálními znaky mezi, kterými jsou právě úvozovky. Viz http://support.microsoft.com/kb/306560.
Pokud jste zvyklí na anglickou klávesnici tak jak byla ve Windows XP, nastavte si jako klávesnici "Anglické (Spojené státy)".
WIN+R -> intl.cpl enter -> záložka "Klávesnice a jazyky" -> Změnit klávesnice -> Přidat -> "Anglické (Spojené státy)" -> Odebrat "Anglické (Mezinárodní)" -> Potvrdit
Zobrazují se příspěvky se štítkemproblem. Zobrazit všechny příspěvky
Zobrazují se příspěvky se štítkemproblem. Zobrazit všechny příspěvky
3. 5. 2010
24. 4. 2010
exit emacs + cygwin (windows) problem
I am playing with emacs editor in cygwin environment in my windows xp installation.
When you want to exit and save edited text, you've gottwo three possibilities (maybe there are more?):
1) From emacs manual : press C-x, C-c . Emacs manual convention says C means CTRL key and M means Meta key which depends on OS - in Windows it's ALT or ESC. So press Ctrl + X then Ctrl + C. Then question appears: Save file?" y/n... so if you want to really save a file press "y" which means yes (or n as no which in fact act as cancel - emacs doesn't exit and stay opened, semantic no do by press "!" which exit emacs without saving).
But here is problem I was struggling with: when you press C-x C-c emacs print message "C-x C-g is undefined" like you was hitting CTRL+C, CTRL+G. Wtf? I am not exactly sure why, but this solve the problem: set the system environment variable CYGWIN to value "tty". You can do it inside cygwin by export CYGWIN="tty", but then when you exit emacs, cygwin stop echoing your keys so you don't see what you write. It's like when you typing password when using sudo command. When you set this environment variable before starting cygwin from windows everything is ok. You can set this variable in windows by SET CYGWIN="tty" in command shell (cmd.exe) or through System properties (WIN+PauseBreak).
2) M-x (ESC + X or ALT+X) to active command mode and write "save-buffers-kill-emacs" and then press "ENTER", save question appears, make choice. Note that command mode has auto complete on TAB key, so write just "sav" press TAB, emacs show all possible commands starting with "sav" or do auto complete if there is no ambiquity in names of commands.
3) C-x-s (this one I discovered just by luck when I wanted to originally press M-x and started typing "save" like in 2)
Sources:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Exiting.html
http://www.emacswiki.org/emacs/SetTty
http://blog.arithm.com/2007/12/01/killing-cygwin-emacs/
When you want to exit and save edited text, you've got
1) From emacs manual : press C-x, C-c . Emacs manual convention says C means CTRL key and M means Meta key which depends on OS - in Windows it's ALT or ESC. So press Ctrl + X then Ctrl + C. Then question appears: Save file
But here is problem I was struggling with: when you press C-x C-c emacs print message "C-x C-g is undefined" like you was hitting CTRL+C, CTRL+G. Wtf? I am not exactly sure why, but this solve the problem: set the system environment variable CYGWIN to value "tty". You can do it inside cygwin by export CYGWIN="tty", but then when you exit emacs, cygwin stop echoing your keys so you don't see what you write. It's like when you typing password when using sudo command. When you set this environment variable before starting cygwin from windows everything is ok. You can set this variable in windows by SET CYGWIN="tty" in command shell (cmd.exe) or through System properties (WIN+PauseBreak).
2) M-x (ESC + X or ALT+X) to active command mode and write "save-buffers-kill-emacs" and then press "ENTER", save question appears, make choice. Note that command mode has auto complete on TAB key, so write just "sav" press TAB, emacs show all possible commands starting with "sav" or do auto complete if there is no ambiquity in names of commands.
3) C-x-s (this one I discovered just by luck when I wanted to originally press M-x and started typing "save" like in 2)
Sources:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Exiting.html
http://www.emacswiki.org/emacs/SetTty
http://blog.arithm.com/2007/12/01/killing-cygwin-emacs/
Přihlásit se k odběru:
Příspěvky (Atom)