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:48 +0200 Message-ID: <20200701212148.2a2f58c3@jcubic> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/pqPdmUr7pr/9dLSSjfZIsax"; protocol="application/pgp-signature"; micalg=pgp-sha256 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3174"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 01 21:22:39 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 1jqiJb-0000j7-B8 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 21:22:39 +0200 Original-Received: from localhost ([::1]:38610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqiJa-0006cP-Db for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 01 Jul 2020 15:22:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqiJ1-0006c5-FV for help-gnu-emacs@gnu.org; Wed, 01 Jul 2020 15:22:03 -0400 Original-Received: from smtpo71.poczta.onet.pl ([141.105.16.21]:33796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqiIz-0000hJ-Kx for help-gnu-emacs@gnu.org; Wed, 01 Jul 2020 15:22:03 -0400 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@onet.pl) by smtp.poczta.onet.pl (Onet) with ESMTPSA id 49xrgz2lhsz4f71Dn for ; Wed, 1 Jul 2020 21:21:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onet.pl; s=2011; t=1593631311; bh=EqsKwaoaZiWEbZ/SbsZZ8DueFW6PkTqTcixpSUyYJcg=; h=Date:From:To:Subject:In-Reply-To:References:From; b=R9xbhr+ruNtr8+fEEuNL7J9uPAW8M6YGa8r7UEeGrkxKQyXayujk74HHHVeB3IGTq 4aBnulySM1JiRnWgJrcbds51isxIa1SvDESfLy6uwI5hVucqKlW1bozsblsNChXTPi cADH7wSi/nDIMqxEXHJadMpmbjJFWTvEqg4aHg+s= In-Reply-To: X-Mailer: Claws Mail 3.17.3git196 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Received-SPF: pass client-ip=141.105.16.21; envelope-from=jcubic@onet.pl; helo=smtpo71.poczta.onet.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/01 15:21:56 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:123464 Archived-At: --Sig_/pqPdmUr7pr/9dLSSjfZIsax 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_/pqPdmUr7pr/9dLSSjfZIsax Content-Type: application/pgp-signature Content-Description: Podpis cyfrowy OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEvGU/kjFLOYteHgvHpY7m8TH4MBMFAl784kwACgkQpY7m8TH4 MBP9CwgAl+YcHsGlDa9idrJObGr9T8EoLphw7mwQ8DKnI5YN8Lpg7HDW1x80W7rH rcGpUDyKb2yEIGbpLdhGK+ObYbR6eY0efld/FXYkc4wyCa+ZZFz3d75iJUbmYGbE Y0ny3FFrlCGFRWyS5XlTS/2oGsZg/LRh+f49u25pgnz+qmrcttMpUvN4ecfv6HVc w4Kfatuc6B1nOozLMhowYJsKtTP8ZxOk7zC9WJBzbAZ0eXLPL9mKzdeXYyYi3LCC he7x8msyCAoEDmSXn3fFoh9xJwMSpdD2PN9+KAYE5PiZ7rRbzx8VgOj1dLFPL0Mp NdfIbQtGR517FsrSelWEiMeSGg7Azw== =bNnO -----END PGP SIGNATURE----- --Sig_/pqPdmUr7pr/9dLSSjfZIsax--