From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jakub Jankiewicz Newsgroups: gmane.emacs.help Subject: Re: Opening multiple files in a single buffer? Date: Sat, 13 Jun 2020 17:49:58 +0200 Message-ID: <20200613174958.39eeefeb@jcubic> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/FrqsZgnKf5+_VL78hR1gMcE"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="1680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Gregory Heytings Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 13 17:50:47 2020 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 1jk8Qg-0000Nw-D2 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 17:50:46 +0200 Original-Received: from localhost ([::1]:56632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jk8Qf-0006Go-CY for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 13 Jun 2020 11:50:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk8QA-0006Ea-Ek for help-gnu-emacs@gnu.org; Sat, 13 Jun 2020 11:50:15 -0400 Original-Received: from smtpo79.poczta.onet.pl ([141.105.16.29]:58867) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jk8Q6-0007bF-Vx for help-gnu-emacs@gnu.org; Sat, 13 Jun 2020 11:50:14 -0400 Original-Received: from jcubic (unknown [185.129.113.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 49khqq5tWgz4f6gZ8; Sat, 13 Jun 2020 17:49:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onet.pl; s=2011; t=1592063400; bh=GjyZfzvnkrZBXdt4xZ3EUoY8UFQ9qv62YMZdq8aTlU4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZGEQa/zyeeROctZeVYZVoPsvtykM/2ta5xcVT72dDwWrACHudLpocD1k8WcqmfkL9 aL7b6wqPGggsqDRWjGflID76aVzOpjhQN89RlEwSYb6H3wWS3pzHPX9VGe7Xsk46Hx Y6dIKumYcpoYJLxx+9zSdmRh3gPEdgw45EaaPROM= In-Reply-To: X-Mailer: Claws Mail 3.17.3git196 (GTK+ 2.24.32; x86_64-pc-linux-gnu) X-ONET_PL-MDA-SEGREGATION: 0 Received-SPF: pass client-ip=141.105.16.29; envelope-from=jcubic@onet.pl; helo=smtpo79.poczta.onet.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/13 11:50:05 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.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, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:123373 Archived-At: --Sig_/FrqsZgnKf5+_VL78hR1gMcE Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 13 Jun 2020 14:31:52 +0000 Gregory Heytings wrote: > Dear List, >=20 > I've now been using Emacs for many, many years, and there is perhaps a=20 > single feature I'm really missing, namely opening more than one file in a= =20 > single buffer, with the contents of the files appearing one after the=20 > other in the same buffer, with some kind of visual separator between them= .=20 > I don't know if that feature exists in other text editors. >=20 > For example, suppose you write a book, which has fifteen chapters in file= s=20 > chap1.tex, ..., chap15.tex. Opening these files in a single buffer means= =20 > that you could use isearch-{forward,backward} in the whole book. (I know= =20 > that multi-isearch-buffers could be used in this particular case, but it= =20 > is not as convenient to use.) You could also use query-replace on the=20 > whole book, or reindent all files, or execute shell-command on all files= =20 > at once, and so forth. (Again I know that all this can be done with=20 > already existing features, e.g. through dired, but again I find them not= =20 > as convenient as what I have in mind.) >=20 > Each file would have its own major and minor modes, and the mode-line=20 > would adapt depending on the file corresponding to the buffer portion in= =20 > which the point is currently located. >=20 > My question is: Is this feasible, or is the one-to-one correspondence=20 > between buffers and files too deeply rooted in Emacs' codebase that it is= =20 > not feasible? If it is feasible, could this feature be considered for=20 > implementation in a future Emacs version? I think it's doable, it may require lot of work, to do this right though. The only limitation I think is that you may have problems with multiple maj= or modes, but there is mode that do that polymode use different major modes in same buffer and since you can create almost anything in Emacs (e.g. ERC, dired mode or web browser) you probably can create something like this. If you know ELips you can try writing something like this. Probably user wi= ll use it to edit books if it would be easy to use. -- Jakub Jankiewicz, Web Developer https://jcubic.pl/me --Sig_/FrqsZgnKf5+_VL78hR1gMcE Content-Type: application/pgp-signature Content-Description: Podpis cyfrowy OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEvGU/kjFLOYteHgvHpY7m8TH4MBMFAl7k9aYACgkQpY7m8TH4 MBNz/QgApSnWehg9jjFs2zYFZHfuWkwmKQ0BQV9P7veMQZYDvbn4y1mkkQghazYG o/3hfc1HXANRGy68ggHNgLdDv0qQpbwSRgZeBBTtn+VPa48xyglMicG0c+3xJC6s IdGOufNfhJKVLtJV0TuZfSSgqHs4FKFWL8q2McMQWHclPbY+c4PlmJEFkLjBGVuT O4V4uvMQgAL7Nr9bHmie6CLHJydiji7eHxEO0HXpwiBiG3TBRlPDWXYgGxEGPP5H vyycSSMTwdebg97M4iv2IzQ1a9Xwbd9SDCS+mKIZrvGk/LoATQf5hnMDpgfAqrRr DXlPBMgDp10Ox1eUYO8UNJV0Pmtemw== =HviU -----END PGP SIGNATURE----- --Sig_/FrqsZgnKf5+_VL78hR1gMcE--