closing a named buffer?
Paul A. Rubin
parubin73 at gmail.com
Wed Dec 14 16:18:37 UTC 2022
On 12/14/22 10:52, Dr Eberhard Lisse wrote:
> Hi,
>
> I can easily close the current buffer with a command like (on the mac)
>
> LYXPIPE=$(find ~/Library/Application\ Support ~/.lyx \
> -name .lyxpipe.in 2>/dev/null | head -1)
> echo "LYXCMD:P2:buffer-close" > "$LYXPIPE"
>
> Is it possible to close a named buffer even another was "active" using
> the LYXPIPE mechanism?
>
> Let's say the file names I am editing are a.lyx and b.lyx, and a.lyx is
> in front, how would I close b.lyx while keeping a.lyx in front/active?
>
> I am willing to RTFM :-)-O
>
> el
>
I don't know if this would fit your intended use, but you could use a
command sequence like "buffer-switch
/path/to/b.lyx;buffer-close;buffer-switch /path/to/a.lyx", assuming that
you knew the file names/paths when the sequence was triggered. I'm not
sure if the switch back to a.lyx is necessary. It may depend on whether
there are more than two buffers open when you execute the command sequence.
Paul
More information about the lyx-users
mailing list