Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-07 Thread Arash Esbati
Uwe Brauer writes: > Ok that error I resolved (on my Ubuntu machine there is still a emacs 24 > installed) > > So I tried out emacs 25 (and 26) -Q or -q > > And loaded the following file > , > | > | (setq load-path (cons (expand-file-name >

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-06 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer writes: >> Uwe Brauer writes: >> Hmm, I can't reproduce what you describe. I started Emacs, eval'ed the >> above code in scratch buffer, opened test-exam.tex like this: >> \documentclass[answers]{exam} >>

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-06 Thread Uwe Brauer
> Uwe Brauer writes: > Hmm, I can't reproduce what you describe. I started Emacs, eval'ed the > above code in scratch buffer, opened test-exam.tex like this: > \documentclass[answers]{exam} > \begin{document} > \begin{questions} >

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-06 Thread Arash Esbati
Uwe Brauer writes: > > Uwe Brauer writes: > > > Sigh, sorry, my bad. `LaTeX-exam-label' is not defined at that point of > > time. Please try this: > > > (with-eval-after-load "latex" > > (add-to-list 'LaTeX-label-alist '("titledquestion"

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-05 Thread Uwe Brauer
> Uwe Brauer writes: > Sigh, sorry, my bad. `LaTeX-exam-label' is not defined at that point of > time. Please try this: > (with-eval-after-load "latex" > (add-to-list 'LaTeX-label-alist '("titledquestion" . LaTeX-exam-label))) >

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-05 Thread Arash Esbati
Uwe Brauer writes: > > If you want to put that stuff in your .emacs, try something like this: > > > (with-eval-after-load "latex" > > (add-to-list 'LaTeX-label-alist '("titledquestion" . > LaTeX-exam-label))) > > > (require 'reftex) > > > (add-to-list

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-05 Thread Arash Esbati
Uwe Brauer writes: >> I think the issue is somewhere else: In exam.el, >> `LaTeX-exam-insert-label' is used for "titledquestion" and >> "bonustitledquestion". IIRC, you have to add these environments to >> `LaTeX-label-alist' and `reftex-label-alist' in order to

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-05 Thread Uwe Brauer
Hi Arash, > Uwe Brauer writes: > Hi Uwe, > have a look at the defintion of `LaTeX-label': it looks if the variable > `LaTeX-label-function' contains a function and then runs it for label > insertion. I have `(setq reftex-plug-into-AUCTeX t)' in my .emacs and

Re: [AUCTeX-devel] insert a label with the file name as suffix.

2017-05-04 Thread Arash Esbati
Uwe Brauer writes: > Now for the exam class, Arash proposed to use > > (defun LaTeX-exam-insert-label (_optional name type) > "Indent the line and query/insert a label incl. the \"\\label\" macro. > Arguments NAME and TYPE are the same as for the function > `LaTeX-label'.

[AUCTeX-devel] insert a label with the file name as suffix.

2017-05-04 Thread Uwe Brauer
Hi currently I am using reftex-label which does precisely what I want, it inserts, after some configuration, a label which consists of the abbreviated environment name, a suffix, reflecting the file name and a number. Example \begin{equation} \label{eq:test:4} \int f dx=0 \end{equation} Now