From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: How to have a frame dedicated to buffers of a certain kind? (was: use pdf-tools in Emacs.) Date: Tue, 9 May 2023 08:03:11 +0800 Message-ID: References: <87edo52mtg.fsf@gnu.org> <87o7n8jwzw.fsf@gnu.org> <87jzxwjghd.fsf@gnu.org> <87fs8kjedb.fsf@gnu.org> <87ildfdqwu.fsf@gnu.org> <87fs8jauv0.fsf@gnu.org> <87y1mafo4i.fsf@gnu.org> <87354h9osf.fsf@gnu.org> <878re8h87w.fsf@gnu.org> <875y9ak17o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12408"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefan-husmann@t-online.de, help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 09 02:03:57 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pwAph-00030s-1C for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 09 May 2023 02:03:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pwApG-0001Pt-Ot; Mon, 08 May 2023 20:03:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwApF-0001Pd-FG for help-gnu-emacs@gnu.org; Mon, 08 May 2023 20:03:29 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pwApB-0008SE-9j; Mon, 08 May 2023 20:03:29 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-50bc570b4a3so9790750a12.1; Mon, 08 May 2023 17:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683590603; x=1686182603; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aaGfrVgXYgZ1gLsy/CNwOJIYFot3vHhEktVsQhu76Ro=; b=c7V2u5676wt/lIy8UhHH7kfHdZ4KBo1J+9i7zCSqqLl3ssUHPxzOiguGZ0Ev4NGLuC unHL07EQHZnB9INrkSSg4sVCmTpeJH9c8qOExWRz8PUudCclQfptwraMAPNfyM5uJAJi 5rXduNRlh47HewUwEk95Q1Ujq/mLl+mncDtbxJHULekTCywUfEtqHzqYr8CUBKVcEchO AUahtHdJREb34LlCoW3HXunTpm8f/xYyWsD/VrZU90ohO0eQgEVv1BgzrQDf0tXoOxrh jrC8VkzYDTM8t6+JI1DWgtAkL8zzdtJCs++kUs7aB6Ygok46CZsaeW3h0/J0hdQVrI1x SnQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683590603; x=1686182603; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aaGfrVgXYgZ1gLsy/CNwOJIYFot3vHhEktVsQhu76Ro=; b=i4wKYmTZV/mtcPhEtEYEGdy/9wCGA3+3kt485qPQB/Q6eGIqnU7wd/3BXyNv492FKT BVAaH+u3QT50F9dHm06tNqaWBeRWO3mI3R2x4VTrc+LGomIiOLk71YV74ua0MPnLVPqg VbhC7+Xs7HGEyiCkbnJilBoNlvK3Xl1G6hIQ3TlwBB3ICY0hxJ5Tmm/+yHhIpo3hnp86 jqByFbumgApVtpHjXBIIbqGXnrjcuVtuT1bFbn/lJse9Vrt9kqVEpuPQarcvLCCTXOe9 MreRGJfSWNf+FuiB1l3T9lidFb/r9iv8Evx8JMkuRYILyS5mDSWUL5Gs7DcmoQvEJnC/ iPLA== X-Gm-Message-State: AC+VfDyhdZ+vA5a4rF1NZFvUZPIGJV6EkTorflX3yLBpLVn5dndLxtf4 grEVwOf0dDn0vRqqtYtWVgrlSQE2Zqghu8IYiwfhAW+lBqiVnzFz7Waipw== X-Google-Smtp-Source: ACHHUZ69EN+H1Jk7LDffjqs/NuswDz6lD8Rgcbz9SjlUoCuJEjFfSfiEpNBAhfjPAkIK6RR4JKHqW5S9d2WkJZtJQw4= X-Received: by 2002:a17:907:5c5:b0:965:9edf:f0d0 with SMTP id wg5-20020a17090705c500b009659edff0d0mr9712566ejb.13.1683590602759; Mon, 08 May 2023 17:03:22 -0700 (PDT) In-Reply-To: <875y9ak17o.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=hongyi.zhao@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143539 Archived-At: IMHO, the topic discussed here is especially useful, say, when one works in multi-monitors tiling environment, where the LaTeX source and PDF can be easily put on different monitors. Best, Zhao On Wed, May 3, 2023 at 3:00=E2=80=AFAM Tassilo Horn wrote: > > Hongyi Zhao 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