From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.bugs Subject: bug#8364: 24.0.9999; PATCH: Fit to width/height/page for doc-view.el Date: Tue, 29 Mar 2011 11:32:16 +0200 Message-ID: References: <878vvz8sml.fsf@fastmail.fm> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1301391510 31347 80.91.229.12 (29 Mar 2011 09:38:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2011 09:38:30 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 29 11:38:24 2011 Return-path: Envelope-to: geb-bug-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 1Q4VNW-0001Um-9k for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2011 11:38:22 +0200 Original-Received: from localhost ([127.0.0.1]:51868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4VNV-0001tk-T9 for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 Mar 2011 05:38:21 -0400 Original-Received: from [140.186.70.92] (port=53934 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4VMP-0000ua-TA for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 05:37:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4VMO-0000x2-NA for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 05:37:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4VMO-0000wy-Jp for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 05:37:12 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q4VLG-0001R3-2l; Tue, 29 Mar 2011 05:36:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <878vvz8sml.fsf@fastmail.fm> Resent-From: joakim@verona.se Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 Mar 2011 09:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8364 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by submit@debbugs.gnu.org id=B.13013913205471 (code B ref -1); Tue, 29 Mar 2011 09:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Mar 2011 09:35:20 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4VKZ-0001QC-T7 for submit@debbugs.gnu.org; Tue, 29 Mar 2011 05:35:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4VKX-0001Pz-MH for submit@debbugs.gnu.org; Tue, 29 Mar 2011 05:35:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4VKR-0000m1-Bn for submit@debbugs.gnu.org; Tue, 29 Mar 2011 05:35:12 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:59336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4VKR-0000lv-9e for submit@debbugs.gnu.org; Tue, 29 Mar 2011 05:35:11 -0400 Original-Received: from [140.186.70.92] (port=34790 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4VKQ-0007Tv-71 for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 05:35:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4VKO-0000lj-Vp for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 05:35:10 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:40186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4VKO-0000la-OR for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 05:35:08 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q4VKM-0008Lz-GU for bug-gnu-emacs@gnu.org; Tue, 29 Mar 2011 11:35:06 +0200 Original-Received: from h-79-136-103-132.na.cust.bahnhof.se ([79.136.103.132]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2011 11:35:06 +0200 Original-Received: from joakim by h-79-136-103-132.na.cust.bahnhof.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2011 11:35:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: h-79-136-103-132.na.cust.bahnhof.se User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:pTzdNAno3qZsDHJqrSLbGc93Jh0= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 29 Mar 2011 05:36:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45465 Archived-At: Stefan Monnier writes: >>> Good, thanks.  I'll still have to do it by hand, sadly, since I like to >>> "fit the text" rather than "fit the page", i.e. I like to keep the >>> margins outside of the viewable area.  A command to do that >>> automatically would be really nifty. >> Sad to say, I have no idea to realize such function, although I completely >> agree with you. > > Neither do I, which is why I haven't implemented it yet. > > Actually, I think it's largely impossible to do it the way I like to do > it by hand, because I often keep page headers and footers outside of the > viewable area, so the tool would have to be able to recognize those > automatically, which seems close to impossible. > I've tried to use pdfcrop a few times but it almost always bumps into > some text displayed in some corner and ends up showing me more than > I want to see. "unpaper" is free software and is actually pretty good at finding margins automatically. Maybe that could be called optionally? It would just be used to find margins and provide the coordinates to docview. Also I have some code to call "opencv" to find lens dust in an Emacs image in my "Emsane" package on github. Just some random feedback for you. > > > Stefan > > > > -- Joakim Verona