开发者

guess-TeX-master bug?

开发者 https://www.devze.com 2023-03-10 14:45 出处:网络
I\'m trying to use the guess-TeX-master function (from emacswiki auctex) but I get this error: Wrong type argument: stringp, nil

I'm trying to use the guess-TeX-master function (from emacswiki auctex) but I get this error:

Wrong type argument: stringp, nil

My elisp knowledge is quite poor. Does somebody know the problem?

[EDIT]

This error was because I forgot do it the latex hook.

Anyway I trying to do something different. I want to find the file (i开发者_运维知识库n the same directory) that has the "begin{document}". Because my elisp skills are poor, I do it in a script:

In my .emacs:

(add-hook 'LaTeX-mode-hook  
  (lambda ()  
    (setq TeX-master (execvp "guess-TeX-master"  
      (file-name-directory (buffer-file-name))))))  

execvp defun is here: http://www.emacswiki.org/emacs/ExecuteExternalCommand

The guess-TeX-master script is:

grep "begin{document}" $1/*.tex | cut -d ':' -f 1 | tr -d '\n'

How to do the same using elisp only?


Can you paste your code(at paste.lisp.org and share the link here) so we can find out if it really has syntactic issue.. Basically from what I understand you are trying to use a wrong argument for the operator...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号