From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jeff Clough Newsgroups: gmane.emacs.help Subject: Lisp Questions - reading a file and processes stalling Date: Sun, 21 Mar 2010 20:41:57 -0400 Organization: A noiseless patient Spider Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1272996887 1659 80.91.229.12 (4 May 2010 18:14:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 4 May 2010 18:14:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 04 20:14:46 2010 connect(): No such file or directory Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O9Mdp-0006GP-Hw for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 20:14:45 +0200 Original-Received: from localhost ([127.0.0.1]:55786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9Mdo-0005nD-V9 for geh-help-gnu-emacs@m.gmane.org; Tue, 04 May 2010 14:14:44 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!news.mixmin.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Injection-Date: Mon, 22 Mar 2010 00:38:36 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="VDM3607lx+ft0F522riMcQ"; logging-data="9334"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WC0VO4NXSkZhku/s/4Yh0" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:L07tYLX+8GFNljxW0D+9HA9HwaQ= sha1:8CigwlOMUnKvFxyzpV0FG/T8Zbw= Original-Xref: usenet.stanford.edu gnu.emacs.help:177533 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73027 Archived-At: I've got a few questions I'm hoping someone here can answer. First, what is the lightest weight way of getting the contents of a file into a buffer? Stepping through insert-file-contents and format-insert-file (with the requisite nil) seems to involve huge numbers of calls and a lot of winding/unwinding the stack. I have a function that wants to open thousands of files, examine them then put them away. This is obviously slow and I'm wondering if I made some boneheaded error in using these functions in the first place. To be fair, my code is slow for reasons other than this, but I'm taking one lump of molasses at a time. Second, I have Emacs running an external program as a process. When some other lengthy operation is happening elsewhere in Emacs (like Gnus is trying to display the headers for a group*), that process stalls, then picks up where it left off once the operation is done. Is there any way to make Emacs not steal the resources from this process, or am I doing something hopelessly wrong? * - Yes, I'm running Gnus now. Those who remember my earlier rantings can feel free to slap me around. I still hate it, but it's proven to be better than Mew. Jeff