From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn 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: Wed, 03 May 2023 09:48:01 +0200 Message-ID: <87ild9yhk5.fsf@gnu.org> References: <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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="898"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.4; emacs 30.0.50 Cc: stefan-husmann@t-online.de, help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 03 09:56:46 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 1pu7Ly-000AeO-G4 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 03 May 2023 09:56:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pu7Lb-0001ic-Hf; Wed, 03 May 2023 03:56:23 -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 1pu7LV-0001iJ-TL for help-gnu-emacs@gnu.org; Wed, 03 May 2023 03:56:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pu7LU-0000Tk-TH; Wed, 03 May 2023 03:56:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=i0aIiRg/pLYm55vi3P1y6Ioc44TLmJdK4rBjU3SzS5c=; b=fvqmFYyYsl8loG 8iX287+Zh/FSIi2rgJMO/1D5v0XCGkM21tY8BhfDOrEhBj7QoLE0U4wZVKUeBxkeMKovnvzFjb+/K BcgK5B/DO5HvHYXKQQq6U9Gzas9GNH7t8+jEE3p5nZl8MvYRUMhSHA1gdpobEv+lcLUqekBx0pl7C USZiiY0RJ8rH2mTtZJKQ+3+0dquBKN5j21i6PTARr/hZGDGmUit3gQlMWyu4ul5b5xIyZbr6I1eXL /nPpCiziqODIZS3N7zIav6ac6HhJPGHD06MzQoSi9svl4eJeSFv6dyuV+8nDEsrqMP+z8vdyuHETq lk3KJp/AoMs9WYovw4Ng==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pu7LU-0000kd-I3; Wed, 03 May 2023 03:56:16 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 011DC27C0054; Wed, 3 May 2023 03:56:14 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 03 May 2023 03:56:15 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvjedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epudejtdehuddvleffjeekteegvdehleehvdeufefhueekkeekhedvgfeggeffvefgnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 May 2023 03:56:13 -0400 (EDT) In-reply-to: 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:143502 Archived-At: Hongyi Zhao writes: >> 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. > > Agreed. What's your configuration for this simple purpose? None, I think. split-window-preferred-function is split-window-sensibly in recent emacsen and split-width-threshold is 160 by default which fits my screen resolution and habit to have one fullscreen emacs frame. So when emacs splits, I get two side-by-side windows, each about 80 columns wide. > What I can think of is something like the following: > > ;; Split windows horizontally and display the PDF and TeX source side-by-side > (setq split-width-threshold 1000) That tells emacs that split-window-sensibly may only split a window horizontally (i.e., into two side-by-side windows) if the window being split is at least 1000 columns wide. Basically, you ensure that horizontal splits will never ever occur unless you have a screen that's 5 meters wide. :-) > (add-hook 'TeX-after-compilation-finished-functions > #'(lambda () (pdf-tools-deactivate-strip))) Instead of the lambda, #'pdf-tools-deactivate-strip will also do. And aside from that, this function is undefined in my (the current MELPA) version of pdf-tools... Bye, Tassilo