[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use pdf-tools in Emacs.
From: |
Hongyi Zhao |
Subject: |
Re: use pdf-tools in Emacs. |
Date: |
Sat, 29 Apr 2023 10:17:41 +0800 |
On Fri, Apr 28, 2023 at 10:00 PM Tassilo Horn <tsdh@gnu.org> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> >> If you always want to spawn a new frame when finding a PDF document, I
> >> guess you have to add a rule to display-buffer-alist.
> >
> > I want to use a new frame to show the PDF document with the LaTeX code
> > in another frame, and at the same time keeping the forward and reverse
> > searching work by skipping between these two frames backward and
> > forward accordingly.
>
> If the pdf is shown in a buffer of another frame makes no difference to
> forward/inverse search as long its the same emacs instance. This should
> work for you:
>
> (add-to-list 'display-buffer-alist
> '((derived-mode . pdf-view-mode)
> display-buffer-pop-up-frame))
>
> It tells emacs to open buffers where pdf-view-mode is the major-mode to
> be opened in a separate frame.
I tried the following configuration:
(use-package pdf-tools
:ensure t
:init
(pdf-tools-install)
:config
(add-to-list 'display-buffer-alist
'((derived-mode . pdf-view-mode)
display-buffer-pop-up-frame))
)
See the attached screenshot for the effect. In short, frame 1 will
open frame 2, and 2 will open 3. But I just want to open frames 1 and
2 and automatically switch between them for forward and backward
search.
> Bye,
> Tassilo
Best,
Zhao
image.png
Description: PNG image
- Re: use pdf-tools in Emacs., (continued)
- Re: use pdf-tools in Emacs., Tassilo Horn, 2023/04/27
- Re: use pdf-tools in Emacs., Hongyi Zhao, 2023/04/27
- Re: use pdf-tools in Emacs., Tassilo Horn, 2023/04/28
- Re: use pdf-tools in Emacs., christian de larrinaga, 2023/04/28
- Re: use pdf-tools in Emacs., Hongyi Zhao, 2023/04/28
- Re: use pdf-tools in Emacs., Tassilo Horn, 2023/04/28
- Re: use pdf-tools in Emacs., Hongyi Zhao, 2023/04/28
- Re: use pdf-tools in Emacs., Tassilo Horn, 2023/04/28
- Re: use pdf-tools in Emacs.,
Hongyi Zhao <=
- How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Tassilo Horn, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Hongyi Zhao, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Tassilo Horn, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Hongyi Zhao, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Tassilo Horn, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Hongyi Zhao, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Hongyi Zhao, 2023/04/29
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Tassilo Horn, 2023/04/30
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Hongyi Zhao, 2023/04/30
- Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.), Hongyi Zhao, 2023/04/29