From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jakub Jankiewicz Newsgroups: gmane.emacs.help Subject: Re: Reading from a buffer Date: Wed, 1 Jul 2020 21:21:03 +0200 Message-ID: <20200701212103.2ebbfaa8@jcubic> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/=QZBM=TyDYTQ9ijww+/c5Xy"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7378"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Greg Hill Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 01 22:18:21 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 1jqjBV-0001rR-9r for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 22:18:21 +0200 Original-Received: from localhost ([::1]:44096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqjBU-0003q0-8K for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 16:18:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqiRR-0008Un-Na for help-gnu-emacs@gnu.org; Wed, 01 Jul 2020 15:30:45 -0400 Original-Received: from u1.atthost.pl ([2a0c:5840:0:15::1]:48348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqiRM-0005DG-Fx for help-gnu-emacs@gnu.org; Wed, 01 Jul 2020 15:30:45 -0400 Original-Received: from localhost (unknown [127.0.0.1]) by u1.atthost.pl (Postfix) with ESMTP id 5AE7E12A85E; Wed, 1 Jul 2020 19:21:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at atthost.pl Original-Received: from u1.atthost.pl ([185.255.40.21]) by localhost (atthost.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qbnxppm4eVJK; Wed, 1 Jul 2020 21:21:05 +0200 (CEST) Original-Received: from jcubic (unknown [185.129.114.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@jcubic.pl) by u1.atthost.pl (Postfix) with ESMTPSA id F16EE12A861; Wed, 1 Jul 2020 21:21:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 u1.atthost.pl F16EE12A861 In-Reply-To: X-Mailer: Claws Mail 3.17.3git196 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2a0c:5840:0:15::1; envelope-from=SRS0=1HO8=AM=jcubic.pl=jcubic@attmail.pl; helo=u1.atthost.pl X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Wed, 01 Jul 2020 16:15:07 -0400 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:123465 Archived-At: --Sig_/=QZBM=TyDYTQ9ijww+/c5Xy Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 1 Jul 2020 12:12:06 -0700 Greg Hill wrote: > I've pretty well mastered the process of *writing to* a buffer using > *insert* and *format*, but I haven't been able to find any equally easy w= ay > to read that same information back. I've hacked together a workaround usi= ng > *copy-to-register*, *get-register* and *read-from-string*, but surely the= re > must be a more straightforward approach than that. I've searched and > searched through all the documentation and have come up with nothing for > doing a simple formatted read from buffer. Any suggestions? I was asking same question few years ago on StackOverlow: [How to read contents of the file programmatically in Emacs?][1] [1]: https://stackoverflow.com/a/34434144/387194 -- Jakub Jankiewicz, Web Developer https://jcubic.pl/me --Sig_/=QZBM=TyDYTQ9ijww+/c5Xy Content-Type: application/pgp-signature Content-Description: Podpis cyfrowy OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEvGU/kjFLOYteHgvHpY7m8TH4MBMFAl784h8ACgkQpY7m8TH4 MBPP1wf9GdlxRrko3qWXspq0u3A51egLqkRDqZKSxhmdjhnmCrd0m9zIvs6AsDEw K8cvx4/TfzhpUdx6hxCBamxBB8GKEFAjuQEVDyxgF51+VrdqzPK3IdltRdFDozaE SIzOzPLZ5r0GD+h2kzD7f5YDFKvUkX/hciEd0xLx3n9jXlK3obLWjRRldNWNKstV i9h8pMEgtkU5v4f6OH8EkpgLotSGmGbFogBIIZYerlO/PbB0NxtFrVs75rCxpngr IsL+5RVr6O70zxxgaR8ufN0LyzetooJdm1sIXR0S8AcxO5aMePl5KQxH7UbJ9aG3 NIscl61NnLbeaPSx84MUDlUuLo1Gmg== =hZ5N -----END PGP SIGNATURE----- --Sig_/=QZBM=TyDYTQ9ijww+/c5Xy--