From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: doc-view.el now allows searching Date: Fri, 31 Aug 2007 22:16:40 +0200 Organization: University Koblenz-Landau Campus Koblenz Message-ID: <87d4x3bgt3.fsf@baldur.tsdh.de> References: <87wsvnfoyp.fsf@baldur.tsdh.de> <878x7ylhdk.fsf@baldur.tsdh.de> <87fy26gn55.fsf@baldur.tsdh.de> <874pil8f2m.fsf@baldur.tsdh.de> <87odgsjef5.fsf@baldur.tsdh.de> <87absbg53e.fsf@baldur.tsdh.de> <878x7ujfov.fsf@baldur.tsdh.de> <87odgptrwx.fsf@baldur.tsdh.de> <877indtf1o.fsf_-_@baldur.tsdh.de> <87zm075022.fsf@baldur.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188596488 30881 80.91.229.12 (31 Aug 2007 21:41:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 31 Aug 2007 21:41:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 31 23:41:26 2007 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.50) id 1IREEv-0007D1-Lt for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Aug 2007 23:41:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IREEv-0003r2-21 for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Aug 2007 17:41:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!kanaga.switch.ch!switch.ch!news.belwue.de!news.uni-kl.de!cache.uni-koblenz.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: dslb-084-063-036-061.pools.arcor-ip.net Original-X-Trace: cache.uni-koblenz.de 1188591401 11601 84.63.36.61 (31 Aug 2007 20:16:41 GMT) Original-X-Complaints-To: news@cache.uni-koblenz.de Original-NNTP-Posting-Date: Fri, 31 Aug 2007 20:16:41 +0000 (UTC) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUSEQ9eW1Dkxz/6+fjQ w52JeEi7Imd/AAAACXBIWXMAAAsSAAALEgHS3X78AAAATnRFWHRSYXcgcHJvZmlsZSB0eXBlIGV4 aWYACmV4aWYKICAgICAgMjAKNDU3ODY5NjYwMDAwNGQ0ZDAwMmEwMDAwMDAwODAwMDAwMDAwMDAw MAqJuBZbAAAACXZwQWcAAAAwAAAAMADO7oxXAAABk0lEQVQ4y32TS3KDMAxAxQB7uyEHiGvvoSh7 sMSeJnD/q9Q/DBmYamNZz/oioM8ySkn7DbL2bHiUV+CODTflGXTSC5xBWwRAJzBAkPIEhLMWANUZ 3ETRt1CcAbcVdhdgmMZq5CsPsS6iufJ4EY7rFVg0WwNwblA5+Q/QCbADtLeewUxKcT/n1g8x0UVp c5Lt7Op4ANw+wfwOB+YxJoA5wlZXMnSwT788gmEbhUtSHMFWPuEnwK0WD6IOKUDISIckkFYk+KWl qHYgUvGIOKYkEeQJEQ5H0EETrERIbWoxgTLmQCLvsQNRhpqQELvmF3Kop17Ce+yJf6WsM7D8CMNF 7pcZoN5C4cLWlUXsiHY5bAKsmXn2c2BCPYkGI0BtHTGFrxX5RUz8jkBZ1tqKt8vOrC1bNgk4M6v5 5jyYvzQrtjqCICN7+8hWaaXNAahvwn66R92QA88ENCPPCSze4ycBI6WQdVBXOoYy/ndeN3tocH35 68MDH8os26zQGHd/+XcYE+xbMpk1LuC0mo9NdANOX10n5Q8J6syYNMm6EgAAABp6VFh0anBlZzpj b2xvcnNwYWNlAAB42jMCAAAzADOJOCM1AAAAJnpUWHRqcGVnOnNhbXBsaW5nLWZhY3RvcgAAeNoz qjDSMawwBGEAEYMC6T2XL08AAAAASUVORK5CYII= User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:Svcf+AWTGirbgF0HNPH+qPXO9GM= Original-Xref: shelby.stanford.edu gnu.emacs.help:151524 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:47045 Archived-At: Peter Dyballa writes: Hi Pete, >> First, I thought it might have something to do with the size of the >> pdf file or blank pages not being counted; however, searches of the >> sicp.pdf book all seemed to produce correct results, so I'm not sure >> why the search functionality doesn't work properly in some instances. > > The reason is probably that pdftotext is used with the -raw option, > which deletes all empty lines leading white space. There is another > option: -layout. I use -raw here and don't have any problems. Both versions have 528 occurences of ^J and that's what doc-view uses for counting pages. > I think doc-view should check the number of pages first (pdfinfo > | grep -i pages | awk '{print $NF}'). If the number is greater > 1 than -layout should be more appropriate ... I don't like -layout, because then the context of the search matches contain those whitespaces, too. Maybe you use an older (buggy) pdftotext version? > BTW, -layout is bit faster! Not here: heimdall@baldur ~/t/test> time pdftotext -raw practicalcommonlisp.pdf pcl.txtraw 21.11user 0.21system 0:21.60elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+1135minor)pagefaults 0swaps heimdall@baldur ~/t/test> time pdftotext -layout practicalcommonlisp.pdf pcl.txtlayout 21.84user 0.22system 0:22.34elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+1400minor)pagefaults 0swaps Bye, Tassilo -- Chuck Norris is the only man who has, literally, beaten the odds. With his fists.