Recently when running compile, the error messages don't get hyperlinked properly. I get this type of error message:

../build/obj/DerivedClass.cpp:45:18: error: expected type-specifier

The buffer hyperlinks only part of the path:


Any suggestions on how I can fix this?


I get the same problem when performing rgrep or grep.


Following Drew's comment. I ran emacs -Q. The paths hyperlinked correctly. I then loaded the init file, load-file, expecting the paths to be hyperlinked incorrecty. However, they remained correct. Restarting emacs with no options had broken hyperlinks.

I then ran emacs --no-desktop to try and isolate if the problem existed in the init file or the desktop file. Paths were hyperlinked correctly. So the problem must be in the desktop file. I did not want to lose my buffer states stored in the desktop file by performing desktop-clear. Instead I performed desktop-read, saved the desktop, quit emacs, then started emacs without and optiong: emacs. Paths are hyperlinked correctly. The problem appears to be fixed. I can restart emacs several times without seeing the problem.

My assumption is that something in the desktop file was causing the bug. Hind sight tells me I should have saved a copy of the desktop file and then done a diff after fixing the problem to see what caused it.

  • 2
    Not enough info, probably. Maybe try to provide a recipe, starting from emacs -Q (no init file). Consider also filing a bug report, if you think that for your context compile is not doing the right thing: M-x report-emacs-bug. – Drew Aug 15 '17 at 23:13

As noted in EDIT 2 of the question, the desktop file must have been corrupted. It appears that fixing the desktop file fixed the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.