all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 36654-done@debbugs.gnu.org
Subject: bug#36654: Docview: show current zoom % in the modeline bar
Date: Fri, 19 Jul 2019 09:20:36 +0200	[thread overview]
Message-ID: <87pnm61oe3.fsf@gnu.org> (raw)
In-Reply-To: <871rymlpul.7.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Fri, 19 Jul 2019 10:28:50 +0800")

Tags: wontfix

積丹尼 Dan Jacobson <jidanni@jidanni.org> 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





      reply	other threads:[~2019-07-19  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-14 11:50 bug#36654: Docview: show current zoom % in the modeline bar 積丹尼 Dan Jacobson
2019-07-18 18:34 ` Tassilo Horn
2019-07-19  2:28   ` 積丹尼 Dan Jacobson
2019-07-19  7:20     ` Tassilo Horn [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=87pnm61oe3.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=36654-done@debbugs.gnu.org \
    --cc=jidanni@jidanni.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.