How to associate a log file with compilation mode in emacs? - emacs

I have a compilation log file, say err.log. How can I use the contents of this file to navigate between compilation errors?

You can use either M-x compilation-mode or M-x compilation-minor-mode to switch the buffer into "compilation" mode, so that Emacs tries to parse error messages and turn them into links to the relevant line in the source file. Then you can go to the next / previous error with M-g M-n and M-g M-p.

Related

Required feature ‘scheme’ was not provided (scheme REPL in emacs)

It's probably very easy but I simply can't get a running scheme REPL in emacs.
First I installed MIT scheme and added
(setq scheme-program-name "my/path/to/bin/mit-scheme.exe")
to my init.el. But when I typed M-x run-scheme RET I got the error
Required feature ‘scheme’ was not provided
So I installed quack and added (require 'quack) to my init.el
Now when I start emacs I get the same error:Required feature ‘scheme’ was not provided
Am I missing a step?
Update
Maybe it simply doesn't work under windows:
Running Scheme under gnu-emacs If you want to run Scheme as an
inferior process in gnu-emacs or xemacs (again, this is not an option
on Windows machines), then you'll need to:
Download the xscheme.elc file. This is a byte-compiled elisp file that tells emacs how to run and interact with MIT Scheme. (Source file
is xscheme.el in case you're interested.)
This file should replace the xscheme.elc file that comes with emacs. You'll have to find the appropriate directory on your system.
On my Mandrake Linux system, this is the directory:
/usr/share/emacs/21.3/lisp. (This step is not necessary if you are
running MIT/GNU Scheme from the CS department machines.)
Add the following line to your ~/.emacs file
(load-library "xscheme")
Source (from 2005): http://www.cs.rpi.edu/academics/courses/fall05/ai/scheme/starting.html
Following doesn't work either
Quick Setup
Here is the short list of instruction's for those of you who want to
get started in a hurry. An explanation of each step follows below.
Open up emacs (or any other editor) in you home directory.
Open up the file ".emacs" and add the following line: (set-variable (quote scheme-program-name) "stk")
Save the file. You only need to do steps 1-3 once. If you were editing the file in Emacs, restart Emacs.
Start up Emacs and type the following sequence of keys:
M-x
run-scheme
A new buffer will open up with stk started inside of it.
Source: http://www-users.cs.umn.edu/~gini/1901-07s/emacs_scheme/
The error "required feature scheme was not provided" means that the first "scheme.el" found in your load-path does not contain a provide statement. Either your Emacs installation is broken (unlikely), or (more likely) you've installed some random scheme.el that hides the default one. Find it and remove it. Eg try M-x list-load-path-shadows.

Clean minibuffer during file find in ido mode

I use C-a,C-k to clean minibuffer when searching for a file in normal emacs. In ido mode, this key is bound to deleting a file.
So, in ido mode, after going deep down the folder hierarchy, how to clean minibuffer and restart my file selection from root folder.
Yes, i can use backspace to go up one step at a time, but that is tedious....

clojure nrepl in emacs saving state - always evaluating entire file on nrepl-jack-in

I'm using emacs live to set up my clojure environment. 1) What command would cause nrepl to try and evaluate the entire file upon jack-in? 2) Is there some place where session state is saved?
For some unknown reason emacs is now trying to evaluate the entire clojure file when I execute M-x nrepl-jack-in. It used to not do that. I have an error in my file and, since the execution fails, I can't start nrepl with this file. This is not the first time I've run into some semantics that change. I've tried restarting emacs but that doesn't help.
Thanks
nrepl's jack-in behavior is dependent on the location of the file backing the buffer you are visiting when you invoke the jack-in command.
To get a vanilla no-project repl, be sure to run nrepl-jack-in from a buffer where there is no Clojure project. To run a repl in a specific project via jack-in, run it while visiting a file in the top level of that project (project.clj is a prime cantidate).

Error exporting from emacs to latex with org mode

When I use org mode in emacs to export to latex and pdf file I have a problem. When I export to latex file, it's OK. but when I process latex file to export PDF file, I have this error:
Process completed with errors: [undefined control sequence] [LaTeX error]
Please tell me, how I can fix it.
You have to look at the .log file, if any, in the same directory (where the LaTeX compilation occurred).
Best (IMHO) is to compile the TeX file directly (using AUCTeX, if within Emacs), and to have a finer control on what's going wrong in the LaTeX route.
In Emacs 24 (maybe even in earlier versions) there is variable called org-latex-remove-logfiles, by default it is set to on, toggle it to off and latex will keep the log files.
To get to it, in Emacs do
M-x RET customize-variable RET org-latex-remove-logfiles

emacs 23.4.1/latex/flymake-mode: can't find master file

I'm having some problems with flymake-mode when editing latex files in emacs 23.4.1. First, when I start the mode I see Flymake:! in the mode line. The manual tells me this is because "Flymake was unable to find the master file for the current buffer.", but it doesn't suggest a solution. apropos tells me there is a function TeX-master-file-ask so I call it to set the master file and try flymake-mode again, but now it gives an error about .#file.tex not being found, but the file does exist.
How can I get flymake mode to work when editing latex files?
Try adding this to your .emacs:
(setq flymake-allowed-file-name-masks
(delete '("[0-9]+\\.tex\\'"
flymake-master-tex-init
flymake-master-cleanup)
flymake-allowed-file-name-masks)) ; don't use multipart tex files
By default (Flymake .3), Flymake tries to be smart about multipart .tex files it assumes that if your .tex file ends in a number then you must be working on a multi-part file.
I personally find this behavior annoying since I like to work on files named assingment1.tex and similar. However, by default, Flymake then assumes that there is an assignment.tex master file, and I get stuck with the Flymake:! behavior you describe.
Adding the above block to your .emacs will disable this behavior.