all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Hongyi Zhao <hongyi.zhao@gmail.com>
Cc: stefan-husmann@t-online.de, help-gnu-emacs@gnu.org
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	[thread overview]
Message-ID: <875y9ak17o.fsf@gnu.org> (raw)
In-Reply-To: <CAGP6PO+Erb2NNTR3madpouUVtj2oxEHOSM7cLe_Eo9+7gbw3kA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

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 #2: my-pdf-frame.el --]
[-- Type: application/emacs-lisp, Size: 1989 bytes --]

  reply	other threads:[~2023-05-02 18:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 14:50 use pdf-tools in Emacs Hongyi Zhao
2023-04-25 15:09 ` Rudolf Schlatte
2023-04-26  2:01   ` Hongyi Zhao
2023-04-27 11:23     ` stefan-husmann
2023-04-27 15:02       ` Tassilo Horn
2023-04-27 15:27         ` Hongyi Zhao
2023-04-27 15:53           ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-04-27 23:54             ` Hongyi Zhao
2023-04-27 18:30           ` Tassilo Horn
2023-04-27 23:55             ` Hongyi Zhao
2023-04-28  7:15               ` Tassilo Horn
2023-04-28 10:48                 ` christian de larrinaga via Users list for the GNU Emacs text editor
2023-04-28 12:43                 ` Hongyi Zhao
2023-04-28 13:11                   ` Tassilo Horn
2023-04-28 13:37                     ` Hongyi Zhao
2023-04-28 13:58                       ` Tassilo Horn
2023-04-29  2:17                         ` Hongyi Zhao
2023-04-29  8:30                           ` How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.) Tassilo Horn
2023-04-29  9:25                             ` Hongyi Zhao
2023-04-29  9:35                               ` Tassilo Horn
2023-04-29 10:08                                 ` Hongyi Zhao
2023-04-29 19:37                                   ` Tassilo Horn
2023-04-30  0:42                                     ` Hongyi Zhao
2023-04-30  0:52                                       ` Hongyi Zhao
2023-04-30 18:59                                         ` Tassilo Horn
2023-05-01  0:28                                           ` Hongyi Zhao
2023-05-01  6:15                                             ` Tassilo Horn
2023-05-01  7:21                                               ` Hongyi Zhao
2023-05-02 18:38                                                 ` Tassilo Horn [this message]
2023-05-03  1:45                                                   ` Hongyi Zhao
2023-05-03  2:37                                                     ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-05-03  3:24                                                       ` Hongyi Zhao
2023-05-03  3:38                                                         ` Hongyi Zhao
2023-05-03  7:48                                                     ` Tassilo Horn
2023-05-09  0:03                                                   ` Hongyi Zhao
2023-04-30  1:05                                 ` Hongyi Zhao
2023-05-01 10:09             ` where to get "use-package"? [was: Re: use pdf-tools in Emacs] gebser
2023-05-01 10:30               ` Philip Kaludercic
2023-05-02  0:46                 ` gebser
2023-05-18 14:51   ` use pdf-tools in Emacs Björn Bidar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875y9ak17o.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hongyi.zhao@gmail.com \
    --cc=stefan-husmann@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.