From 4dd1b33a488782ef3890d37ce1303761ed827c88 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 11:18:59 +0200 Subject: [PATCH 1/9] Mention crashes due to Noto Serif Kannada fonts * etc/PROBLEMS: Mention crashes due to Noto Serif Kannada fonts, and the respective workarounds. (Bug#30193) --- etc/PROBLEMS | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 32f12eab62e..c194ba53145 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -241,12 +241,33 @@ before starting Emacs, or run Emacs as root. ** Emacs crashes when you try to view a file with complex characters. -For example, the etc/HELLO file (as shown by C-h h). -The message "symbol lookup error: /usr/bin/emacs: undefined symbol: OTF_open" -is shown in the terminal from which you launched Emacs. -This problem only happens when you use a graphical display (ie not -with -nw) and compiled Emacs with the "libotf" library for complex -text handling. +One possible reason for this could be a bug in the libotf or the +libm17n-flt/m17n-db libraries Emacs uses for displaying complex +scripts. Make sure you have the latest versions of these libraries +installed. If the problem still persists with the latest released +versions of these libraries, you can try building these libraries from +their CVS repository: + + cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/m17n co libotf + cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/m17n co m17n-db + cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/m17n co m17n-lib + +One known problem that causes such crashes is with using Noto Serif +Kannada fonts. To work around that, force Emacs not to select these +fonts, by adding the following to your ~/.emacs init file: + + (push "Noto Serif Kannada" face-ignored-fonts) + +You can try this interactively in a running Emacs session like this: + + M-: (push "Noto Serif Kannada" face-ignored-fonts) RET + +Another set of problems is caused by an incompatible libotf library. +In this case, displaying the etc/HELLO file (as shown by C-h h) +triggers the following message to be shown in the terminal from which +you launched Emacs: + + symbol lookup error: /usr/bin/emacs: undefined symbol: OTF_open This problem occurs because unfortunately there are two libraries called "libotf". One is the library for handling OpenType fonts, From 085ee439bfe78b78ed50f58dc56285b839153322 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 12:01:54 +0200 Subject: [PATCH 2/9] Improve documentation of 'edebug-defun' * doc/lispref/edebug.texi (Instrumenting): Document a workaround for a failure to instrument due to unknown macros. (Bug#30243) (Bug#10577) --- doc/lispref/edebug.texi | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 1b0d314ee71..39430deb48e 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -209,6 +209,20 @@ session, it runs the hook @code{edebug-setup-hook}, then sets it to @code{nil}. You can use this to load Edebug specifications associated with a package you are using, but only when you use Edebug. +@cindex edebug, failure to instrument + If Edebug detects a syntax error while instrumenting, it leaves point +at the erroneous code and signals an @code{invalid-read-syntax} error. +@c FIXME? I can't see that it "leaves point at the erroneous code". +Example: + +@example +@error{} Invalid read syntax: "Expected lambda expression" +@end example + + One potential reason for such a failure to instrument is that some +macro definitions are not yet known to Emacs. To work around this, +load the file which defines the function you are about to instrument. + @findex eval-expression @r{(Edebug)} To remove instrumentation from a definition, simply re-evaluate its definition in a way that does not instrument. There are two ways of @@ -216,10 +230,6 @@ evaluating forms that never instrument them: from a file with @code{load}, and from the minibuffer with @code{eval-expression} (@kbd{M-:}). - If Edebug detects a syntax error while instrumenting, it leaves point -at the erroneous code and signals an @code{invalid-read-syntax} error. -@c FIXME? I can't see that it "leaves point at the erroneous code". - @xref{Edebug Eval}, for other evaluation functions available inside of Edebug. From 22f98b31e333eacb2f23f872b149c76a781449a1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 12:11:28 +0200 Subject: [PATCH 3/9] * src/indent.c (Findent_to): Doc fix. (Bug#30260) --- src/indent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/indent.c b/src/indent.c index 1a8bcebddc9..316171e609b 100644 --- a/src/indent.c +++ b/src/indent.c @@ -813,7 +813,7 @@ DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ", Optional second argument MINIMUM says always do at least MINIMUM spaces even if that goes past COLUMN; by default, MINIMUM is zero. -The return value is COLUMN. */) +The return value is the column where the insertion ends. */) (Lisp_Object column, Lisp_Object minimum) { EMACS_INT mincol; From 9afc86d1face8dfe738b1792a752124b1168b277 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 12:53:29 +0200 Subject: [PATCH 4/9] Improve the "Search" chapter of the Emacs manual * doc/emacs/search.texi (Regexps, Regexp Backslash): Improve and clarify wording. (Search Customizations): Fix a typo. Reported by Will Korteland in emacs-manual-bugs@gnu.org. --- doc/emacs/search.texi | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index b351a741aa5..a146e42185b 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -776,16 +776,16 @@ Search}. @cindex regular expression @cindex regexp - This manual describes regular expression features that users -typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp -Reference Manual}, for additional features used mainly in Lisp -programs. + This section (and this manual in general) describes regular +expression features that users typically use. @xref{Regular +Expressions,,, elisp, The Emacs Lisp Reference Manual}, for additional +features used mainly in Lisp programs. Regular expressions have a syntax in which a few characters are special constructs and the rest are @dfn{ordinary}. An ordinary character matches that same character and nothing else. The special characters are @samp{$^.*+?[\}. The character @samp{]} is special if -it ends a character alternative (see later). The character @samp{-} +it ends a character alternative (see below). The character @samp{-} is special inside a character alternative. Any other character appearing in a regular expression is ordinary, unless a @samp{\} precedes it. (When you use regular expressions in a Lisp program, @@ -803,11 +803,11 @@ of ``the same string'', rather than an exception.) Any two regular expressions @var{a} and @var{b} can be concatenated. The result is a regular expression which matches a string if @var{a} matches some amount of the beginning of that string and @var{b} -matches the rest of the string. For example, concatenating the -regular expressions @samp{f} and @samp{o} gives the regular expression -@samp{fo}, which matches only the string @samp{fo}. Still trivial. -To do something nontrivial, you need to use one of the special -characters. Here is a list of them. +matches the rest of the string. As a trivial example, concatenating +the regular expressions @samp{f} and @samp{o} gives the regular +expression @samp{fo}, which matches only the string @samp{fo}. To do +something less trivial, you need to use one of the special characters. +Here is a list of them. @table @asis @item @kbd{.}@: @r{(Period)} @@ -1025,13 +1025,13 @@ To record a matched substring for future reference. This last application is not a consequence of the idea of a parenthetical grouping; it is a separate feature that is assigned as a -second meaning to the same @samp{\( @dots{} \)} construct. In practice +second meaning to the same @w{@samp{\( @dots{} \)}} construct. In practice there is usually no conflict between the two meanings; when there is -a conflict, you can use a shy group. +a conflict, you can use a shy group, described below. @item \(?: @dots{} \) @cindex shy group, in regexp -specifies a shy group that does not record the matched substring; +specifies a @dfn{shy group} that does not record the matched substring; you can't refer back to it with @samp{\@var{d}} (see below). This is useful in mechanically combining regular expressions, so that you can add groups for syntactic purposes without interfering with the @@ -1908,7 +1908,7 @@ which Emacs will use this display mode. The variable @code{search-slow-window-lines} controls the number of lines in the window Emacs pops up for displaying the search results; the default is 1 line. Normally, this window will pop up at the bottom of the window -that displays the buffer where you start searching, bit if the value +that displays the buffer where you start searching, but if the value of @code{search-slow-window-lines} is negative, that means to put the window at the top and give it the number of lines that is the absolute value of that value. From 372fda682a2a80f4cf946dfa6d57853a68b6982e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 13:17:24 +0200 Subject: [PATCH 5/9] Improve the "Files" chapter of the Emacs manual * doc/emacs/files.texi (File Shadowing): Rearrange text to explain the notion of shadowing before describing the commands. Suggested by Will Korteland in emacs-manual-bugs@gnu.org. --- doc/emacs/files.texi | 46 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 586086dda28..f6813a4aee9 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -824,6 +824,25 @@ diff-buffer-with-file} command. @xref{Comparing Files}. @cindex file shadows @findex shadow-initialize + You can arrange to keep identical @dfn{shadow} copies of certain +files in more than one place---possibly on different machines. To do +this, first you must set up a @dfn{shadow file group}, which is a set +of identically-named files shared between a list of sites. The file +group is permanent and applies to further Emacs sessions as well as +the current one. Once the group is set up, every time you exit Emacs, +it will copy the file you edited to the other files in its group. You +can also do the copying without exiting Emacs, by typing @w{@kbd{M-x +shadow-copy-files}}. + +@cindex shadow cluster +A @dfn{shadow cluster} is a group of hosts that share directories, so +that copying to or from one of them is sufficient to update the file +on all of them. Each shadow cluster has a name, and specifies the +network address of a primary host (the one we copy files to), and a +regular expression that matches the host names of all the other hosts +in the cluster. You can define a shadow cluster with @w{@kbd{M-x +shadow-define-cluster}}. + @table @kbd @item M-x shadow-initialize Set up file shadowing. @@ -839,32 +858,15 @@ Copy all pending shadow files. Cancel the instruction to shadow some files. @end table -You can arrange to keep identical @dfn{shadow} copies of certain files -in more than one place---possibly on different machines. To do this, -first you must set up a @dfn{shadow file group}, which is a set of -identically-named files shared between a list of sites. The file -group is permanent and applies to further Emacs sessions as well as -the current one. Once the group is set up, every time you exit Emacs, -it will copy the file you edited to the other files in its group. You -can also do the copying without exiting Emacs, by typing @kbd{M-x -shadow-copy-files}. - -To set up a shadow file group, use @kbd{M-x -shadow-define-literal-group} or @kbd{M-x shadow-define-regexp-group}. -See their documentation strings for further information. +To set up a shadow file group, use @w{@kbd{M-x +shadow-define-literal-group}} or @w{@kbd{M-x +shadow-define-regexp-group}}. See their documentation strings for +further information. Before copying a file to its shadows, Emacs asks for confirmation. You can answer ``no'' to bypass copying of this file, this time. If you want to cancel the shadowing permanently for a certain file, use -@kbd{M-x shadow-cancel} to eliminate or change the shadow file group. - -A @dfn{shadow cluster} is a group of hosts that share directories, so -that copying to or from one of them is sufficient to update the file -on all of them. Each shadow cluster has a name, and specifies the -network address of a primary host (the one we copy files to), and a -regular expression that matches the host names of all the other hosts -in the cluster. You can define a shadow cluster with @kbd{M-x -shadow-define-cluster}. +@w{@kbd{M-x shadow-cancel}} to eliminate or change the shadow file group. @node Time Stamps @subsection Updating Time Stamps Automatically From e1a44033a8dbb53588c77a9e41c11725b2ed53b0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 14:06:02 +0200 Subject: [PATCH 6/9] Minor changes in the Emacs manual * doc/emacs/search.texi (Search Customizations): Minor wording change. * doc/emacs/files.texi (Customize Save): Add a cross-reference for batch mode. --- doc/emacs/files.texi | 2 +- doc/emacs/search.texi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index f6813a4aee9..1418a639fbb 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -738,7 +738,7 @@ survive a crash even if @code{fsync} works properly. The @code{write-region-inhibit-fsync} variable controls whether Emacs invokes @code{fsync} after saving a file. The variable's default value is @code{nil} when Emacs is interactive, and @code{t} -when Emacs runs in batch mode. +when Emacs runs in batch mode (@pxref{Initial Options, batch mode}). Emacs never uses @code{fsync} when writing auto-save files, as these files might lose data anyway. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index a146e42185b..bb01f10d2cb 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1911,4 +1911,4 @@ window Emacs pops up for displaying the search results; the default is that displays the buffer where you start searching, but if the value of @code{search-slow-window-lines} is negative, that means to put the window at the top and give it the number of lines that is the absolute -value of that value. +value of @code{search-slow-window-lines}. From fd10070bf20dd73825ad3b3d4e7cd56306154034 Mon Sep 17 00:00:00 2001 From: "Charles A. Roelli" Date: Sat, 27 Jan 2018 14:52:03 +0100 Subject: [PATCH 7/9] * lisp/window.el (window-largest-empty-rectangle): Fix grammar. --- lisp/window.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/window.el b/lisp/window.el index d7fdceb2058..abd1a68b1f0 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8452,7 +8452,7 @@ of WINDOW. Optional argument LEFT, if non-nil, means to return values suitable for buffers displaying right to left text." ;; Process lines as returned by ‘window-lines-pixel-dimensions’. - ;; STACK is a stack that contains rows that have to be processed yet. + ;; STACK is a stack that contains rows that have yet to be processed. (let* ((window (window-normalize-window window t)) (disjoint (and (consp count) (cdr count))) (count (or (and (numberp count) count) From 8cb4ffb26208b855729aadc09b0e5a9306930c7b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Jan 2018 17:26:29 +0200 Subject: [PATCH 8/9] * etc/PROBLEMS: Document issues with double-buffering. (Bug#30088) --- etc/PROBLEMS | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c194ba53145..1aa497e6e3d 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -478,6 +478,21 @@ The solution was to upgrade Semantic to version 2.0pre4 (distributed with CEDET 1.0pre4) or later. Note that Emacs includes Semantic since 23.2, and this issue does not apply to the included version. +*** Display artifacts on GUI frames on X-based systems. + +This is known to be caused by using double-buffering (which is enabled +by default in Emacs 26 and later). The artifacts typically appear +after commands that cause Emacs to scroll the display. + +You can disable double-buffering by evaluating the following form: + + (modify-all-frames-parameters '((inhibit-double-buffering . t))) + +To make this permanent, add it to your ~/.emacs init file. + +Note that disabling double-buffering will cause flickering of the +display in some situations. + *** Self-documentation messages are garbled. This means that the file 'etc/DOC' doesn't properly correspond From 6415b2d40c13be2c5cd5f797718c391d1c4ce9e6 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 27 Jan 2018 22:02:45 +0000 Subject: [PATCH 9/9] Allow read-passwd to hide characters inserted by C-y. (Security fix.) This fixes bug #30186. The with-silent-modifications was there to prevent records of text property manipulations being put into buffer-undo-list. These had been causing a significant slowdown in CC Mode with C-_ after a large C-y. This CC Mode problem has since been solved by a different workaround. * lisp/subr.el (remove-yank-excluded-properties): Remove the invocation of with-silent-modifications around the text property manipulations. --- lisp/subr.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 052d9cd8216..64cbbd52ab8 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3019,10 +3019,9 @@ remove properties specified by `yank-excluded-properties'." run-start prop nil end))) (funcall fun value run-start run-end) (setq run-start run-end))))) - (with-silent-modifications - (if (eq yank-excluded-properties t) - (set-text-properties start end nil) - (remove-list-of-text-properties start end yank-excluded-properties))))) + (if (eq yank-excluded-properties t) + (set-text-properties start end nil) + (remove-list-of-text-properties start end yank-excluded-properties)))) (defvar yank-undo-function)