elisp

Emacs C-h c doesn't seem to work for chords 3 combinations long?

Hi, I'm trying to use C-h c in emacs to figure out what a key combination is bound to. The combination is C-u C-c C-q, which realigns tags in org-mode. However, Emacs just tries to look up C-u C-c and then fails. What am I doing wrong? I realize I could easily look at the orgmode source or something to figure this out, but for future ref...

Guile and Emacs?

I'm learning Emacs Lisp and I came across this decade old post saying that at some point Guile (Scheme) will replace Emacs Lisp, or Emacs will be rewritten with Guile. http://sanpietro.red-bean.com/guile/guile/old/3114.html I was wondering if this is still a possibility, and if developers should be trying to write Elisp with this in m...

Emacs Lisp: evaluate variable in alist

This is probably silly but I don't have enough Elisp knowledge to understand what is going on with respect to quoting and evaluation. Suppose I have this Elisp code: (add-to-list 'default-frame-alist '(width . 100)) (add-to-list 'default-frame-alist '(height . 50)) It will result in the expected default-frame-alist value: ((height 5...

How do i change the color of the font for the current directory in M-x term?

Normally when i need to change the color of a certain element in emacs, i would do a M-x describe-face which will eventually bring up a customize buffer to change it. In the emacs term, It seems like i dont have the ability to enter the minibuffer to input that command. How do I figure out which variable to change? Heres a picture, to m...

Testing for platform in elisp?

I'm sharing my emacs configuration files between a linux box and an OS X box. The config breaks however when I define a specific font for Emacs.app in the config which is then not available on linux. Is there a way I can test for the current platform and then execute or skip the OS X specific instructions? ...

Get local cvs comment history when committing file/s in emacs

Hi, I often commit files with similar cvs comment but not in a single operation. I would like to able to bring up previous comments I've used in a previous commit when I am in the process of writing a comment in emacs. Meaning, from within the VC-log buffer. Is there a way to do this? Thanks ...

Emacs: Tab completion of file name appends an extra i:\cygwin

I am facing some strange behavior with file-name completion in emacs. C-x C-f to find file opens up the minibuffer with i:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. Hitting a TAB makes it i:/cygwini:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. A couple of interesting thi...

In Emacs, how do I figure out which package is loading tramp?

I have a strange interaction with tramp and cygwin-mount (I think: http://stackoverflow.com/questions/1705802/emacs-tab-completion-of-file-name-appends-an-extra-i-cygwin). Because of this, I want to disable tramp. I'm unable to find anything in my .emacs which is loading tramp explicitly. I can see "Loading tramp..." when I hit a tab in ...

eval during emacs lisp macro expansion

How can I fix the simple macro foo in (elisp)Eval During Expansion? None of the followings work: (defmacro foo1 (a) `(setq (eval ,a) t)) (defmacro foo2 (a) `(setq ,(eval a) t)) (defmacro foo3 (a) `(setq ,a t)) I really don't get what's said in (elisp)Eval During Expansion. I think if I got it, I'd have been able to fix the ma...

In emacs how does the "hyperlink" in the *Help* buffer work?

I'm trying to figure out how the "hyperlink" works in the *Help* buffer (so that I can implement something similar in the output of M-x compile). Here is a more detailed description of the behaviour I want to imitate: M-x describe-function find-file opens up a *Help* buffer. The first line of this buffer (for me) shows: find-file is an i...

Emacs lisp mode for Go?

Is there a suitable Emacs lisp mode for Go? C mode doesn't work without semicolons. The best I have found is the JavaScript mode by Karl Landstrom, since JavaScript also doesn't require semicolons. ...

Convert Emacs macro into Elisp

Hi, Is there a way to convert an emacs macro into elisp, not like what M-x insert-kbd-macro does, the actual activity becoming elisp statements. Thanks for your help. ...

Emacs Setting which-function-mode

I would like to have which-function-mode on by default when I open up Emacs. I've added the following lines to my .emacs file. (setq which-func-mode t) (setq which-function-mode t) When I open up a .cpp file and navigate to the body of a function, I'm not seeing the function name in the status bar at the bottom like I should. If ...

Emacs23 php-mode problem

I keep getting this error and similar errors while using php-mode on Emacs23 on Ubuntu: Debugger entered--Lisp error: (void-function php-template-if-hook) php-template-if-hook() abbrev-insert(if #("if" 0 2 (fontified t face font-lock-keyword-face)) 414 416) #[(G73404 funs global) "[Byte Code]" apply(#[(G73404 funs global "[Byte ...

How to write an Emacs function to wrap the marked region with specified text

I'm not too familiar with elisp, and am trying to learn. In emacs, I'd like to be able to do the following: Mark via C-space Go to where I want the the marking to end, so I have a region that is highlighted, suppose it is "highlighted text" Hit a key-sequence Have emacs ask me to input some text, say "plot", and Have that highlighted...

defaultcontent.el - @@LISP tag - read-closest-sexp?

I started using defaultcontent.el to fill newly-created buffers with content. Apparently this module is not widely used. I think there are 3 people including me and the author who use it, because when I do a search on it, my published emacs.el comes up as the first hit. Despite that, I find it useful. I specify a template for each f...

Difference between symbol and variable name in emacs lisp

I'm wondering what the difference is between (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pylint-init)) and (add-to-list flymake-allowed-file-name-masks '("\\.py\\'" flymake-pylint-init)) What is the clear meaning of the apostrophe here? ...

set text properties

I want to copy a text from one buffer to another with text properties. So I have (with-current-buffer from-buffer (setq text-to-copy (buffer-substring beg end))) How can I insert the text-to-copy to another buffer with all text properties? I'm interested especially in 'face' properties. The function buffer-substring returns a list...

Emacs, Zen-Coding mode, and Putty.

I use emacs via Putty and since Putty doesn't send certain key combinations to the remote console I generally need to re-bind them to other key combinations. After installing the amazing Zen-Coding mode I had some trouble with the preview it generated; I couldn't get it to insert the output it was previewing. I got around this with the ...

How to determine operating system in elisp?

Sorry if this has already been asked; however I don't seem to be able to find an answer anywhere grr. How do I programmatically determine which os emacs is running under in elisp? I would like to run different code in .emacs depending on the os. ...