On 30/07/2015 4:51 a.m., David Rörich wrote:
I have two questions concerning keyboard macros / commands:

1) I'd like to bind a shortkey to the following command sequence:

command-sequence buffer-write; master-buffer-update;

i.e. save the current document, then update the preview of the master
document. In principle, this works. However, if the document is already
saved, the "buffer-write" command is disabled and consequently the
second command is not executed, neither. Is it possible to enforce
execution of the second command?

Thanks a lot.

David
A hackish way is to insert and then delete a space character, to 'dirty' the document, which should enable the buffer-write:

command-sequence space-insert normal; char-delete-backward; buffer-write; 
master-buffer-update;

but I suspect "buffer-write; master-buffer-update" is incompatible with "command-sequence" as it presently exists. As I understand it, the buffer-write operation is a threaded process and so the master-buffer-update command will be started generally before the buffer-write is complete so that the overall effect won't be what you want. (I'm ignorant of LyX internals but I've tried command sequences involving saving/exporting operations before and this is what happens. See bug #8346.)

Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to