From 85516b8cc8a6c5767ab29917556f5b30b4482b73 Mon Sep 17 00:00:00 2001 From: Terrence Brannon Date: Fri, 7 Dec 2018 22:02:54 +0000 Subject: [PATCH 01/11] Minor copyedits in landmark.el * lisp/obsolete/landmark.el: Fix author's email and commentary. --- lisp/obsolete/landmark.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el index effea95cd8..c4c4c7a20f 100644 --- a/lisp/obsolete/landmark.el +++ b/lisp/obsolete/landmark.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1996-1997, 2000-2018 Free Software Foundation, Inc. -;; Author: Terrence Brannon (was: ) +;; Author: Terrence Brannon ;; Created: December 16, 1996 - first release to usenet ;; Keywords: games, neural network, adaptive search, chemotaxis ;; Version: 1.0 @@ -36,7 +36,7 @@ ;; the smell of the tree increases, then the weights in the robot's ;; brain are adjusted to encourage this odor-driven behavior in the ;; future. If the smell of the tree decreases, the robots weights are -;; adjusted to discourage a correct move. +;; adjusted to discourage that odor-driven behavior. ;; In laymen's terms, the search space is initially flat. The point ;; of training is to "turn up the edges of the search space" so that @@ -53,6 +53,13 @@ ;; a single move, one moves east,west and south, then both east and ;; west will be improved when they shouldn't +;; The source code was developed as part of a course on Brain Theory +;; and Neural Networks at the University of Southern California. The +;; original problem description and solution appeared in 1981 in the +;; paper "Landmark Learning: An Illustration of Associative +;; Search" authored by Andrew G. Barto and Richard S. Sutton and +;; published to Biological Cybernetics. + ;; Many thanks to Yuri Pryadkin for this ;; concise problem description. From 29310168310e807d289e789a1134df95c366d133 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 22 Dec 2018 14:18:59 +0100 Subject: [PATCH 02/11] ; Cosmetic changes in etc/NEWS --- etc/NEWS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 043573e3fc..55bdaf1117 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -52,6 +52,7 @@ often cause crashes. Set it to nil if you really need those fonts. * Changes in Specialized Modes and Packages in Emacs 26.2 ** Dired + +++ *** The 'Z' command on a directory name compresses all of its files. It produces a compressed '.tar.gz' archive with all the files in the @@ -171,7 +172,8 @@ changed in Emacs 26.1, in that it didn't consider text inside comments and strings as a potential list. This change is now reverted, and 'thing-at-point' behaves like it did before Emacs 26.1. -To cater to use cases where comments and strings are to be ignored +--- +** To cater to use cases where comments and strings are to be ignored when looking for a list, the function 'list-at-point' now takes an optional argument to do so. From 24ddea074a2e61f7accde60cdf941ba67b1ce82a Mon Sep 17 00:00:00 2001 From: "Charles A. Roelli" Date: Sat, 22 Dec 2018 17:14:36 +0100 Subject: [PATCH 03/11] Improve process doc. with respect to handling of large input (Bug#33191) * src/process.c (Fprocess_send_region, Fprocess_send_string): Document that process input longer than the process input buffer may be split into bunches. Remove an outdated reference to a 500 character split boundary. * doc/lispref/processes.texi (Asynchronous Processes): Remove mention of "stray character injections" in PTY processes. See also the comment about ICANON in src/sysdep.c, function child_setup_tty. --- doc/lispref/processes.texi | 7 +++---- src/process.c | 15 +++++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index e7d61bd5fa..623be09cc6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -604,10 +604,9 @@ these features. However, for subprocesses used by Lisp programs for internal purposes (i.e., no user interaction with the subprocess is required), where significant amounts of data need to be exchanged between the subprocess and the Lisp program, it is often better to use -a pipe, because pipes are more efficient, and because they are immune -to stray character injections that ptys introduce for large (around -500 byte) messages. Also, the total number of ptys is limited on many -systems, and it is good not to waste them unnecessarily. +a pipe, because pipes are more efficient. Also, the total number of +ptys is limited on many systems, and it is good not to waste them +unnecessarily. @defun make-process &rest args This function is the basic low-level primitive for starting diff --git a/src/process.c b/src/process.c index b0a327229c..e306b2ae9e 100644 --- a/src/process.c +++ b/src/process.c @@ -6456,9 +6456,11 @@ DEFUN ("process-send-region", Fprocess_send_region, Sprocess_send_region, PROCESS may be a process, a buffer, the name of a process or buffer, or nil, indicating the current buffer's process. Called from program, takes three arguments, PROCESS, START and END. -If the region is more than 500 characters long, -it is sent in several bunches. This may happen even for shorter regions. -Output from processes can arrive in between bunches. +If the region is larger than the input buffer of the process (the +length of which depends on the process connection type and the +operating system), it is sent in several bunches. This may happen +even for shorter regions. Output from processes can arrive in between +bunches. If PROCESS is a non-blocking network process that hasn't been fully set up yet, this function will block until socket setup has completed. */) @@ -6489,9 +6491,10 @@ DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string, doc: /* Send PROCESS the contents of STRING as input. PROCESS may be a process, a buffer, the name of a process or buffer, or nil, indicating the current buffer's process. -If STRING is more than 500 characters long, -it is sent in several bunches. This may happen even for shorter strings. -Output from processes can arrive in between bunches. +If STRING is larger than the input buffer of the process (the length +of which depends on the process connection type and the operating +system), it is sent in several bunches. This may happen even for +shorter strings. Output from processes can arrive in between bunches. If PROCESS is a non-blocking network process that hasn't been fully set up yet, this function will block until socket setup has completed. */) From 0f9be72701b5cf03a5b1162c4bce2776a5d2ba81 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 23 Dec 2018 09:04:37 +0100 Subject: [PATCH 04/11] Clarify thread switching while waiting for process output * doc/lispref/threads.texi (Threads): Clarify, that thread switching happens when waiting for process output from asynchronous processes. --- doc/lispref/threads.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi index ddeb2e923f..69f89c32bf 100644 --- a/doc/lispref/threads.texi +++ b/doc/lispref/threads.texi @@ -17,9 +17,9 @@ correct programs should not rely on cooperative threading. Currently, thread switching will occur upon explicit request via @code{thread-yield}, when waiting for keyboard input or for process -output (e.g., during @code{accept-process-output}), or during blocking -operations relating to threads, such as mutex locking or -@code{thread-join}. +output from asynchronous processes (e.g., during +@code{accept-process-output}), or during blocking operations relating +to threads, such as mutex locking or @code{thread-join}. Emacs Lisp provides primitives to create and control threads, and also to create and control mutexes and condition variables, useful for From 9578c2aa2201642e6846b0d09c14e72bc3225d09 Mon Sep 17 00:00:00 2001 From: Stephen Leake Date: Sun, 23 Dec 2018 10:23:26 -0800 Subject: [PATCH 05/11] Fix a simple bug in display-buffer-use-some-frame * lisp/window.el (display-buffer-use-some-frame): Simplify the predicate, fix TYPE arg to window--display-buffer. --- lisp/window.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/window.el b/lisp/window.el index f252b0e041..d40e6c5c81 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7114,9 +7114,7 @@ that allows the selected frame)." (or (cdr (assq 'frame-predicate alist)) (lambda (frame) (and (not (eq frame (selected-frame))) - (not (window-dedicated-p - (or (get-lru-window frame) - (frame-first-window frame)))))))) + (get-lru-window frame))))) (frame (car (filtered-frame-list predicate))) (window (and frame @@ -7125,7 +7123,7 @@ that allows the selected frame)." (when window (prog1 (window--display-buffer - buffer window 'frame alist display-buffer-mark-dedicated) + buffer window 'reuse alist display-buffer-mark-dedicated) (unless (cdr (assq 'inhibit-switch-frame alist)) (window--maybe-raise-frame frame)))))) From c9fdd1b4965ebd02aa408f878320c4955f5e2cc7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 27 Dec 2018 12:52:45 -0800 Subject: [PATCH 06/11] Improve accept-process-process doc * doc/lispref/processes.texi (Accepting Output): * src/process.c (Faccept_process_output): Document that (accept-process-output P) can return non-nil even after P has exited, and that it can return nil even if P is still running (Bug#33839). --- doc/lispref/processes.texi | 7 +++++-- src/process.c | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 623be09cc6..2aca7f82a1 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1795,7 +1795,8 @@ until output arrives from a process. This function allows Emacs to read pending output from processes. The output is given to their filter functions. If @var{process} is non-@code{nil} then this function does not return until some output -has been received from @var{process}. +has been received from @var{process} or @var{process} has closed the +connection. The arguments @var{seconds} and @var{millisec} let you specify timeout periods. The former specifies a period measured in seconds and the @@ -1820,7 +1821,9 @@ speech synthesis. The function @code{accept-process-output} returns non-@code{nil} if it got output from @var{process}, or from any process if @var{process} is -@code{nil}. It returns @code{nil} if the timeout expired before output +@code{nil}; this can occur even after a process has exited if the +corresponding connection contains buffered data. The function returns +@code{nil} if the timeout expired or the connection was closed before output arrived. @end defun diff --git a/src/process.c b/src/process.c index e306b2ae9e..4dafee8cbe 100644 --- a/src/process.c +++ b/src/process.c @@ -4581,8 +4581,8 @@ DEFUN ("accept-process-output", Faccept_process_output, Saccept_process_output, 0, 4, 0, doc: /* Allow any pending output from subprocesses to be read by Emacs. It is given to their filter functions. -Optional argument PROCESS means do not return until output has been -received from PROCESS. +Optional argument PROCESS means to return only after output is +received from PROCESS or PROCESS closes the connection. Optional second argument SECONDS and third argument MILLISEC specify a timeout; return after that much time even if there is @@ -4594,7 +4594,8 @@ If optional fourth argument JUST-THIS-ONE is non-nil, accept output from PROCESS only, suspending reading output from other processes. If JUST-THIS-ONE is an integer, don't run any timers either. Return non-nil if we received any output from PROCESS (or, if PROCESS -is nil, from any process) before the timeout expired. */) +is nil, from any process) before the timeout expired or the +corresponding connection was closed. */) (Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec, Lisp_Object just_this_one) { From 0c524597b31ae3a948b4fa70014cd3a56fe1fd79 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 28 Dec 2018 16:28:51 +0200 Subject: [PATCH 07/11] Fix commentary in dispnew.c * src/dispnew.c (buffer_posn_from_coords): Fix inaccuracies in the commentary. --- src/dispnew.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index d3a31967ae..dc5fb31485 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5097,13 +5097,15 @@ update_frame_line (struct frame *f, int vpos, bool updating_menu_p) ***********************************************************************/ /* Determine what's under window-relative pixel position (*X, *Y). - Return the OBJECT (string or buffer) that's there. + Return the object (string or buffer) that's there. Return in *POS the position in that object. Adjust *X and *Y to character positions. + If an image is shown at the specified position, return + in *OBJECT its image-spec. Return in *DX and *DY the pixel coordinates of the click, - relative to the top left corner of OBJECT, or relative to + relative to the top left corner of object, or relative to the top left corner of the character glyph at (*X, *Y) - if OBJECT is nil. + if the object at (*X, *Y) is nil. Return WIDTH and HEIGHT of the object at (*X, *Y), or zero if the coordinates point to an empty area of the display. */ From a731c563a1cbb425e143bd0c60905f8aebc4ca1a Mon Sep 17 00:00:00 2001 From: Alan Third Date: Thu, 27 Dec 2018 16:23:32 +0000 Subject: [PATCH 08/11] Fix NS fringe bitmap drawing bug (bug#33864) * src/nsterm.m (ns_draw_fringe_bitmap): Check the rectangle to clear correctly. --- src/nsterm.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index 893bb1b441..98a333d53a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2919,7 +2919,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, /* Work out the rectangle we will need to clear. Because we're compositing rather than blitting, we need to clear the area under the image regardless of anything else. */ - if (!p->overlay_p) + if (p->bx >= 0 && !p->overlay_p) { clearRect = NSMakeRect (p->bx, p->by, p->nx, p->ny); clearRect = NSUnionRect (clearRect, imageRect); From 822a2d039f7f411e1e41160b163cf24752aea971 Mon Sep 17 00:00:00 2001 From: Drew Adams Date: Mon, 3 Dec 2018 12:49:39 -0800 Subject: [PATCH 09/11] Fix :type 'group' in defcustom * lisp/wid-edit.el (group): Fix the :format spec. (Bug#33566) --- lisp/wid-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index bee7f8069e..29a7a44f2a 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2746,7 +2746,7 @@ Return an alist of (TYPE MATCH)." "A widget which groups other widgets inside." :convert-widget 'widget-types-convert-widget :copy 'widget-types-copy - :format "%v" + :format ":\n%v" :value-create 'widget-group-value-create :value-get 'widget-editable-list-value-get :default-get 'widget-group-default-get From 7a60a4f449da800e624cac67d590cd128820aae2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Dec 2018 10:15:50 +0200 Subject: [PATCH 10/11] Fix remote directories in Eshell on MS-Windows * lisp/files.el (cd): Support remote directory names on MS-Windows. (Bug#33791) --- lisp/files.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index eb09a7c83f..0b82c94334 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -801,9 +801,16 @@ The path separator is colon in GNU and GNU-like systems." (setq cd-path (or (parse-colon-path (getenv "CDPATH")) (list "./")))) (cd-absolute - (or (locate-file dir cd-path nil - (lambda (f) (and (file-directory-p f) 'dir-ok))) - (error "No such directory found via CDPATH environment variable")))) + (or + ;; locate-file doesn't support remote file names, so detect them + ;; and support them here by hand. + (and (file-remote-p (expand-file-name dir)) + (file-name-absolute-p (expand-file-name dir)) + (file-accessible-directory-p (expand-file-name dir)) + (expand-file-name dir)) + (locate-file dir cd-path nil + (lambda (f) (and (file-directory-p f) 'dir-ok))) + (error "No such directory found via CDPATH environment variable")))) (defun directory-files-recursively (dir regexp &optional include-directories) "Return list of all files under DIR that have file names matching REGEXP. From 3abebeb8c3047092763f2d4a61fe7dfc659cd1bf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Dec 2018 11:47:40 +0200 Subject: [PATCH 11/11] * lisp/files.el (cd): Fix last change. (Bug#33791) --- lisp/files.el | 1 - 1 file changed, 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 0b82c94334..7794f398cf 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -805,7 +805,6 @@ The path separator is colon in GNU and GNU-like systems." ;; locate-file doesn't support remote file names, so detect them ;; and support them here by hand. (and (file-remote-p (expand-file-name dir)) - (file-name-absolute-p (expand-file-name dir)) (file-accessible-directory-p (expand-file-name dir)) (expand-file-name dir)) (locate-file dir cd-path nil