Subject: Re: bug#45412: File ... is large (... MiB), really open? (y)es or (n)o or (l)iterally

From: Daniel Martín <[email-masked]>
Date: Fri, 25 Dec 2020 02:00:45 +0100

積丹尼 Dan Jacobson <[email-masked]> writes:

Thank you for your feature request to improve Emacs.

> File 06-7377E-001A.jpg is large (14.4 MiB), really open? (y)es or (n)o or (l)iterally y
> File 06-7377E-001B.jpg is large (14.4 MiB), really open? (y)es or (n)o or (l)iterally y
> File 06-7377E-001C.jpg is large (14.4 MiB), really open? (y)es or (n)o or (l)iterally y
> ...
> Maybe add choices:
> "(a)lways" (for the rest of the session).

I think users would be confused about this option.  Would it always open
the file regularly or literally?  A minor thing, I think it's customary
in Emacs to use "!" for this "don't ask me again" feature (see
save-some-buffers or hack-local-variables-confirm, for example).

> "(n)ever" (for the rest of the session).

Same here, it's not totally clear to me if this option would never open
a large file, or never ask for confirmation before opening a large
file.  The dialog message ends with "really open?".

>
> Also the user has no clue about what to change to change whatever is
> asking this. So maybe add (c)ustomize.

Makes sense, but I don't know how well it'd fit the rest of Emacs.
AFAIK, customization points are not usually advertised in Emacs prompts.
It's more typical to expect that users "ask Emacs" to discover them, for
example by issuing M-x customize-apropos large file RET or M-x
customize-group files RET.

Instead, one possibility could be to offer a "!" option that would
always open big files non-literally in the current Emacs session.  Its
implementation would basically open the large file and set
large-file-warning-threshold to nil.  However, I foresee problems if
users accidentally press "!" in this prompt.

Another approach could be to offer a C-h binding that opens a help
window that describes the possible options and briefly links to the
customization entry point that removes the prompt permanently.