Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to open the C source code of Emacs functions

Tags:

emacs

When I search for a function description [find-function] and I click on the link to the "--.c" file I cannot open it and I get Emacs C Source dir: ~/ in the Minibuf. I am stuck there and I don't know what to do.enter image description here

"The Emacs distribution includes the full source code for the manuals, as well as the Emacs Reference Card in several languages." gnu.org/software/emacs

like image 752
Arash Avatar asked Jul 18 '12 12:07

Arash


2 Answers

Get the .tar.gz file that corresponds to your Emacs version (check with M-x emacs-version if you're unsure) from http://ftp.gnu.org/pub/gnu/emacs/, and unpack it. Then you can enter the path to where you unpacked it as response to "Emacs C Source Dir". (I suspect you need to specify the src subdirectory of the Emacs distribution, but I haven't tried it myself.)

like image 168
legoscia Avatar answered Nov 13 '22 16:11

legoscia


After you download the soruce code, there is also a variable can custom the location of the source code. eg:

(setq find-function-C-source-directory "~/Projects/emacs-25.1/src/")
like image 26
Hang Yan Avatar answered Nov 13 '22 17:11

Hang Yan