I'm trying to finally bite the bullet and learn emacs. Mainly so that I am comfortable editing files on a server through ssh. So I installed emacs on Windows in order practice. Right away I noticed this difference: when I press ctrl - rightarrow on windows, the cursor jumps to the next work. When I do this in emacs on the server, the cursor moves to the next character only. I believe the latter is the "normal" behaviour (M - rightarrow will jump to the next word in both versions). How can I get my windows emacs to behave exactly like the one on the server? I don't want to learn habits on windows that won't carry over to the server.
You mention server, I assume you are connecting to it over SSH? It is very likely that something over the route steals modifiers off your C-arrow movements.
If this is the case, try to edit your files locally. Here's how: How can I use Emacs tramp to ssh to a remote host and edit a file as another user on an ad-hoc basis?
Related
I use a windows computer for work and have painstakingly set up many keybindings for common tasks, as well as many other personalizations I really would like to have transferred to my personal computer, which is a Mac.
I recently found out about and set up Settings Sync, which is pretty awesome, but I can't seem to get my keybindings to work quite how I would like.
First, it doesn't seem that any of my keybindings transferred--when I open up the keyboard shortcuts on Mac and display User Keybindings, the list is empty, yet when I do this on Windows, all my keybindings are there.
To complicate matters, I sometimes use a Windows keyboard with my Mac. Without getting into too much detail, I'll explain what I'm trying to accomplish with a particular shortcut:
On windows machine, I use the right alt and ctrl keys to open up my integrated terminal with:
alt+ctrl+t
I'd like to keep this keybinding to work even when on my Mac because when I use my windows keyboard with it, I still have the alt and ctrl keys on the right side of the keyboard.
However, on my Mac without the windows keyboard, in place of the alt and ctrl keys I have the cmd and option keys, so in this instance I'd like cmd+option+t to trigger the integrated terminal.
So, is my solution to simply recreate all my windows shortcuts that use alt+ctrl with a corresponding cmd+opt version for Mac? And what about all the missing user keybindings that didn't seem to transfer with settings sync (logs show that they should've been transferred)? If anyone has any advice about how to properly set this up, I'd greatly appreciate it. Thanks.
It seems that Settings Sync synchronizes the user’s shortcuts by platform, which would prevent conflicts between Windows and Mac. So to achieve what you’re looking for, it should be enough to properly configure your shortcuts as you want them to be now in Mac.
There shouldn’t be any conflict when you move to your Windows machine, each platform should keep its own configuration :)
When I'm coding I'm using multiple "emacs nowindow mode", each one oppened in different terminal. It is really annoying when you have the same file on multiple emacs. Is there a way to synchronize them on save? (to update the other instances of emacs?)
I know that the best solution is not to do this :), but it is hard to break old habbits :)
Cheers,
Stole
p.s I work on Linux systems
It sounds like the ultimate problem you want to solve is working with the common files across Emacs frames. Emacs allows multiple client frames for a single running instance of Emacs. Unless you have technical motivations for entirely isolated instances of Emacs (i.e. isolated global state) I would recommend using this feature. That way you entirely avoid issues arising from concurrent edits to files.
Start the Emacs server from the command line via:
$ emacs --daemon
Alternately you can start the server after emacs has started using M-x server-start.
Then you can create client frames as you need them. Instead of typing emacs -nw, use:
$ emacsclient -nw
Depending on how you work you may need to exit Emacs differently to preserve other clients. Use C-x 5 0 (delete-frame) to close a single client rather than C-x C-c (save-buffers-kill-terminal).
Start your emacs instance in background when your session starts and then use emacsclient -nw to open a new frame in each terminal session. It's not exactly what you're doing but it is the closest I can think of.
I do use Emacs for years, and in particular the Cygwin Emacs version (under Windows 10) for months.
Since 2 days, M-x combo key is not working anymore, well ESC x but I don't want to be forced to use Emacs à la Vi ;-)
First, I thought that the keyboard of my laptop could have a trouble, but the same effect is observed with an external keyboard connected by USB.
Second, I though it could be due to some changes I did in my own Emacs init file, or changes inherited from MELPA. To test that, I came back into time with Git, but that wasn't it: problem still observed; to test for MELPA packages, I used a minimal Emacs (emacs -q) and, once again, the problem still persists.
(And ESC x displays that M-x, translated from <escape> x, runs the command
execute-extended-command -- which is expected.)
Finally, what's weird, is that the key x alone is working, and so does C-x. On the other hand, M (meta) is working: M-c, M-w do work like expected.
So, to sum up, only the particular combination M-x is not working, and I really have no idea why.
Any smart test I could do to debug this (on Win 10)?
To sum up the answer in the comments:
If your key combination does not do what you expect - use C-h k to find out if it's a wrong mapping inside emacs, or something is grabbing this combination before emacs has a chance. If C-h k doesn't do anything in response to Alt-X - then you can be certain emacs doesn't see it at all.
If you want to confirm a key combination has been hijacked try to use some other application with it. Alt-X isn't used by regular Windows applications, but if you happen to have anything else that can have customized key bindings then try to map Alt-X to anything inside it. Eclipse, IntelliJ, Visual Studio, gvim. But seeing what happens with C-h k is a sufficient proof.
To find out what is stealing your Alt-X check what was installed or reconfigured lately. Disable startup programs if you can't recall. Additionally, from my experience a couple of nasty offenders: Intel video driver, and Windows language bar. (Not with Alt-X, with other key combinations.) Windows language bar is especially annoying when it steals C-S-) which I use for slurp.
Last thing. If you are running in a VM, your key combination may be stolen at either host or guest level (or both, as I've seen with the language bar.) So you may need to look around in both places.
I encountered the same problem. But I found that the problem was come up with the conflict of hotkey. On my Win10 OS, M-w is conflicted with the Tencent QQ software. So when I closed the QQ or changed the QQ's hotkey, the Emacs worked well.
I don't know why, but the problem is with Growl for windows v2.0.8. Close it and emacs will run normally.
Anyways, any new program setup could create conflicts. Stop all new (since the bug) process and check it.
(I don't want to change the keys configuration)
I would like to be able to write code by voice recognition and him currently using Aquamacs 2.4 and Dragon Dictate 2 on Mac OS X 10.6.8. Does anybody know if this is possible and if so how? I've seen shorttalk, emacs listen, and voice code but they only work on windows machines with Dragon Naturally Speaking.
Any leads would be much appreciated.
Also I am writing in R via ESS.
Have a look at this presentation by Tavis Rudd : http://www.youtube.com/watch?v=8SkdfdXWYaI
He runs Dragon Naturally Speaking inside a Windows VM, because the Windows version can be scripted with Python. Then the VM communicates with Emacs on his local machine.
He says in the presentation he will open source his code, but it doesn't seem to be there yet on his Github.
So yes, it's possible, but at this point there is no out of the box solution. If you really want this, prepare to invests weeks or months to get to a properly working setup.
I recently released the coding-by-voice solution I created to solve my own RSI issues. It can be found here: http://www.voicecode.io
I use it mostly for coding in Sublime Text and Xcode, but it works great with emacs or vim as well. The great thing about this solution is that all commands can be chained into "command phrases" so you don't have to pause between every individual command like you do with other voice command solutions.
It has builtin support for all standard variable-name formats (snake case, camel case, etc), has builtin commands for every permutation of keyboard shortcuts (ie command-shift-5, command-option-shift-T, and so on), has cursor movement commands, app switching commands, window switching commands, commands for symbol combos like "=>", "||", ">=", etc, and tons more. Plus it is very easy to add your own custom commands as well.
I'm not sure if this is possible, but does anyone know if I can pipe ESS commands (i.e. evaluate region) to a R process running outside of Emacs? The Emacs terminal hangs up a bit (more often than Apple's terminal) and I'd like to just ditch it, while still using ESS commands. Currently I am doing the less efficient copy and paste technique :-)
Vince
Why not just kill the underlying R process, start a new one and continue the session in the same ESS buffer?
This doesn't answer your specific question and my experience is on Windows, but assuming it's challenging in ESS, I just mention:
There are other IDE's which have no trouble doing this (e.g. Tinn-R, StatET). In particular, for one supported on multiple operating systems, have a look at the StatET plugin for Eclipse. One very nice feature of Eclipse is that not only can you run the commands on a console outside the IDE, but you can also run multiple console sessions at the same time. This allows you to easily compare results side by side.
Needless to say, that's irrelevant if you're comfortable using ESS.