emacs

How can I use emacs Tramp to double hop ssh?

My campus only lets ssh access through a gateway server. So to access the cluster I am coding on I have to ssh to the gateway and then ssh to the machine I am working on. The connection is very slow at times and is frustrating to work on. I would love to use something like tramp which I understand would have the buffer open on my local ...

How can I apply a new emacs C style to reformat all my source files?

I'd like to re-format all my source files using the Google formatting function for emacs: google-c-style.el (see here). How can I apply this function to all my source files at once, so that they are all formatted and indented correctly according to the Google style? ...

Debugging flash with gdb-mode in emacs

I'm trying to debug a swf using fdb, the flash debugger that comes with the flex SDK, on Linux. Debugging from a terminal works, but if I do it from within Emacs by doing M-x gdb fdb -f myswf.swf RET fdb seems to hang as soon as I issue any commands (e.g "help" or "c"). I get no output in the fdb buffer and the flash player hangs wait...

Using JDE in Emacs, I would like something like Eclipse's run configurations.

I'm using JDE for writing a larger project. Coming from Eclipse, i miss the run configurations. Basically, there are several different classes in the project that i would like to launch. Some of them are applets, some of the are regular classes with a main method. I would also like to be able to specify different run time arguments to th...

Making M-( the default behavior in Emacs when "(" is typed.

How does one make M-( the default behavior for typing an opening "(" character? I want Emacs to automatically insert the closing ")" after the cursor when I type a "(" character regardless of whether it's part of an M-key combination. Additionaly, I want to extend this behavior to quotes, subquotes, brackets and braces. Typing M-( is a p...

How to enforce maximum line length in Emacs?

In Emacs, how can I enforce a maximum line length of, say, 80 characters? I want it to insert proper line breaks in my code, much like fill-paragraph for text, if possible, with the correct insertion of the second part of the line. Here a little example: LongNameType<PrettyLong, AlsoLong> doSomethingWithLongFunctionName(int a, int b); ...

removing tab inconsistencies in emacs

To set tabs in emacs I have this line in my .emacs: (global-set-key (kbd "TAB") 'tab-to-tab-stop) I'm looking for some way to make all modes show tabs in emacs as 4 spaces and have emacs save the tabs as tab characters (instead of saving them as spaces). If I'm using c-mode that .emacs line will make tabs look like 8 spaces and save ...

svn for emacs: how do you set author name and save password

I can't seem to find this on google anywhere. I am trying to move to emacs from eclipse but I can't for the life of me figure out how to set my svn author name so it doesn't default the author name OR save the password so I don't have to type it in any each time. I am Ubuntu 8.10 if that matters. Any insight would be great. Thanks. ...

Hiding ^M in emacs

Sometimes I need to read log files that have ^M (control-M) in the line endings. I can do a global replace to get rid of them, but then something more is logged to the log file and, of course, they all come back. Setting unix-style or dos-style end-of-line encoding doesn't seem to make much difference (but unix-style is my default). I...

Emacs indentation of the for each statement in C++

I'm trying to get emacs to correctly format the "for each" construct in c++. I want the braces to be lined up with the f in for in both of the following examples: for each(Type a in b) { //^c^s shows substatement-open //... do stuff } for( ; ; ) { //^c^s shows substatement-open //... do stuff } In b...

How to highlight the selection in emacs keybinding of eclipse?

I have searched the Web for this, but with no luck. Any idea? Thanks. ...

Compiling C++ Programs with Emacs on Windows

I've been using Emacs for quite some time for basic text editing but as of today I am attempting to use it for c++ compilation. I have looked for the past few hours about how to go about this but I keep hitting roadblocks in their techniques (I think some of this is having to do with the tutorials being outdated). Basically, all I want ...

Unable to move between Screens in Emacs

I have two screens, one is empty and the other is Emacs' manual. My cursor is at the empty screen. All my commands affect the empty screen. A similar command in Vim is C-w. How can you switch to the Emacs' manual such that I can roll down the screen by C-v? ...

Which .emacs -file would you give for a Vim veteran?

I have used Vim for coding. I want to learn Emacs too. I would like to export at least some of the following customizations in my .vimrc to my .emacs. My .vimrc let Tlist_Auto_Open = 1 " http://stackoverflow.com/questions/165231/vim-dvorak-keybindings-rebinding " Dvorak it! no d h no h j no t k no n l no s : no S : no j d no J D no ...

Unable to hide welcome screen in Emacs

I want to hide the welcome screen. My .emacs (setq c-basic-offset 4) ; indents 4 chars (setq tab-width 4) ; and 4 char wide for TAB (setq indent-tabs-mode nil) ; And force use of spaces (turn-on-font-lock) ;...

How can I make the compilation log create a new window in emacs?

If I only have one window showing in emacs and use M-x compile, the window splits in two and I can watch the compile buffer easily. However, if I have more windows showing, the compilation log takes over one of the others, which I find irritating. How can I make emacs always split a new window to show the compilation log? Edit: A bit ...

is there a good way to do emacs project ?

I use emacs to do some coding, and text editing, When I create a new coding project, I simply create a new folder, and add source code into it. The problem is, with multi-forders, it is hard to change back to the top, and run the makefile. Is there any good method to do project management like eclipse or other IDE? ...

python emacs completion

Is there a good emacs mode that will allow tab-completion of local python variables? I set up ipython.el but it will only tab-complete things in the scope of the interpreter. I'm looking for something that will let me tab-complete tokens in the local namespace of a function or file. ...

Insert whole month of dates in emacs lisp

I'm doing a bit of programming here and there in Emacs Lisp, but I'm not entirely sure how to go about certain things. I'm trying to insert a whole month of dates, each on a new line like the list below: January 01/01/09 Mon: 02/01/09 Tue: 03/01/09 Wed: etc How would I go about doing that? I've found how to format dates, but I can...

Emacs: getting readable keyboard-macros

When using insert-kbd-macro to save a named keyboard-macro I get "unreadable" lisp-code like (fset 'ppsql (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([134217788 134217765 44 return 44 17 10 return 33 134217765 102 102 backspace 114 111 109 return 17 10 102 111 109 backspace backspace 114...