From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.help Subject: Re: Memory-efficient way of opening large files in Emacs read-only Date: Thu, 08 Dec 2022 17:13:15 +0300 Message-ID: References: <8e91d0e8-2474-dd98-9bca-4606becd974d@mikpom.ru> 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="14233"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Mikhail Pomaznoy Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 15:14:06 2022 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 1p3Hf3-0003Ug-VF for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 15:14:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3HeT-0008M8-LA; Thu, 08 Dec 2022 09:13:29 -0500 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 1p3HeR-0008Lb-2C for help-gnu-emacs@gnu.org; Thu, 08 Dec 2022 09:13:27 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3HeP-0006yl-8D for help-gnu-emacs@gnu.org; Thu, 08 Dec 2022 09:13:26 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 3D2FD3200932; Thu, 8 Dec 2022 09:13:21 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 08 Dec 2022 09:13:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1670508800; x= 1670595200; bh=pTRc0AM6xhzORV5NMwPLIwMHqdVkcnniUQc3YHJo2BA=; b=M ZRwIZf2paWWDmFTrFLuxBR3B0wyqqhkoIf1h+HlFfKSLq8QEPmInZp3KspNflsCg XnZco/OlZrvp373fBfhOhP1wJV7vInrqkpX5Prkq236Hbx6TGxQOSMAP+HWsGnfa ylozF/oQykv8XUwjeP/MO46hNWzGbv7BqRI2A1T9KNgcn5HGl/y78+mALevMGs4O vbVxJeZuDM/jq6qf1jvkcYySLvGDqlXVn4XZt45Dqz6ycRrw7zeUG97EpRH177WI F2ynkR5gTV+OKzqY6sIPayI3JgHFQj0qRwQ0hdikx1NresFFvUjG+zaW9B+IRG4+ pl2uHQgA6RSbW2nTyvoRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1670508800; x= 1670595200; bh=pTRc0AM6xhzORV5NMwPLIwMHqdVkcnniUQc3YHJo2BA=; b=o 2FvJf9jcTUSXq4ld4YARxhH0oGrh8Gqh/2x2YIVsf8/sxzjTOJDpWkWR70nMBban Yc4YhXRoClf67VYoyj9WtmNt4SHMNRcZhBZNDhMjNqww9hijfyzaZhH7OIO93XMT x5V2IPkKdKpc0TGVoCu/8v9hUCP+dST5NtmGaKw6Z9HTiwd9s37j/va3hfkeTHCr 0bIorHWWYwyGYN9mmCRE/jPAs87RtbBOAt5OCNAI0EowYlFASj0hbfQipa1P8231 1v9wVnSoAtBpVjXs+G59a1xJYWYvGRh+F2x8hlR6Q4lwiWS+IxVxCxZIiLcX6h6a INdvBfCYgXMZEf3naIyxA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddtgdeiudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufgjfhgffffkgggtgfesthhqredttderjeenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpeefleefffetieetuedvtedtgfehgeevtefhueevjeehjeelueeigfev tdeihfeugeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehfghhunhgsihhnsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Dec 2022 09:13:19 -0500 (EST) In-Reply-To: <8e91d0e8-2474-dd98-9bca-4606becd974d@mikpom.ru> (Mikhail Pomaznoy's message of "Thu, 8 Dec 2022 09:49:26 +0700") Mail-Followup-To: Mikhail Pomaznoy , help-gnu-emacs@gnu.org Received-SPF: pass client-ip=64.147.123.19; envelope-from=fgunbin@fastmail.fm; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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:141457 Archived-At: On 08/12/2022 09:49 +0700, Mikhail Pomaznoy wrote: > In my daily workflows I commonly stumble upon a task of peeking into a > header of a large (sometimes compressed) file. Those files can > commonly be gigabytes in compressed form so can't fit into memory. I > was wondering how can this be done in Emacs to leverage its search and > navigate capabilities? > > In a terminal this task is nicely accomplished with `less`, which > loads file on demand while you scroll (memory-efficiently) and > automatically detects at least gzip compression. However I am > struggling to do something similar in Emacs for quite a long time.=C2=A0 I > tried VLF (requires manually switching chunks loaded, encountered > problems with compression), view-file (loads everything in memory), > running less in Emacs terminals (I prefer outside-Emacs terminals) but > for various reasons all this solutions are suboptimal and I usually > end up with using `less`. > > Is there something in Emacs I am missing? Is something like this makes > sense to develop (I consider to write something for Emacs) ? I am > using Emacs 28 and maybe in Emacs 29 there are novelties related to > this issue? Perhaps the best way is to report vlf bugs and fix them. Filipp