unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37818: [PATCH] Various FAQ updates
@ 2019-10-18 21:07 Stefan Kangas
  2019-10-19  6:27 ` Eli Zaretskii
  2019-10-19  8:35 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Kangas @ 2019-10-18 21:07 UTC (permalink / raw)
  To: 37818

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

Please find attached three patches with FAQ updates:

1. Remove section on how to enable the default behaviour of having the
region highlighted, which is probably not a frequently asked question.

2. Remove information on large files in ancient versions of Emacs that
would only confuse new users.  This leaves in only the information on
the relatively recent versions of Emacs.

3. Update section on Emacs security to remove reference to the now
very old "movemail" incident, and add relevant information on
packages.  Perhaps this section could be extended, or other risks
added and/or removed.  If anyone has any ideas for what to add, I'd be
happy to do so.

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Remove-FAQ-section-Highlighting-a-region.patch --]
[-- Type: application/octet-stream, Size: 1246 bytes --]

From 1e80d6f61cbf3ee9e474666840a984b1c8e64cd8 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 18 Oct 2019 22:55:56 +0200
Subject: [PATCH 1/3] Remove FAQ section "Highlighting a region"

* doc/misc/efaq.texi (Highlighting a region): Remove section.
---
 doc/misc/efaq.texi | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index bb79b6c837..a8d03cca74 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -1765,23 +1765,6 @@ Associating modes with files
 the script.  Use @kbd{C-h v} (or @kbd{M-x describe-variable}) on
 @code{interpreter-mode-alist} to learn more.
 
-@node Highlighting a region
-@section How can I highlight a region of text in Emacs?
-@cindex Highlighting text
-@cindex Text, highlighting
-@cindex @code{transient-mark-mode}
-@cindex Region, highlighting a
-
-You can cause the region to be highlighted when the mark is active by
-including
-
-@lisp
-(transient-mark-mode 1)
-@end lisp
-
-@noindent
-in your @file{.emacs} file.  Since Emacs 23.1, this feature is on by default.
-
 @node Replacing highlighted text
 @section How can I replace highlighted text with what I type?
 @cindex @code{delete-selection-mode}
-- 
2.23.0


[-- Attachment #3: 0002-Update-FAQ-section-on-large-files.patch --]
[-- Type: application/octet-stream, Size: 1275 bytes --]

From bd23b37e9440bc8c177b525a5478fc190fd3aead Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 18 Oct 2019 22:56:34 +0200
Subject: [PATCH 2/3] Update FAQ section on large files

* doc/misc/efaq.texi (Problems with very large files): Remove
information about ancient versions of Emacs.
---
 doc/misc/efaq.texi | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index a8d03cca74..2510d9a5b2 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -2923,16 +2923,13 @@ Bugs and problems
 @end menu
 
 @node Problems with very large files
-@section Does Emacs have problems with files larger than 8 megabytes?
+@section Does Emacs have problems with large files?
 @cindex Very large files, opening
 @cindex Large files, opening
 @cindex Opening very large files
 @cindex Maximum file size
 @cindex Files, maximum size
 
-Old versions (i.e., anything before 19.29) of Emacs had problems editing
-files larger than 8 megabytes.  In versions 19.29 and later, the maximum
-buffer size is at least @math{2^{27}-1}, or 134,217,727 bytes, or 132 MBytes.
 The maximum buffer size on 32-bit machines increased to 256 MBytes in
 Emacs 22, and again to 512 MBytes in Emacs 23.2.
 
-- 
2.23.0


[-- Attachment #4: 0003-Update-FAQ-section-on-Emacs-security.patch --]
[-- Type: application/octet-stream, Size: 1879 bytes --]

From b768ed2cf828623f0c3026d3bf9bf7013cf9b4a2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 18 Oct 2019 22:57:05 +0200
Subject: [PATCH 3/3] Update FAQ section on Emacs security

* doc/misc/efaq.texi (Security risks with Emacs): Remove section on
movemail.  Add section on third-party packages.
---
 doc/misc/efaq.texi | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 2510d9a5b2..b11812e6a0 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3209,23 +3209,12 @@ Security risks with Emacs
 @itemize @bullet
 
 @item
-The @file{movemail} incident.  (No, this is not a risk.)
-
-In his book @cite{The Cuckoo's Egg}, Cliff Stoll describes this in
-chapter 4.  The site at LBL had installed the @file{/etc/movemail}
-program setuid root.  (As of version 19, @file{movemail} is in your
-architecture-specific directory; type @kbd{C-h v exec-directory
-@key{RET}} to see what it is.)  Since @code{movemail} had not been
-designed for this situation, a security hole was created and users could
-get root privileges.
-
-@code{movemail} has since been changed so that this security hole will
-not exist, even if it is installed setuid root.  However,
-@code{movemail} no longer needs to be installed setuid root, which
-should eliminate this particular risk.
-
-We have heard unverified reports that the 1988 Internet worm took
-advantage of this configuration problem.
+Third party packages.
+
+Any package you install into Emacs can run arbtitrary code with the
+same privileges as the Emacs process itself.  Be aware of this when
+you use the package system (e.g. @code{M-x list-packages}) with third
+party archives.  Use only third parties that you can trust!
 
 @item
 The @code{file-local-variable} feature.  (Yes, a risk, but easy to
-- 
2.23.0


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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-18 21:07 bug#37818: [PATCH] Various FAQ updates Stefan Kangas
@ 2019-10-19  6:27 ` Eli Zaretskii
  2019-10-19 12:58   ` Stefan Kangas
  2019-10-19  8:35 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-10-19  6:27 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 37818

> From: Stefan Kangas <stefan@marxist.se>
> Date: Fri, 18 Oct 2019 23:07:10 +0200
> 
> 1. Remove section on how to enable the default behaviour of having the
> region highlighted, which is probably not a frequently asked question.

OK.

> 2. Remove information on large files in ancient versions of Emacs that
> would only confuse new users.  This leaves in only the information on
> the relatively recent versions of Emacs.

IMO, this section should first tell that Emacs has an inherent fixed
limitation on the size of buffers, as that is not something people
assume nowadays.  It should cite the limitation separately for 32-bit
builds, 32-bit builds --with-wide-int, and 64-bit builds.  Then it
should say that this limitation also imposes size limit on visiting
files, but the file-size limit is roughly about half the buffer limit,
due to decoding and other stuff.  I would also mention visiting
compressed archives, because the size limitation might be hit half-way
through decompression.

Thanks.





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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-18 21:07 bug#37818: [PATCH] Various FAQ updates Stefan Kangas
  2019-10-19  6:27 ` Eli Zaretskii
@ 2019-10-19  8:35 ` Lars Ingebrigtsen
  2019-10-19 12:59   ` Stefan Kangas
  1 sibling, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-19  8:35 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 37818

Stefan Kangas <stefan@marxist.se> writes:

> 3. Update section on Emacs security to remove reference to the now
> very old "movemail" incident, and add relevant information on
> packages.  Perhaps this section could be extended, or other risks
> added and/or removed.  If anyone has any ideas for what to add, I'd be
> happy to do so.

Looks good to me.  That incident is not something that's frequently
asked about.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-19  6:27 ` Eli Zaretskii
@ 2019-10-19 12:58   ` Stefan Kangas
  2019-10-19 14:20     ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2019-10-19 12:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 37818

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> > 1. Remove section on how to enable the default behaviour of having the
> > region highlighted, which is probably not a frequently asked question.
>
> OK.

Thanks, pushed to master as commit 11c3ec3df6a.

> > 2. Remove information on large files in ancient versions of Emacs that
> > would only confuse new users.  This leaves in only the information on
> > the relatively recent versions of Emacs.
>
> IMO, this section should first tell that Emacs has an inherent fixed
> limitation on the size of buffers, as that is not something people
> assume nowadays.  It should cite the limitation separately for 32-bit
> builds, 32-bit builds --with-wide-int, and 64-bit builds.  Then it
> should say that this limitation also imposes size limit on visiting
> files, but the file-size limit is roughly about half the buffer limit,
> due to decoding and other stuff.  I would also mention visiting
> compressed archives, because the size limitation might be hit half-way
> through decompression.

Thanks.  I've attached a revised patch here according to your
comments.  I'm not sure what the file size limit is for
--with-wide-int on 32-bit builds or 64-bit builds, so that still needs
adding.  Could someone please give the exact numbers or tell me where
I can find them?

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Update-FAQ-section-on-large-files-Bug-37818.patch --]
[-- Type: application/octet-stream, Size: 2211 bytes --]

From 23317e478094d523f836d0ee97a9fff7dfcc6503 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 18 Oct 2019 22:56:34 +0200
Subject: [PATCH] Update FAQ section on large files (Bug#37818)

* doc/misc/efaq.texi (Problems with very large files): Extend section
and remove information about ancient versions of Emacs.
---
 doc/misc/efaq.texi | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 0f2cebe6c3..38781760d3 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -2923,20 +2923,27 @@ Bugs and problems
 @end menu
 
 @node Problems with very large files
-@section Does Emacs have problems with files larger than 8 megabytes?
+@section Does Emacs have problems with large files?
 @cindex Very large files, opening
 @cindex Large files, opening
 @cindex Opening very large files
 @cindex Maximum file size
 @cindex Files, maximum size
 
-Old versions (i.e., anything before 19.29) of Emacs had problems editing
-files larger than 8 megabytes.  In versions 19.29 and later, the maximum
-buffer size is at least @math{2^{27}-1}, or 134,217,727 bytes, or 132 MBytes.
-The maximum buffer size on 32-bit machines increased to 256 MBytes in
-Emacs 22, and again to 512 MBytes in Emacs 23.2.
+Emacs has an inherent fixed limitation on the size of buffers.  The
+maximum buffer size on 32-bit machines is 512 MBytes beginning with
+version 23.2.  If Emacs was built using the @code{--with-wide-int}
+flag, the maximum buffer size on 32-bit machines is ***FIXME***
+MBytes.
 
-Emacs compiled on a 64-bit machine can handle much larger buffers.
+This limitation imposes a size limit on visiting files, which is
+roughly half the buffer limit due to things like decoding of multibyte
+characters.  When visiting compressed archives, the file size
+limitation will be smaller than that due to decompression.
+
+Unless you want to visit unusually large files, this should only be an
+issue on 32-bit machines.  Emacs compiled on a 64-bit machine can
+handle much larger buffers.
 
 @node ^M in the shell buffer
 @section How do I get rid of @samp{^M} or echoed commands in my shell buffer?
-- 
2.23.0


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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-19  8:35 ` Lars Ingebrigtsen
@ 2019-10-19 12:59   ` Stefan Kangas
  2019-10-23 23:10     ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2019-10-19 12:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 37818

Lars Ingebrigtsen <larsi@gnus.org> writes:

> > 3. Update section on Emacs security to remove reference to the now
> > very old "movemail" incident, and add relevant information on
> > packages.  Perhaps this section could be extended, or other risks
> > added and/or removed.  If anyone has any ideas for what to add, I'd be
> > happy to do so.
>
> Looks good to me.  That incident is not something that's frequently
> asked about.

Thanks.  I'll wait a couple days to see if anyone else has something
to add before I push it.

Best regards,
Stefan Kangas





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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-19 12:58   ` Stefan Kangas
@ 2019-10-19 14:20     ` Eli Zaretskii
  2019-10-20 13:53       ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-10-19 14:20 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 37818

> From: Stefan Kangas <stefan@marxist.se>
> Date: Sat, 19 Oct 2019 14:58:53 +0200
> Cc: 37818@debbugs.gnu.org
> 
> Thanks.  I've attached a revised patch here according to your
> comments.

I have some, see below.

> I'm not sure what the file size limit is for
> --with-wide-int on 32-bit builds or 64-bit builds, so that still needs
> adding.  Could someone please give the exact numbers or tell me where
> I can find them?

See below.

> +Emacs has an inherent fixed limitation on the size of buffers.

I'd suggest to say that the limitation is more strict that the maximum
size of objects supported by programs with the same architecture,
because otherwise this sentence might be misunderstood.

>                                                                  The
> +maximum buffer size on 32-bit machines is 512 MBytes beginning with
> +version 23.2.  If Emacs was built using the @code{--with-wide-int}
> +flag, the maximum buffer size on 32-bit machines is ***FIXME***
> +MBytes.

The number here is 2GB.

> +This limitation imposes a size limit on visiting files, which is
> +roughly half the buffer limit due to things like decoding of multibyte
> +characters.  When visiting compressed archives, the file size
> +limitation will be smaller than that due to decompression.
> +
> +Unless you want to visit unusually large files, this should only be an
> +issue on 32-bit machines.  Emacs compiled on a 64-bit machine can
> +handle much larger buffers.

The limit value for 64-bit builds is that of most-positive-fixnum.





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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-19 14:20     ` Eli Zaretskii
@ 2019-10-20 13:53       ` Stefan Kangas
  2019-10-20 14:48         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Kangas @ 2019-10-20 13:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 37818

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> > +Emacs has an inherent fixed limitation on the size of buffers.
>
> I'd suggest to say that the limitation is more strict that the maximum
> size of objects supported by programs with the same architecture,
> because otherwise this sentence might be misunderstood.

Done.

>
> >                                                                  The
> > +maximum buffer size on 32-bit machines is 512 MBytes beginning with
> > +version 23.2.  If Emacs was built using the @code{--with-wide-int}
> > +flag, the maximum buffer size on 32-bit machines is ***FIXME***
> > +MBytes.
>
> The number here is 2GB.

Fixed.

> > +This limitation imposes a size limit on visiting files, which is
> > +roughly half the buffer limit due to things like decoding of multibyte
> > +characters.  When visiting compressed archives, the file size
> > +limitation will be smaller than that due to decompression.
> > +
> > +Unless you want to visit unusually large files, this should only be an
> > +issue on 32-bit machines.  Emacs compiled on a 64-bit machine can
> > +handle much larger buffers.
>
> The limit value for 64-bit builds is that of most-positive-fixnum.

Fixed.  Please find attached an updated patch.

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Update-FAQ-section-on-large-files-Bug-37818.patch --]
[-- Type: application/octet-stream, Size: 2244 bytes --]

From 5bc3d944bf8f22868eecca244240d96dd72812c2 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 18 Oct 2019 22:56:34 +0200
Subject: [PATCH] Update FAQ section on large files (Bug#37818)

* doc/misc/efaq.texi (Problems with very large files): Extend section
and remove information about ancient versions of Emacs.
---
 doc/misc/efaq.texi | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index 0f2cebe6c3..8bbb4bf3c0 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -2923,20 +2923,29 @@ Bugs and problems
 @end menu
 
 @node Problems with very large files
-@section Does Emacs have problems with files larger than 8 megabytes?
+@section Does Emacs have problems with large files?
 @cindex Very large files, opening
 @cindex Large files, opening
 @cindex Opening very large files
 @cindex Maximum file size
 @cindex Files, maximum size
 
-Old versions (i.e., anything before 19.29) of Emacs had problems editing
-files larger than 8 megabytes.  In versions 19.29 and later, the maximum
-buffer size is at least @math{2^{27}-1}, or 134,217,727 bytes, or 132 MBytes.
-The maximum buffer size on 32-bit machines increased to 256 MBytes in
-Emacs 22, and again to 512 MBytes in Emacs 23.2.
+Emacs has an inherent fixed limitation on the size of buffers.  This
+limit is stricter than the maximum size of objects supported by other
+programs on the same architecture.
 
-Emacs compiled on a 64-bit machine can handle much larger buffers.
+The maximum buffer size on 32-bit machines is 512 MBytes beginning
+with version 23.2.  If Emacs was built using the
+@code{--with-wide-int} flag, the maximum buffer size on 32-bit
+machines is 2 GB.
+
+Emacs compiled on a 64-bit machine can handle much larger buffers; up
+to @code{most-positive-fixnum} (2.3 exabytes).
+
+Due to things like decoding of multibyte characters, you can only
+visit files with a size that is roughly half the buffer size limit.
+When visiting compressed archives, the file size limit will be
+smaller than that due to decompression.
 
 @node ^M in the shell buffer
 @section How do I get rid of @samp{^M} or echoed commands in my shell buffer?
-- 
2.23.0


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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-20 13:53       ` Stefan Kangas
@ 2019-10-20 14:48         ` Eli Zaretskii
  2019-10-23 23:11           ` Stefan Kangas
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-10-20 14:48 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 37818

> From: Stefan Kangas <stefan@marxist.se>
> Date: Sun, 20 Oct 2019 15:53:31 +0200
> Cc: 37818@debbugs.gnu.org
> 
> Fixed.  Please find attached an updated patch.

LGTM, thanks.





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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-19 12:59   ` Stefan Kangas
@ 2019-10-23 23:10     ` Stefan Kangas
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Kangas @ 2019-10-23 23:10 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 37818

Stefan Kangas <stefan@marxist.se> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> > Looks good to me.  That incident is not something that's frequently
> > asked about.
>
> Thanks.  I'll wait a couple days to see if anyone else has something
> to add before I push it.

No one seemed to have any further comments.  I've therefore pushed
this to master as commit 61223a046c3.

Best regards,
Stefan Kangas





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

* bug#37818: [PATCH] Various FAQ updates
  2019-10-20 14:48         ` Eli Zaretskii
@ 2019-10-23 23:11           ` Stefan Kangas
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Kangas @ 2019-10-23 23:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 37818

close 37818 27.1
quit

Eli Zaretskii <eliz@gnu.org> writes:
> LGTM, thanks.

Thanks, pushed to master as commit b3b74514e9.

Best regards,
Stefan Kangas





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

end of thread, other threads:[~2019-10-23 23:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 21:07 bug#37818: [PATCH] Various FAQ updates Stefan Kangas
2019-10-19  6:27 ` Eli Zaretskii
2019-10-19 12:58   ` Stefan Kangas
2019-10-19 14:20     ` Eli Zaretskii
2019-10-20 13:53       ` Stefan Kangas
2019-10-20 14:48         ` Eli Zaretskii
2019-10-23 23:11           ` Stefan Kangas
2019-10-19  8:35 ` Lars Ingebrigtsen
2019-10-19 12:59   ` Stefan Kangas
2019-10-23 23:10     ` Stefan Kangas

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).