help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to have a frame dedicated to buffers of a certain kind? (was: us


From: Tassilo Horn
Subject: Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.)
Date: Tue, 02 May 2023 20:38:42 +0200
User-agent: mu4e 1.11.4; emacs 30.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

Hi Zhao,

>> BTW, I wonder if you really want to have a dedicated tex frame or
>> just a dedicated pdf frame + one editing/normal frame.  If it's
>> actually the latter, I wouldn't introduce another th/tex-frame
>> parameter but simply test for (null (frame-parameter frame
>> 'th/pdf-frame)) everywhere.
>
> Please go ahead with the latter and let me test it.

It's attached to this mail.  I've tested these three scenarios:

1. Start emacs, find tex source and then view it using AUCTeX View
   command where the last step creates a new pdf-dedicated frame.
2. Start emacs, find pdf document which opens the pdf in a new
   pdf-dedicated frame.  Double-click in the pdf finds the tex source
   in the other (non-pdf) frame.
3. Start "emacs foo.pdf" which shows the pdf in the initial frame and
   the code makes sure this frame has the th/pdf-frame parameter.
   Double-click in the pdf which spawns a new frame showing the tex
   source.

In all three cases I tested forward/backward synctex search which seems
to work as you like.

But that's the last code for this topic from me.  I like helping and
giving hints but my spare time is too limited to write ready-made
solutions to problems that don't scratch an itch of my own. :-)

Also note that my solution or maybe your requirements have their
problems: now it's hard to add more rules to display-buffer-alist
because for all of them you have to encode the "but, please, not in the
pdf-frame" stuff.  It's pretty complicated.  FWIW, I simply use a large
wide frame with a side-by-site split where the tex source is displayed
in the left window and the pdf in the right window.  That works without
any special configuration and isn't less convenient, IMHO.

Bye,
Tassilo

Attachment: my-pdf-frame.el
Description: application/emacs-lisp


reply via email to

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