1

I wrote a script that reads the .aux and .log files after some replacements in the ·tex file (LaTeX). To achieve this i did:

(tex-file)
(read-string "Wait to tex-file to complete, then press ENTER:")

So I wait for tex-file to complete and then I press ENTER to make the script go on in reading the (re)genereted files.

I'd like to obtain the same result without the read-string command, with the script automatically waits for tex-file to compleate.

I read about sentinels but I'm not able to use them. I can't figure out how they works.

1

I found a solution to my problem here: https://stackoverflow.com/questions/23021875/wait-on-shell-command-to-finish-before-executing-another-elisp-command

I resolved by using:

(call-process-shell-command  (concat "latex " (buffer-file-name)) nil nil)

that does almost the same and that doesn't use sentinels.

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.