GNU ELPA has a 'debbugs' package that allows accessing the tracker
database from Emacs.
+Bugs needs regular attention. A large backlog of bugs is
+disheartening to the developers, and a culture of ignoring bugs is
+harmful to users, who expect software that works. Bugs have to be
+regularly looked at and acted upon. Not all bugs are critical, but at
+the least, each bug needs to be regularly re-reviewed to make sure it
+is still reproducible.
+
+The process of going through old or new bugs and acting on them is
+called bug triage. This process is described in the file
+admin/notes/bug-triage.
+
** Document your changes.
Any change that matters to end-users should have an entry in etc/NEWS.
"(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/
for more information on writing and running tests.
+ If your test lasts longer than some few seconds, mark it in its
+ `ert-deftest' definition with ":tags '(:expensive-test)".
+
To run tests on the entire Emacs tree, run "make check" from the
top-level directory. Most tests are in the directory
-"test/automated". From the "test/automated" directory, run "make
+"test/". From the "test/" directory, run "make
<filename>" to run the tests for <filename>.el(c). See
-"test/automated/Makefile" for more information.
+"test/Makefile" for more information.
+ Tests which are tagged ":expensive-test" are enabled additionally, if
+ you run "make check-expensive" from the top-level directory. "make
+ <filename>" as mentioned above incorporates expensive tests for
+ <filename>.el(c).
+
** Understanding Emacs Internals.
The best way to understand Emacs Internals is to read the code,
@defun send-string-to-terminal string &optional terminal
This function sends @var{string} to @var{terminal} without alteration.
Control characters in @var{string} have terminal-dependent effects.
+ (If you need to display non-ASCII text on the terminal, encode it
+ using one of the functions described in @ref{Explicit Encoding}.)
This function operates only on text terminals. @var{terminal} may be
a terminal object, a frame, or @code{nil} for the selected frame's
terminal. In batch mode, @var{string} is sent to @code{stdout} when
calls @var{function} with no arguments, or @samp{--eval @var{form}}.
Any Lisp program output that would normally go to the echo area,
- either using @code{message}, or using @code{prin1}, etc., with @code{t}
- as the stream, goes instead to Emacs's standard error descriptor when
- in batch mode. Similarly, input that would normally come from the
- minibuffer is read from the standard input descriptor.
- Thus, Emacs behaves much like a noninteractive
- application program. (The echo area output that Emacs itself normally
- generates, such as command echoing, is suppressed entirely.)
+ either using @code{message}, or using @code{prin1}, etc., with
+ @code{t} as the stream, goes instead to Emacs's standard descriptors
+ when in batch mode: @code{message} writes to the standard error
+ descriptor, while @code{prin1} and other print functions write to the
+ standard output. Similarly, input that would normally come from the
+ minibuffer is read from the standard input descriptor. Thus, Emacs
+ behaves much like a noninteractive application program. (The echo
+ area output that Emacs itself normally generates, such as command
+ echoing, is suppressed entirely.)
+
+ Non-ASCII text written to the standard output or error descriptors is
+ by default encoded using @code{locale-coding-system} (@pxref{Locales})
+ if it is non-@code{nil}; this can be overridden by binding
+ @code{coding-system-for-write} to a coding system of you choice
+ (@pxref{Explicit Encoding}).
@defvar noninteractive
This variable is non-@code{nil} when Emacs is running in batch mode.
Several operating systems support watching of filesystems for changes
of files. If configured properly, Emacs links a respective library
-like @file{gfilenotify}, @file{inotify}, or @file{w32notify}
-statically. These libraries enable watching of filesystems on the
-local machine.
+like @file{inotify}, @file{kqueue}, @file{gfilenotify}, or
+@file{w32notify} statically. These libraries enable watching of
+filesystems on the local machine.
It is also possible to watch filesystems on remote machines,
@pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual}
Note that the @file{w32notify} library does not report
@code{attribute-changed} events. When some file's attribute, like
permissions or modification time, has changed, this library reports a
-@code{changed} event.
+@code{changed} event. Likewise, the @file{kqueue} library does not
+report reliably file attribute changes when watching a directory.
The @code{stopped} event reports, that watching the file has been
stopped. This could be because @code{file-notify-rm-watch} was called
@group
(write-region "bla" nil "/tmp/foo")
@result{} Event (35025468 created "/tmp/.#foo")
- Event (35025468 changed "/tmp/foo") [2 times]
+ Event (35025468 changed "/tmp/foo")
Event (35025468 deleted "/tmp/.#foo")
@end group
@example
@group
(make-directory "/tmp/foo")
- @result{} nil
+ @result{} Event (35025468 created "/tmp/foo")
@end group
@group
(setq desc
(file-notify-add-watch
"/tmp/foo" '(change) 'my-notify-callback))
- @result{} 35025468
+ @result{} 11359632
@end group
@group
@group
(write-region "bla" nil "/tmp/foo/bla")
- @result{} Event (35025468 created "/tmp/foo/.#bla")
- Event (35025468 created "/tmp/foo/bla")
- Event (35025468 changed "/tmp/foo/bla")
- Event (35025468 changed "/tmp/foo/.#bla")
+ @result{} Event (11359632 created "/tmp/foo/.#bla")
+ Event (11359632 created "/tmp/foo/bla")
+ Event (11359632 changed "/tmp/foo/bla")
+ Event (11359632 deleted "/tmp/foo/.#bla")
@end group
@group
;; Deleting a file in the directory doesn't invalidate the watch.
(delete-file "/tmp/foo/bla")
- @result{} Event (35025468 deleted "/tmp/foo/bla")
+ @result{} Event (11359632 deleted "/tmp/foo/bla")
@end group
@group
(write-region "bla" nil "/tmp/foo/bla")
- @result{} Event (35025468 created "/tmp/foo/.#bla")
- Event (35025468 created "/tmp/foo/bla")
- Event (35025468 changed "/tmp/foo/bla")
- Event (35025468 changed "/tmp/foo/.#bla")
+ @result{} Event (11359632 created "/tmp/foo/.#bla")
+ Event (11359632 created "/tmp/foo/bla")
+ Event (11359632 changed "/tmp/foo/bla")
+ Event (11359632 deleted "/tmp/foo/.#bla")
@end group
@group
;; Deleting the directory invalidates the watch.
+;; Events arrive for different watch descriptors.
(delete-directory "/tmp/foo" 'recursive)
- @result{} Event (35025468 deleted "/tmp/foo/bla")
- Event (35025468 deleted "/tmp/foo")
- Event (35025468 stopped "/tmp/foo")
+ @result{} Event (35025468 deleted "/tmp/foo")
+ Event (11359632 deleted "/tmp/foo/bla")
+ Event (11359632 deleted "/tmp/foo")
+ Event (11359632 stopped "/tmp/foo")
@end group
@group
When you add a new item, use the appropriate mark if you are sure it applies,
otherwise leave it unmarked.
+\f
+* Installation Changes in Emacs 25.2
+
+** 'configure' detects the kqueue file notification library on *BSD
+and Mac OS X machines.
+
+\f
+* Startup Changes in Emacs 25.2
+
+\f
+* Changes in Emacs 25.2
+
+** It is possible to disable attempted recovery on fatal signals
+
+Two new variables allow to disable attempts to recover from stack
+overflow and to avoid automatic auto-save when Emacs is delivered a
+fatal signal. `attempt-stack-overflow-recovery', if set to `nil',
+will disable attempts to recover from C stack overflows; Emacs will
+then crash as with any other fatal signal.
+`attempt-orderly-shutdown-on-fatal-signal', if set to `nil', will
+disable attempts to auto-save the session and shut down in an orderly
+fashion when Emacs receives a fatal signal; instead, Emacs will
+terminate immediately. Both variables are non-`nil' by default.
+These variables are for users who would like to avoid the small
+probability of data corruption due to techniques Emacs uses to recover
+in these situations.
+
+\f
+* Editing Changes in Emacs 25.2
+
+\f
+* Changes in Specialized Modes and Packages in Emacs 25.2
+
+** File Notifications
+
+*** The kqueue library is integrated for *BSD and Mac OS X machines.
+
+\f
+* New Modes and Packages in Emacs 25.2
+
+\f
+* Incompatible Lisp Changes in Emacs 25.2
+
+\f
+* Lisp Changes in Emacs 25.2
+
+** Autoload files can be generated without timestamps,
+by setting `autoload-timestamps' to nil.
+
+\f
+* Changes in Emacs 25.2 on Non-Free Operating Systems
+
\f
* Installation Changes in Emacs 25.1
Various resolutions are available as etc/images/icons/hicolor/*/apps/emacs.png.
The old Emacs logo icons are available as `emacs23.png' in the same location.
+ ** New make target `check-expensive' to run additional tests.
+ This includes all tests which run via "make check", plus additional
+ tests which take more time to perform.
+
\f
* Startup Changes in Emacs 25.1
added via the new Network Security Manager (NSM) and controlled via
the `network-security-level' variable.
+---
+** International domain names (IDNA) are now encoded via the new
+puny.el library, so that one can visit web sites like
+"http://méxico.icom.museum".
+
** If Emacs isn't built with TLS support, an external TLS-capable
program is used instead. This program used to be run in --insecure
mode by default, but has now changed to be secure instead, and will
+++
** C-h l now also lists the commands that were run.
-+++
-** x-select-enable-clipboard is renamed select-enable-clipboard
-and x-select-enable-primary is renamed select-enable-primary.
+** The new M-s M-w key binding uses eww to search the web for the
+text in the region.
+
+** M-x suggests shorthands and ignores obsolete commands for completion.
+** x-select-enable-clipboard is renamed select-enable-clipboard.
+x-select-enable-primary and renamed select-enable-primary.
Additionally they both now apply to all systems (OSX, GNUstep, Windows, you
name it), with the proviso that on some systems (e.g. Windows)
select-enable-primary is ineffective since the system doesn't
`erc-network-hide-list' and `erc-channel-hide-list' will only hide the
specified message types for the respective specified targets.
+*** New variable `erc-default-port-tls' used to connect to TLS IRC
+servers.
+
** Midnight-mode
---
whether to use variable-pitch fonts or not. The user can also
customize the `shr-use-fonts' variable.
++++
+*** A new command `C' (`eww-toggle-colors') can be used to toggle
+whether to use the HTML-specified colors or not. The user can also
+customize the `shr-use-colors' variable.
+
+++
*** A new command `R' (`eww-readable') will try do identify the main
textual parts of a web page and display only that, leaving menus and
compression command is determined from the new
`dired-compress-files-alist' variable.
++++
+*** `W' is now bound to `browse-url-of-dired-file', and is useful for
+viewing HTML files and the like.
+
** Tabulated List Mode
+++
`hfy-optimisations' has been renamed to `hfy-optimizations'.
The old name should still work, as an obsolescent alias.
-\f
-* Changes in Frames and Windows Code in Emacs 25.1
+** Changes in Frame- and Window- Handling
+++
-** Emacs can now draw horizontal scroll bars on some platforms that
+*** Emacs can now draw horizontal scroll bars on some platforms that
provide toolkit scroll bars, namely Gtk+, Lucid, Motif and Windows.
Horizontal scroll bars are turned off by default.
-*** New function `horizontal-scroll-bars-available-p' telling whether
+**** New function `horizontal-scroll-bars-available-p' telling whether
horizontal scroll bars are available on the underlying system.
-*** New mode `horizontal-scroll-bar-mode' to toggle horizontal scroll
+**** New mode `horizontal-scroll-bar-mode' to toggle horizontal scroll
bars on all existing and future frames.
-*** New function `toggle-horizontal-scroll-bar' to toggle horizontal
+**** New function `toggle-horizontal-scroll-bar' to toggle horizontal
scroll bars on the selected frame.
-*** New frame parameters `horizontal-scroll-bars' and
+**** New frame parameters `horizontal-scroll-bars' and
`scroll-bar-height' to set horizontal scroll bars and their height
for individual frames and in `default-frame-alist'.
-*** New functions `frame-scroll-bar-height' and
+**** New functions `frame-scroll-bar-height' and
`window-scroll-bar-height' return the height of horizontal scroll
bars on a specific frame or window.
-*** `set-window-scroll-bars' now accepts five parameters where the last
+**** `set-window-scroll-bars' now accepts five parameters where the last
two specify height and type of the window's horizontal scroll bar.
-*** `window-scroll-bars' now returns type and sizes of horizontal scroll
+**** `window-scroll-bars' now returns type and sizes of horizontal scroll
bars too.
-*** New buffer-local variables `horizontal-scroll-bar' and
+**** New buffer-local variables `horizontal-scroll-bar' and
`scroll-bar-height'.
+++
-** New functions `frame-geometry' and `frame-edges' give access to a
+*** New functions `frame-geometry' and `frame-edges' give access to a
frame's geometry.
+++
-** New functions `mouse-absolute-pixel-position' and
+*** New functions `mouse-absolute-pixel-position' and
`set-mouse-absolute-pixel-position' get/set screen coordinates of the
mouse cursor.
+++
-** The function `window-edges' now accepts three additional arguments to
+*** The function `window-edges' now accepts three additional arguments to
retrieve body, absolute and pixel edges of the window.
+++
-** The functions `window-inside-edges', `window-inside-pixel-edges' and
+*** The functions `window-inside-edges', `window-inside-pixel-edges' and
`window-inside-absolute-pixel-edges' have been renamed to respectively
`window-body-edges', `window-body-pixel-edges' and
`window-absolute-body-pixel-edges'. The old names are kept as aliases.
+++
-** New function `window-absolute-pixel-position' to get the screen
+*** New function `window-absolute-pixel-position' to get the screen
coordinates of a visible buffer position.
+++
-** The height of a frame's menu and tool bar are no longer counted in the
+*** The height of a frame's menu and tool bar are no longer counted in the
frame's text height. This means that the text height stands only for
the height of the frame's root window plus that of the echo area (if
present). This was already the behavior for frames with external tool
builds.
+++
-** Frames now do not necessarily preserve the number of columns or lines
+*** Frames now do not necessarily preserve the number of columns or lines
they display when setting default font, menu bar, fringe width, or
scroll bars. In particular, maximized and fullscreen frames are
conceptually never resized if such settings change. For fullheight and
fullwidth frames, the behavior may depend on the toolkit used.
-*** New option `frame-inhibit-implied-resize' if non-nil, means that
+**** New option `frame-inhibit-implied-resize' if non-nil, means that
setting default font, menu bar, fringe width, or scroll bars of a
specific frame does not resize that frame in order to preserve the
number of columns or lines it displays.
+++
-** New function `window-preserve-size' allows to preserve the size of
+*** New function `window-preserve-size' allows to preserve the size of
windows without "fixing" it. It's supported by `fit-window-to-buffer',
`temp-buffer-resize-mode' and `display-buffer'.
+++
-** New `display-buffer' action function `display-buffer-use-some-frame'.
+*** New `display-buffer' action function `display-buffer-use-some-frame'.
This displays the buffer in an existing frame other than the current
frame, and allows the caller to specify a frame predicate to exclude
frames.
+++
-** New minor mode `window-divider-mode' and options
+*** New minor mode `window-divider-mode' and options
`window-divider-default-places', `window-divider-default-bottom-width'
and `window-divider-default-right-width'.
-** Tearoff menus and detachable toolbars for Gtk+ has been removed.
+** Tearoff menus and detachable toolbars for Gtk+ have been removed.
Those features have been deprecated in Gtk+ for a long time.
** Etags
(defconst generate-autoload-section-continuation ";;;;;; "
"String to add on each continuation of the section header form.")
+(defvar autoload-timestamps t
+ "Non-nil means insert a timestamp for each input file into the output.
+We use these in incremental updates of the output file to decide
+if we need to rescan an input file. If you set this to nil,
+then we use the timestamp of the output file instead. As a result:
+ - for fixed inputs, the output will be the same every time
+ - incremental updates of the output file might not be correct if:
+ i) the timestamp of the output file cannot be trusted (at least
+ relative to that of the input files)
+ ii) any of the input files can be modified during the time it takes
+ to create the output
+ iii) only a subset of the input files are scanned
+ These issues are unlikely to happen in practice, and would arguably
+ represent bugs in the build system. Item iii) will happen if you
+ use a command like `update-file-autoloads', though, since it only
+ checks a single input file.")
+
(defvar autoload-modified-buffers) ;Dynamically scoped var.
(defun make-autoload (form file &optional expansion)
;; We'd really want to just use
;; `emacs-internal' instead.
nil nil 'emacs-mule-unix)
- (nth 5 (file-attributes relfile))))
+ (if autoload-timestamps
+ (nth 5 (file-attributes relfile))
+ t)))
(insert ";;; Generated autoloads from " relfile "\n")))
(insert generate-autoload-section-trailer))))
(or noninteractive
(defun autoload-find-destination (file load-name)
"Find the destination point of the current buffer's autoloads.
FILE is the file name of the current buffer.
+ LOAD-NAME is the name as it appears in the output.
Returns a buffer whose point is placed at the requested location.
- Returns nil if the file's autoloads are uptodate, otherwise
+ Returns nil if the file's autoloads are up-to-date, otherwise
removes any prior now out-of-date autoload entries."
(catch 'up-to-date
(let* ((buf (current-buffer))
(existing-buffer (if buffer-file-name buf))
+ (output-file (autoload-generated-file))
+ (output-time (if (file-exists-p output-file)
+ (nth 5 (file-attributes output-file))))
(found nil))
(with-current-buffer (autoload-find-generated-file)
;; This is to make generated-autoload-file have Unix EOLs, so
(file-time (nth 5 (file-attributes file))))
(if (and (or (null existing-buffer)
(not (buffer-modified-p existing-buffer)))
- (or
+ (cond
;; last-time is the time-stamp (specifying
;; the last time we looked at the file) and
;; the file hasn't been changed since.
- ((listp last-time)
- (and (listp last-time)
- (not (time-less-p last-time file-time)))
++ ((listp last-time) (= (length last-time) 2)
+ (not (time-less-p last-time file-time)))
+ ;; FIXME? Arguably we should throw a
+ ;; user error, or some kind of warning,
+ ;; if we were called from update-file-autoloads,
+ ;; which can update only a single input file.
+ ;; It's not appropriate to use the output
+ ;; file modtime in such a case,
+ ;; if there are multiple input files
+ ;; contributing to the output.
+ ((and output-time (eq t last-time))
+ (not (time-less-p output-time file-time)))
;; last-time is an MD5 checksum instead.
- (and (stringp last-time)
- (equal last-time
- (md5 buf nil nil 'emacs-mule)))))
+ ((stringp last-time)
+ (equal last-time
+ (md5 buf nil nil 'emacs-mule)))))
(throw 'up-to-date nil)
(autoload-remove-section begin)
(setq found t))))
(generated-autoload-file
(if (called-interactively-p 'interactive)
(read-file-name "Write autoload definitions to file: ")
- generated-autoload-file)))
+ generated-autoload-file))
+ (output-time
+ (if (file-exists-p generated-autoload-file)
+ (nth 5 (file-attributes generated-autoload-file)))))
(with-current-buffer (autoload-find-generated-file)
(save-excursion
;; Remove the obsolete section.
(autoload-remove-section (match-beginning 0))
(setq last-time (nth 4 form))
+ (if (equal t last-time)
+ (setq last-time output-time))
(dolist (file file)
(let ((file-time (nth 5 (file-attributes file))))
(when (and file-time
(member (expand-file-name file) autoload-excludes))
;; Remove the obsolete section.
(autoload-remove-section (match-beginning 0)))
- ((not (time-less-p (nth 4 form)
+ ((not (time-less-p (let ((oldtime (nth 4 form)))
+ (if (equal t oldtime)
+ output-time
+ oldtime))
(nth 5 (file-attributes file))))
;; File hasn't changed.
nil)
(goto-char (point-max))
(search-backward "\f" nil t)
(autoload-insert-section-header
- (current-buffer) nil nil no-autoloads no-autoloads-time)
+ (current-buffer) nil nil no-autoloads (if autoload-timestamps
+ no-autoloads-time
+ t))
(insert generate-autoload-section-trailer)))
(let ((version-control 'never))
# We never change directory before running Emacs, so a relative file
# name is fine, and makes life easier. If we need to change
# directory, we can use emacs --chdir.
-EMACS = ../../src/emacs
+EMACS = ../src/emacs
EMACS_EXTRAOPT=
## to change this; bug#17848 - if that gets done, this can be simplified).
##
## Beware: it approximates 'no-byte-compile', so watch out for false-positives!
-SELECTOR_DEFAULT=(quote (not (tag :expensive-test)))
-SELECTOR_EXPENSIVE=nil
-SELECTOR=
-%.log: ${srcdir}/%.el
+%.log: %.el
@if grep '^;.*no-byte-compile: t' $< > /dev/null; then \
loadfile=$<; \
else \
fi; \
echo Testing $$loadfile; \
stat=OK ; \
+ mkdir --parents $(dir $@) ; \
$(emacs) -l ert -l $$loadfile \
- --eval "(ert-run-tests-batch-and-exit ${SELECTOR})" ${WRITE_LOG}
+ -f ert-run-tests-batch-and-exit ${WRITE_LOG}
-ELFILES = $(sort $(wildcard ${srcdir}/*.el))
-LOGFILES = $(patsubst %.el,%.log,$(notdir ${ELFILES}))
-TESTS = ${LOGFILES:.log=}
+ELFILES = $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \
+ -path "*resources" -prune -o -name "*el" -print)
+## .elc files may be in a different directory for out of source builds
+ELCFILES = $(patsubst %.el,%.elc, \
+ $(patsubst $(srcdir)%,.%,$(ELFILES)))
+LOGFILES = $(patsubst %.elc,%.log,${ELCFILES})
+LOGSAVEFILES = $(patsubst %.elc,%.log~,${ELCFILES})
+TESTS = $(subst ${srcdir}/,,$(LOGFILES:.log=))
## If we have to interrupt a hanging test, preserve the log so we can
## see what the problem was.
.PHONY: ${TESTS}
## The short aliases that always re-run the tests, with no logging.
+## Define an alias both with and without the directory name for ease
+## of use.
define test_template
$(1):
- @test ! -f $(1).log || mv $(1).log $(1).log~
- @${MAKE} $(1).log WRITE_LOG=
+ @test ! -f ./$(1).log || mv ./$(1).log ./$(1).log~
+ @${MAKE} ./$(1).log WRITE_LOG=
+
+$(notdir $(1)): $(1)
endef
$(foreach test,${TESTS},$(eval $(call test_template,${test})))
-
- ## Re-run all the tests every time.
+## Include dependencies between test files and the files they test.
+## We do this without the file and eval directly, but then we would
+## have to run Emacs for every make invocation, and it might not be
+## available during clean.
+-include make-test-deps.mk
+ ## Rerun default tests.
check:
- @${MAKE} check-doit SELECTOR="${SELECTOR_DEFAULT}"
-
-## Rerun also expensive tests.
-.PHONY: check-expensive
-check-expensive:
- @${MAKE} check-doit SELECTOR="${SELECTOR_EXPENSIVE}"
-
-## Re-run all the tests every time.
-.PHONY: check-doit
-check-doit:
- -@for f in *.log; do test ! -f $$f || mv $$f $$f~; done
+ -@for f in $(LOGFILES); do test ! -f $$f || mv $$f $$f~; done
@${MAKE} check-maybe
## Only re-run tests whose .log is older than the test.
.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
clean mostlyclean:
- -rm -f *.log *.log~
+ -rm -f ${LOGFILES} ${LOGSAVEFILES}
+ -rm make-test-deps.mk
bootstrap-clean: clean
- -rm -f ${srcdir}/*.elc
+ -rm -f ${ELCFILES}
distclean: clean
rm -f Makefile
maintainer-clean: distclean bootstrap-clean
+make-test-deps.mk: $(ELFILES) make-test-deps.emacs-lisp
+ $(EMACS) --batch -l $(srcdir)/make-test-deps.emacs-lisp \
+ --eval "(make-test-deps \"$(srcdir)\")" \
+ 2> $@
# Makefile ends here.