all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: bug-gnu-emacs@gnu.org
Subject: Re: bug#1939: suggestion: adding read-line function to elisp
Date: Tue, 20 Jan 2009 12:29:55 -0600	[thread overview]
Message-ID: <86ljt5g7a4.fsf@lifelogs.com> (raw)
In-Reply-To: mailman.5150.1232258617.26697.bug-gnu-emacs@gnu.org

On Sun, 18 Jan 2009 06:48:10 +0100 Juanma Barranquero <lekktu@gmail.com> wrote: 

JB> On Sat, Jan 17, 2009 at 19:13, xah lee <xah@xahlee.org> wrote:
>> Getting lines as list is a very frequent need.
>> 
>> elisp is very suitable for tasks of text processing. So, having such a
>> convenience function seems appropriate.

JB> Getting lines as list is much less frequent in elisp. The reason is
JB> that is much more flexible (and faster) to manipulate text in a buffer
JB> than as a collection of strings.

JB> So in most cases, using `with-temp-buffer' (as in your read-lines
JB> function) is the Right Thing To Do.

OTOH, it would be nice to have a way to call a lambda for every line in
a file (`mapfile' essentially) without using a buffer.  The function
would get the line and the line number as parameters.  That would let
Emacs Lisp do some processing of large files without running out of
memory.

Ted


      parent reply	other threads:[~2009-01-20 18:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-17 18:13 bug#1939: suggestion: adding read-line function to elisp xah lee
2009-01-18  5:48 ` Juanma Barranquero
     [not found] ` <mailman.5150.1232258617.26697.bug-gnu-emacs@gnu.org>
2009-01-20 18:29   ` Ted Zlatanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ljt5g7a4.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.