unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
@ 2023-10-02 14:55 Stefan Kangas
  2023-10-03  8:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2023-10-02 14:55 UTC (permalink / raw)
  To: 66308; +Cc: Tassilo Horn

Severity: wishlist

How about increasing the default value of `doc-view-resolution' from 100
to something like 300?  In my use, I find that the default value gives
poor results, especially after `doc-view-enlarge', whereas a value of
300 gives a nice, crisp display.  Monitors these days are certainly much
larger, and have much higher resolutions, than they used to.

People in highly restricted environments might have to turn it back down
again, of course.  I think this is okay though, if the benefit is that
doc-view will look better in more typical cases.

I also note that `doc-view-resolution' has had the same value since
2007, when DocView mode was first added to Emacs.  After 15-20 years, it
might be time for a bump.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-02 14:55 bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution Stefan Kangas
@ 2023-10-03  8:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-03  9:28   ` Stefan Kangas
  2023-10-03 10:19   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-03  8:49 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 66308, Tassilo Horn

Stefan Kangas <stefankangas@gmail.com> writes:

> How about increasing the default value of `doc-view-resolution' from 100
> to something like 300?  In my use, I find that the default value gives
> poor results, especially after `doc-view-enlarge', whereas a value of
> 300 gives a nice, crisp display.  Monitors these days are certainly much
> larger, and have much higher resolutions, than they used to.
>
> People in highly restricted environments might have to turn it back down
> again, of course.  I think this is okay though, if the benefit is that
> doc-view will look better in more typical cases.
>
> I also note that `doc-view-resolution' has had the same value since
> 2007, when DocView mode was first added to Emacs.  After 15-20 years, it
> might be time for a bump.

How about making the resolution commensurate with that of the display
itself?  Monitor density has not increased for lay folk, only those
willing to spend prodigally on display hardware.

Compounding that, larger images will consume greater quantities of disk
space and X server memory.  Bear in mind that /tmp is customarily small;
only 4 GiB on my system, with 1.8GiB in use, whereof /tmp/docview1000
consumes 971 MiB.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-03  8:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-03  9:28   ` Stefan Kangas
  2023-10-03 10:19   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2023-10-03  9:28 UTC (permalink / raw)
  To: Po Lu; +Cc: 66308, Tassilo Horn

Po Lu <luangruo@yahoo.com> writes:

> How about making the resolution commensurate with that of the display
> itself?  Monitor density has not increased for lay folk, only those
> willing to spend prodigally on display hardware.

Yes, if we can make it dynamic, that should be even better.

Do we have a canonical way of checking the resolution of the screen that
the current frame is on?

> Compounding that, larger images will consume greater quantities of disk
> space and X server memory.  Bear in mind that /tmp is customarily small;
> only 4 GiB on my system, with 1.8GiB in use, whereof /tmp/docview1000
> consumes 971 MiB.

That's an important consideration.  We have the `doc-view-clear-cache'
command, but perhaps we could do more, for example

a) a separate command to display the cache size, or
b) a warning when the cache size reaches some threshold, or
c) automatically cleaning up old files when the cache reaches some
   threshold,

or some combination of all of the above.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-03  8:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-03  9:28   ` Stefan Kangas
@ 2023-10-03 10:19   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-03 10:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-03 12:03     ` Stefan Kangas
  1 sibling, 2 replies; 9+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-03 10:19 UTC (permalink / raw)
  To: 66308; +Cc: luangruo, stefankangas, tsdh

Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> writes:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> How about increasing the default value of `doc-view-resolution' from 100
>> to something like 300?  In my use, I find that the default value gives
>> poor results, especially after `doc-view-enlarge', whereas a value of
>> 300 gives a nice, crisp display.  Monitors these days are certainly much
>> larger, and have much higher resolutions, than they used to.
>>
>> People in highly restricted environments might have to turn it back down
>> again, of course.  I think this is okay though, if the benefit is that
>> doc-view will look better in more typical cases.
>>
>> I also note that `doc-view-resolution' has had the same value since
>> 2007, when DocView mode was first added to Emacs.  After 15-20 years, it
>> might be time for a bump.
>
> How about making the resolution commensurate with that of the display
> itself?  Monitor density has not increased for lay folk, only those
> willing to spend prodigally on display hardware.

Would it make sense to set the resolution based on the resolution and
the dpi? Or how is scaling involved here?

> Compounding that, larger images will consume greater quantities of disk
> space and X server memory.  Bear in mind that /tmp is customarily small;
> only 4 GiB on my system, with 1.8GiB in use, whereof /tmp/docview1000
> consumes 971 MiB.

Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
of temp?
Doing so would also allow to reuse it if the particular file is viewed
again.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-03 10:19   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-03 10:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-03 16:11       ` Eli Zaretskii
  2023-10-03 12:03     ` Stefan Kangas
  1 sibling, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-03 10:34 UTC (permalink / raw)
  To: Björn Bidar; +Cc: 66308, Stefan Kangas, Tassilo Horn

Björn Bidar <bjorn.bidar@thaodan.de> writes:

> Would it make sense to set the resolution based on the resolution and
> the dpi? Or how is scaling involved here?

Just the display scale: dpyinfo->resx / PT_PER_INCH (in font.h), so long
as the consequent scale doesn't incur an unacceptable increase to disk
usage.

> Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
> of temp?

Unix systems don't all provide XDG directories, and furthermore, storage
considerations remain relevant there.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-03 10:19   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-03 10:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-03 12:03     ` Stefan Kangas
  2023-10-04  8:37       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2023-10-03 12:03 UTC (permalink / raw)
  To: Björn Bidar; +Cc: Po Lu, 66308, Tassilo Horn

Björn Bidar <bjorn.bidar@thaodan.de> writes:

> Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
> of temp?
> Doing so would also allow to reuse it if the particular file is viewed
> again.

Probably, yes, at least on XDG compliant systems.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-03 10:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-03 16:11       ` Eli Zaretskii
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2023-10-03 16:11 UTC (permalink / raw)
  To: Po Lu; +Cc: 66308, bjorn.bidar, stefankangas, tsdh

> Cc: 66308@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>,
>  Tassilo Horn <tsdh@gnu.org>
> Date: Tue, 03 Oct 2023 18:34:25 +0800
> From:  Po Lu via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> > Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
> > of temp?
> 
> Unix systems don't all provide XDG directories, and furthermore, storage
> considerations remain relevant there.

We have the file-system-info function, which we could use to determine
how much storage is available.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-03 12:03     ` Stefan Kangas
@ 2023-10-04  8:37       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-10-05 10:24         ` Richard Stallman
  0 siblings, 1 reply; 9+ messages in thread
From: Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-10-04  8:37 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Po Lu, 66308, Tassilo Horn

Stefan Kangas <stefankangas@gmail.com> writes:

> Björn Bidar <bjorn.bidar@thaodan.de> writes:
>
>> Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
>> of temp?
>> Doing so would also allow to reuse it if the particular file is viewed
>> again.
>
> Probably, yes, at least on XDG compliant systems.

So e.g. Linux or *BSD.

On MacOS or Windows there are similar locations.

The Qt StandardPaths Docs provide a good overview of those:
https://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum

E.g. on MacOS there is ~/Library/Caches/<APPNAME> for CacheLocation.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution
  2023-10-04  8:37       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-10-05 10:24         ` Richard Stallman
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2023-10-05 10:24 UTC (permalink / raw)
  To: Björn Bidar; +Cc: luangruo, 66308, stefankangas, tsdh

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > >> Should we store this data on Unixes in `$XDG_CACHE_HOME` Instead
  > >> of temp?
  > >> Doing so would also allow to reuse it if the particular file is viewed
  > >> again.
  > >
  > > Probably, yes, at least on XDG compliant systems.

  > So e.g. Linux or *BSD.

[This is a side issue, but please be aware of it]

The first of those is actually the GNU system, which is
what I developed GNU Emacs to be part of.  Linux is what
it uses as the kernel.

See https://gnu.org/gnu/linux-and-gnu.html and
https://gnu.org/gnu/gnu-linux-faq.html, plus the history in
https://gnu.org/gnu/the-gnu-project.html.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-10-05 10:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-02 14:55 bug#66308: 30.0.50; DocView: Bump default value of doc-view-resolution Stefan Kangas
2023-10-03  8:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-03  9:28   ` Stefan Kangas
2023-10-03 10:19   ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-03 10:34     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-03 16:11       ` Eli Zaretskii
2023-10-03 12:03     ` Stefan Kangas
2023-10-04  8:37       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-05 10:24         ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).