emacs

Why don't more people use emacs with viper-mode?

I've started to use emacs, and I've found out that while the editor-specific features of emacs are better than those of vi, the text-manipulation methods of vi are better than those of emacs (and easier on your control-pinky!). It seems that viper-mode, a marriage of the two best parts of each editor, is the ideal solution for someone t...

What modern editors compete with emacs/vi?

Emacs and vi are the traditional editors of the programming gurus. But, have any modern editors been able to displace these two in terms of extensibility and text editing productivity? I know editors such as Eclipse and commercial editors provide language specific advantages such as intellisense and refactoring, though this is not quit...

Tabbed windows on Emacs

I'm trying to get multiple tabs in windows like vim does it. In vim tabs aren't tied to buffers and you can have multiple tabs each with multiple splits and buffers in them. What I've found so far is: tabbar: shows all tabs. winring: doesn't show tabs in the window and is clunky to use (have to name each tab first). This is the closest...

Different setup in .emacs for PC/Mac.

I need to have different setup in .emacs depending on my system (Mac or PC). This post teaches how to know the system that my emacs is running. How can I check the variable 'system-type' is to set what in emacs? What code should I have in .emacs to have different setup for PC and Mac? ??? (when (eq system-type 'windows-nt') ) ...

Copy emacs font settings to another computer

I want to copy over the emacs fonts settings from one computer to another - any ideas how to do this. I did C-u C-x = to get the following : character: r (0162, 114, 0x72) charset: ascii (ASCII (ISO646 IRV)) code point: 114 syntax: word category: a:ASCII l:Latin buffer code: 0x72 file code: 0x72 (encoded by coding sy...

Emacs tramp errors

When I try to open a file on another machine using tramp 2.1.9, it logs me into the machine and shows the file, but then this appears in the minibuffer: File mode specification error: (wrong-number-of-arguments #[(filename) "\306^H!\205!^@\307^H!^Y\310 !^Z\311 !^[\312 !^\\313 !^]\314 ^K^L\315$-\207" [filename v method user host loca...

GDB with emacs tips

Hi everyone, I have recently switched to gdb-emacs integration, and its cool as you no longer need to a list of source code everytime, Although i miss a few features or may be i dont know how to do them? I Use emacs in commandline mode emacs -nw as i dont like being away from console. Now when i execute some command say c1 under gdb ...

Emacs code to automatically set indent-tabs-mode according to existing code

Is there ready Emacs code/package to automatically set indent-tabs-mode according to the file being visited? That is, if the currently visited file uses tabs for indentation, indent-tabs-mode should be set buffer-locally to true. Correspondingly if spaces are used, indent-tabs-mode should be set to false. The purpose of this is to automa...

Concatenate string in elisp

I need to concatenate path string as follows, so I added the following lines in .emacs. (setq org_base_path "~/smcho/time/") (setq org-default-notes-file-path (concatenate 'string org_base_path "notes.org")) (setq todo-file-path (concatenate 'string org_base_path "gtd.org")) (setq journal-file-path (concatenate 'string org_base_path "j...

Getting pdb in emacs to use python process from current virtualenv

I am debugging some python code in emacs using pdb and getting some import issues. The dependencies are installed in one of my bespoked virtualenv environments. Pdb is stubbornly using /usr/bin/python and not the python process from my virtualenv. I use virtualenv.el to support switching of environments within emacs and via the posta...

Emacs: simple command to deploy and test a CGI script

I am currently writing a CGI script that I store in a subversion tree built on a remote machine. There are a bunch of other related files on the subversion tree, but only a few CGI scripts. I currently edit the script with TRAMP and then have to manually cp it to the cgi-bin directory when it's ready for testing (which includes opening...

Emacsclient hook on kill

Hi I am trying to find a hook in Emacs, which should fire right before emacs server graceful shutdown. I tried kill-emacs-query-functions, kill-emacs-hook, server-done-hook with elisp like : (add-hook 'server-done-hook '(lambda () (savehist-save) ) ) ... but none of them is called when OS...

Desktop.el under emacsclient

Hi I am trying to use desktop functionality (http://www.emacswiki.org/emacs/DeskTop) in emacs. I added following code to my .emacs: (require 'desktop) (setq desktop-save t) (setq desktop-load-locked-desktop t) (setq *desktop-dir* (list (expand-file-name "~/.emacs.d/desktop"))) (setq desktop-base-file-name ".emacs.desktop") (setq deskt...

Etags: generate tag for Objective-C methods declaration

How to make etags generate tags for both the declaration (i.e. inside the @interface block) and the definition (i.e. inside the @implementation block)? The default behavior is only to generate tags for the definition. I've already tried to invoke etags with --declarations but that didn't solve the issue. A way would be to pass a custom ...

How do I stop Emacs from changing my split buffers?

I have a number of splits open, looking at various buffers. But when I for example check the help on a function it will replace one of the splits with the help buffer. Once I'm done reading the help I have to go back to the correct buffer manually which is a pain. How do I get Emacs to be nicer to my buffers? Update: Help will let you p...

emacs: go to first non-whitespace character in line

I'm looking for the emacs equivalent of vi's '^'. How to I move cursor to the first non-whitespace character in a line? ...

Emacs elscreen - how do I jump to numbered tabs

Elscreen has a method called elscreen-jump and also elscreen-jump-0 and elscreen-jump-9. I'd like to be able to jump to tabs between 0 and 9. How do I define a keymap for this? I've tried: (global-set-key (kbd "M-1") (lambda () (interactive) (elscreen-jump 0))) (global-set-key (kbd "M-2") (lambda () (interactive) (elscreen-jump 1))) b...

clojure swank server opens public port?

(This question has been downvoted, which I find strange. How have I offended?) Am I right to think that running a swank server usually opens port 4005 to the world, not bound to localhost-only connections? So anyone hacking in a café is not only allowing passers-by to execute arbitrary code on their computer, but is giving them a nice ...

emacs 23 on OS X: how to open web links from emacs?

I'm trying the 23.2 release Cocoa Emacs build (OS X 10.6). There's a number of things that are more annoying about Cocoa Emacs than the terrific Carbon Emacs (based on an Emacs 22 build, I believe), so I hoped folks might have some solutions/thoughts (unfortunately posting on neither the carbon-emacs list nor emacs-dev has produced a use...

Is there a way to select to a character in Emacs?

I've just migrated from vim and one thinkg I miss is the motions like vi( or vf<char>. Is there a way to do something similar in Emacs? Perhaps it is possible to get isearch to select from here to the match? ...