emacs

why is etags generating a corrupted TAGS file?

I have the following minimal source file: $ cat path/xx/yy/fooBar.c void this_is_a_test(void) { } If I run etags like this it works ok: $ etags path/xx/yy/fooBar.c $ cat TAGS path/xx/yy/fooBar.c,25 void this_is_a_test(1,0 But if I run etags via find/xargs the TAGS file is corrupted: $ find . -name fooBar.c ./path/xx/yy/fooBar...

Turning on linum-mode when in python/c mode.

I want to turn on linum mode (M-x linum-mode) automatically with python and c mode. I add the following code in .emacs, but it doesn't seem to work. (defun my-c-mode-common-hook () (line-number-mode 1)) (add-hook 'c-mode-common-hook 'my-c-mode-common-hook) (defun my-python-mode-common-hook () (line-number-mode 1)) (add-hook 'pytho...

Eshell: commands, syntaxes, etc.

Just found that unfinished manual, but it's really unfineshed. Right on the climax. I still don't get it. What is that? An eLisp interpreter? How do you tell emacs to edit a file from there? What is the difference? What are the eshell only commands? ...

delete line backwards (Emacs)

Hi, This is probably basic but I really tried to find the answer. "C-k" deletes from the cursor to the end of the line, but is there an analogous shortcut to delete a line backwards from the cursor point? Best ...

removing trailing whitespace for all files in ediff-trees session

Hi, I am using the very handy ediff-trees.el http://www.emacswiki.org/emacs/ediff-trees.el to compare two versions of a pile of Python code provided by one of my project partners. Unfortunately, these guys are checkin in code with trailing whitespace (extra tabs here and there...) which is creating a ton of false positive diffs, whic...

How do you list and manage hidden buffers ?

When calling switch-to-buffer, in the minibuffer, when you press SPACE, you can see hidden buffers that you normally don't see, like *Minibuf-0* for example. How could you list those hidden buffers into the list of buffers shown by list-buffers ? If it's not possible using list-buffers, how do you manage them ? ...

Regex sub-expression matching with Find + emacs-regex mode

I'm trying to find some compressed log files, and do some operations on them. I can't use ls because they are thousands of files in the directory and BASH throws a 'argument list too long' error. This has brought me to find, but I'm having trouble with my regex. Here is the whole find command find $i -regex '.*logfile_MP[0-9]-GW0[0-9]...

Emacs Lisp Align Keybinding Definition in init file

I have the following line in my Emacs init file. (global-set-key (kbd "C-x a r") 'align-regexp) Is there any way to hard-code in a particular regex so that I don't have to specify it every time? ...

Clojure functions for Emacs?

I wondering if there is a set of Emacs Lisp code that implements some of Clojure's functions. For example, -> and ->> and comp and partial, and others? Thank you. ...

Simplest Emacs syntax highlighting tutorial?

I would like to create only a syntax highlighting minor mode for Emacs. I have the "Writing GNU Emacs Extensions" by O'Reilly, but it does not go into any depth of detail. Is there a simple tutorial for a real or fake programming language highlighting mode? Thank you ...

How can etags handle multiple directories

How it is possible under emacs and C++ to extend etags covering multiple directories? (I am not referring to recursive etgas which has a straight forward solution by using the -R option). Something like this is needed, for example, in the case where we are using a third party library, including its headers, that could be installed anywh...

Setting Emacs Tramp to store local backups

I love emacs, but something has been nagging me. I can't seem to get emacs to store local backups of files when I am editing them via tramp. Currently, when I edit a local file a set of old versions is stored in the /tmp/myusername/emacs_backup folder. However, when I am FTPing via tramp, old versions aren't stored there (I assume it i...

How to configure emacs to auto-indent with fixed spaces instead of align to the open parenthesis?

For example, I would like this style of indention: int expectedIndent(int param1, int param2){} instead of this style: int currentIndent(int param1, int param2){} Thanks in advance, Utoah ...

How to fetch already read articles into summary buffer in gnus?

Hi everyone! While in summary buffer how can I make gnus fetching already read articles in two situations: 1) while in a thread with some articles already read (and thus not visible). I would like to complete the thread with all the articles (not only parents!) read or unread. 2) fetch last N read articles which are not visible. Than...

strpos in Emacs Lisp

Is there a native Emacs Lisp function that behaves like strpos() in PHP? It should return the position of first occurrence of the given string in current buffer. Function search-forward is nice, but it modifies the character position. ...

term inside emacs:: how to turn "word wrap" off

In setting up my personal Linux command line development environment, I want to use term inside emacs b/c then I can switch to 'line mode' and copy/paste the output into any other buffer. However, when I run mysql inside term inside emacs, the pretty sql tables still word wrap according to the width of that emacs window :(. I was hoping...

org-agenda-skip-function not working

Just recently, I made some changes to my org configuration as I had been making some changes in my daily work framework. That broke a part of my configuration. (tags-todo "School" ((org-agenda-skip-fuction '(org-agenda-skip-entry-if 'scheduled)) (org-agenda-overriding-header "School Work ...

Can I get GNU Emacs to TAB complete filenames after using ssh in the *shell* buffer?

I am using GNU Emacs 23.1.50.1 (i486-pc-linux-gnu). What I want is conceptually simple, [TAB] indicates that I press the TAB key. M-x shell erik@furby:~$ ls bin Desktop Documents Dropbox R.tools erik@furby:~$ cd Drop[TAB] and tab completion works fine (i.e., Dropbox is completed) However, as soon as I ssh, this no longer wo...

Emacs: persistent highlighting of a region

The Emacs extension markerpen.el (link text) allows you to hightlight arbitrary regions in your buffer. With this extension, the added highlighting is lost once you kill the buffer though. However, it would be nice to be able to highlight arbitrary regions of a file in a "persistent" way -- in the sense that the added hightlighting is no...

Aspell under Emacs - multiple dictonaries

I'm using Aspell as a spelling checker for Emacs. I know that, as a standalone, aspell can handle multpiple dictionaries (using extra-dicts param), but how to configure it under Emacs? I know very little of emacs lisp... Could I provide some "ispell extra-args" in .emacs file? Would that work? If so I'd really appreciate simple example ...