+++
*** Bookmarks no longer include context for encrypted files.
If you're visiting an encrypted file, setting a bookmark no longer
-includes excerpts from that buffer in the bookmarks file.
+includes excerpts from that buffer in the bookmarks file. This is
+implemented by the new hook 'bookmark-inhibit-context-functions',
+where packages can register a function which returns non-nil for file
+names to be excluded from adding such excerpts.
---
*** 'show-paren-mode' is now disabled in 'special-mode' buffers.
---
** The linum.el library is now obsolete.
-We recommend using either the built-in `display-line-numbers-mode', or
-the `nlinum' package from GNU ELPA instead. The former has better
+We recommend using either the built-in 'display-line-numbers-mode', or
+the 'nlinum' package from GNU ELPA instead. The former has better
performance, but the latter is closer to a drop-in replacement.
---
(which is now declared obsolete).
---
-** 'savehist.el' can now truncate variables that are too long.
+** savehist.el can now truncate variables that are too long.
An element of 'savehist-additional-variables' can now be of the form
'(VARIABLE . MAX-ELTS)', which means to truncate the VARIABLE's value to
at most MAX-ELTS elements (if the value is a list) before saving the
*** 'image-dired-thumb-size' increased to 128.
---
-*** 'image-dired-thumb-(height|width)' are now obsolete.
+*** 'image-dired-thumb-{height,width}' are now obsolete.
Customize 'image-dired-thumb-size' instead, which will set both the
height and width.
'elide-head' does; disabling it shows the header. The commands
'elide-head' and 'elide-head-show' are now obsolete.
-*** New package 'osc'.
+*** New package osc.el.
Support for OSC ("Operating System Command") escape sequences has been
-extracted from 'comint.el' in order to provide interpretation of OSC
+extracted from comint.el in order to provide interpretation of OSC
sequences in compilation buffers.
Adding the new function 'osc-compilation-filter' to
The list of handlers (already covering OSC 7 and 8) has been extended
with a handler for OSC 2, the command to set a window title.
-
+++
*** New user option 'project-vc-include-untracked'.
If non-nil, files untracked by a VCS are considered to be part of
** "loaddefs.el" generation has been reimplemented.
The various "loaddefs.el" files in the Emacs tree (which contain
information about autoloads, built-in packages and package prefixes)
-used to be generated by functions in "autoloads.el". These are now
-generated by "loaddefs-gen.el" instead. This leads to functionally
-equivalent loaddef files, but they do not use exactly the same syntax,
-so using 'M-x update-file-autoloads' no longer works. (This didn't
-work well in most files in the past, either, but it will now signal an
-error in any file.)
+used to be generated by functions in autoloads.el. These are now
+generated by loaddefs-gen.el instead. This leads to functionally
+equivalent "loaddef.el" files, but they do not use exactly the same
+syntax, so using 'M-x update-file-autoloads' no longer works. (This
+didn't work well in most files in the past, either, but it will now
+signal an error in any file.)
In addition, files are scanned in a slightly different way.
Previously ';;;###' specs inside a top-level form (i.e., something
;; (mapcar #'auth-source-backend-parse auth-sources)
+(defun auth-source-file-name-p (file)
+ "Say whether FILE is used by `auth-sources'."
+ (let* ((backends (mapcar #'auth-source-backend-parse auth-sources))
+ (files
+ (mapcar (lambda (x)
+ (when (member (slot-value x 'type) '(json netrc plstore))
+ (slot-value x 'source)))
+ backends)))
+ (member (expand-file-name file)
+ (mapcar #'expand-file-name (remq nil files)))))
+
+(with-eval-after-load 'bookmark
+ (add-hook 'bookmark-inhibit-context-functions
+ #'auth-source-file-name-p))
+
(cl-defun auth-source-search (&rest spec
&key max require create delete
&allow-other-keys)
in which case a default heuristic will be used. The function can also
equivalently just return ALIST without NAME.")
+(defcustom bookmark-inhibit-context-functions nil
+ "List of functions to call before making a bookmark record.
+The functions take `buffer-file-name' as argument. If any of
+these functions returns non-nil, the bookmark does not record
+context strings from the current buffer."
+ :type 'hook
+ :version "29.1")
+
(defun bookmark-make-record ()
"Return a new bookmark record (NAME . ALIST) for the current location."
(let* ((bookmark-search-size
;; don't include any context in the bookmark file, because
;; that would leak (possibly secret) data.
(if (and buffer-file-name
- (or (and (fboundp 'epa-file-name-p)
- (epa-file-name-p buffer-file-name))
- (and (fboundp 'tramp-crypt-file-name-p)
- (tramp-crypt-file-name-p buffer-file-name))))
+ (not (run-hook-with-args-until-success
+ 'bookmark-inhibit-context-functions buffer-file-name)))
0
bookmark-search-size))
(record (funcall bookmark-make-record-function)))