Take the 2-minute tour ×

So, way back in January, I went here:


I downloaded Emacs and have been using it on my Mac and I like it. I've started trying to get into Elisp programming. To learn more, I'd like to look up some functions. So for instance I do:

C-h f

and then type "scroll-down"

This gives me the following text:

>scroll-down is an interactive built-in function in `window.c'.
>It is bound to <kp-prior>, <prior>, C-1, C-x C-1, M-v.
>(scroll-down &optional ARG)
>Scroll text of selected window down ARG lines.
>If ARG is omitted or nil, scroll down by a near full screen.
>A near full screen is `next-screen-context-lines' less than a full screen.
>Negative ARG means scroll upward.
>If ARG is the atom `-', scroll upward by nearly full screen.
>When calling from a program, supply as argument a number, nil, or `-'.

And the text "window.c" is a link. So I click on the link and I get:

find-function-C-source: The C source file window.c is not available

I'm getting this error a lot while doing a lot of different things. Where do I find the right path, and how do I tell Emacs what that path is?

I did just recently install some ELPA packages, so maybe one of them is causing some chaos?

share|improve this question

2 Answers 2

The variable source-directory will point to the location where the C sources are. If you have a separately downloaded copy, you'll have to point this variable to that directory.

share|improve this answer
If I put this: (source-directory) in an empty buffer, and then I run eval-buffer, I get: "Symbol's function definition is void: source-directory" –  cerhovice Aug 19 '12 at 18:28
Skip the parentheses. It's a variable. Not a function. Try C-h v source-directory RET. –  Noufal Ibrahim Aug 19 '12 at 19:00

Most packagers don't include the sources, or split them off into a separate package. Install the sources (and maybe tweak an init script to tell Emacs where you put them, if it's not the default location. The pertinent variable is find-function-C-source-directory).

share|improve this answer
If I put this in an empty buffer: (find-function-C-source-directory) and then run eval-buffer I get: " Symbol's function definition is void: find-function-C-source-directory" –  cerhovice Aug 19 '12 at 18:30
Remove the parens to eval the variable. With the parentheses, you are attempting to access a function of that name, which indeed does not exist. More usefully, use C-h v to examine a variable. –  tripleee Aug 19 '12 at 18:38
stackoverflow.com/questions/11595317/… advises to prefer source-directory over find-function-C-source-directory but it's not immediately apparent to me why. –  tripleee Aug 19 '12 at 18:46
Okay, thanks, Found this finally. Does anyone know where the source files traditionally go? They have been placed in an odd location in my harddrive, I'd like to move them somewhere standard, if only I knew that was. –  cerhovice Aug 20 '12 at 0:20
Please mark one of the answers as accepted so that this question does not come up as requiring an answer still. Thanks. –  tripleee Aug 21 '12 at 4:30

Your Answer


