[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding various TeX commands to single key

From: pglpm
Subject: Binding various TeX commands to single key
Date: Sat, 4 Jun 2022 10:52:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Hi everyone,

I'd like to bind the call to the "LaTeX", "Biber", and "View" commands, as 
defined in TeX-command-list (and possibly others) each to a single key.

Up to now my approach was to call a macro, for example

(define-key TeX-mode-map [f8] [?\C-c ?\C-c ?L ?a ?T ?e ?X return])

to bind the whole key sequence "C-c C-c LaTeX [ret]" to f8.

For some reason this is now causing Emacs to freeze on Ubuntu/Gnome. I think 
it's a Gnome problem, but I wanted to try to bypass it for now, by assigning to 
f8 the proper command rather than a key macro.

I tried defining a function based on TeX-command-sequence and keybinding that:

(defun launch-latex ()
  (TeX-command-sequence 'LaTeX t)
(define-key TeX-mode-map [f8] 'launch-latex)

But it does more than I asked: it compiles, possibly multiple times, and also 
launches the viewer. Surely this is because I'm misusing TeX-command-sequence 

Any suggestions on how to proceed?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]