From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#36654: Docview: show current zoom % in the modeline bar Date: Fri, 19 Jul 2019 09:20:36 +0200 Message-ID: <87pnm61oe3.fsf@gnu.org> References: <87wogkzvg0.5.fsf@jidanni.org> <87h87jqjik.fsf@gnu.org> <871rymlpul.7.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="208913"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36654-done@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 19 09:21:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hoNCX-000sFN-6N for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jul 2019 09:21:09 +0200 Original-Received: from localhost ([::1]:42756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoNCW-0005qt-0G for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jul 2019 03:21:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59685) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoNCS-0005or-8j for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:21:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoNCR-0004XE-26 for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:21:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46223) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoNCQ-0004X7-V7 for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:21:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hoNCQ-0001O0-Pc for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:21:02 -0400 Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2019 07:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 36654 X-GNU-PR-Package: emacs Mail-Followup-To: 36654@debbugs.gnu.org, tsdh@gnu.org, jidanni@jidanni.org Original-Received: via spool by 36654-done@debbugs.gnu.org id=D36654.15635208505283 (code D ref 36654); Fri, 19 Jul 2019 07:21:02 +0000 Original-Received: (at 36654-done) by debbugs.gnu.org; 19 Jul 2019 07:20:50 +0000 Original-Received: from localhost ([127.0.0.1]:55043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoNCE-0001N9-HT for submit@debbugs.gnu.org; Fri, 19 Jul 2019 03:20:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoNCC-0001Mx-DR for 36654-done@debbugs.gnu.org; Fri, 19 Jul 2019 03:20:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hoNC4-0004Fa-Q3; Fri, 19 Jul 2019 03:20:41 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:56487) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1hoNC4-0003WL-JS; Fri, 19 Jul 2019 03:20:40 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id 6D33A2234A; Fri, 19 Jul 2019 03:20:39 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 19 Jul 2019 03:20:39 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieeigdduvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufhffjgfkfgggtgfgsehtqh ertddtreejnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdr ohhrgheqnecukfhppeegiedrkedtrdejtddrvdehnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhorhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeek jeekgedqieefhedvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfh hmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Original-Received: from thinkpad-t440p (p2e504619.dip0.t-ipconnect.de [46.80.70.25]) by mail.messagingengine.com (Postfix) with ESMTPA id 47E978005C; Fri, 19 Jul 2019 03:20:38 -0400 (EDT) In-Reply-To: <871rymlpul.7.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Fri, 19 Jul 2019 10:28:50 +0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163367 Archived-At: Tags: wontfix =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > Well all I know is gv(1), firefox(1), chromium(1) all show the new > "xx%" every time one zooms or unzooms, if not permanently shown on > their panels, then at least on a brief popup. Yes, right. However, DocView just shows just images converted from the document. It has no clue about the original document's paper size, e.g., US Letter, DIN A4, etc. So it's not really feasilble to show a meaningful percentage without using external tools to query that information. I'm assuming that with usual document readers a zoom level of 100% means "Assuming you configured the correct DPI for you monitor [which, I guess, almost nobody has], the document is displayed in the same size as if it were printed out on a sheet of paper of the right dimensions". Of course, we could simply say the initial size of the images when opening a document is 100% and then change that when zooming. That would match my above assumption if `doc-view-resolution' is set to your monitor's DPI. However, DocView has two ways of zooming: if emacs is built with ImageMagick support and `doc-view-scale-internally' is t, the images are scaled dynamically, otherwise the document is reconverted with a changed setting of `doc-view-resolution'. So if you use emacs with ImageMagick support, you'd usually configure a higher `doc-view-resolution' value in order to improve the image quality when scaling dynamically. But then the "same size as printout" assumption is moot. And without ImageMagick support, the recipe 1) Open doc, zoom level indicator shows 100% 2) Zoom in, zoom level indicator shows, e.g., 110% 3) Kill buffer 4) Find doc again, zoom level indicator shows 100% would show a larger doc in step 4 than in step 1 although the zoom level is 100% in both cases. This is because DocView caches the images and the corresponding resolution in a temporary directory. Well, of course it could also save more information on the initial conversion run so that step 4 would result in 110%, but I think such a feature wouldn't be worth the effort. Therefore, I'm closing this issue as wontfix. Bye, Tassilo