The @code{stopped} event means that watching the file has been
discontinued. This could be because @code{file-notify-rm-watch} was
called (see below), or because the file being watched was deleted, or
-due to another error reported from the underlying library which makes
+because the filesystem of the file being watched was unmounted, or due
+to another error reported from the underlying library which makes
further watching impossible.
@var{file} and @var{file1} are the name of the file(s) whose event is
same base name that belong to different projects by using the provided
transform function 'project-uniquify-dirname-transform'.
-** 'insert-directory-program' is now a defcustom.
-
-** 'insert-directory-program' prefers "gls" on *BSD and macOS.
+** 'insert-directory-program' is now a user option.
On *BSD and macOS systems, this user option now defaults to the "gls"
executable, if it exists. This should remove the need to change its
value when installing GNU coreutils using something like ports or
* Changes in Specialized Modes and Packages in Emacs 30.1
** gdb-mi
+
---
*** Variable order and truncation can now be configured in 'gdb-many-windows'.
The new user option 'gdb-locals-table-row-config' allows users to
---
*** New user option 'gdb-display-io-buffer'.
-If this is nil, "M-x gdb" will neither create nor display a separate
+If this is nil, 'M-x gdb' will neither create nor display a separate
buffer for the I/O of the program being debugged, but will instead
redirect the program's interaction to the GDB execution buffer. The
default is t, to preserve previous behavior.
and 'rg'. The headings are displayed using the new 'grep-heading'
face.
----
** Compilation mode
+---
*** The 'omake' matching rule is now disabled by default.
This is because it partly acts by modifying other rules which may
occasionally be surprising. It can be re-enabled by adding 'omake' to
method but "sudo" can be configured with user option
'tramp-file-name-with-method'.
+** File Notifications
+
++++
+*** All backends except w32notify detect unmounting of a watched filesystem now.
+
** EWW
+++
** ERT
-*** New macro `skip-when' to skip 'ert-deftest' tests.
++++
+*** New macro 'skip-when' to skip 'ert-deftest' tests.
This can help avoid some awkward skip conditions. For example
'(skip-unless (not noninteractive))' can be changed to the easier
to read '(skip-when noninteractive)'.
The user option 'url-gateway-nslookup-program' and the function
'url-gateway-nslookup-host' are consequently also obsolete.
-+++
** Edmacro
++++
*** New command 'edmacro-set-macro-to-region-lines'.
Bound to 'C-c C-r', this command replaces the macro text with the
lines of the region. If needed, the region is extended to include
whole lines. If the region ends at the beginning of a line, that last
line is excluded.
++++
*** New user option 'edmacro-reverse-macro-lines'.
When this is non-nil, the lines of key sequences are displayed with
-the most recent line fist. This is can be useful when working with
+the most recent line first. This is can be useful when working with
macros with many lines, such as from 'kmacro-edit-lossage'.
\f
---
*** New major mode 'elixir-ts-mode'.
-A major mode based on the tree-sitter library for editing Elixir
-files.
+A major mode based on the tree-sitter library for editing Elixir files.
+
+---
+*** New major mode 'lua-ts-mode'.
+A major mode based on the tree-sitter library for editing Lua files.
+++
** New global minor mode 'minibuffer-regexp-mode'.
a user-friendly way, avoids reporting alleged paren mismatches and makes
sexp navigation more intuitive.
----
-*** New major mode 'lua-ts-mode'.
-A major mode based on the tree-sitter library for editing Lua files.
-
---
** The highly accessible Modus themes collection has eight items.
The 'modus-operandi' and 'modus-vivendi' are the main themes that have
\f
* Incompatible Lisp Changes in Emacs 30.1
-** 'post-gc-hook' runs after updating 'gcs-done' and `'gcs-elapsed'.
+** 'post-gc-hook' runs after updating 'gcs-done' and 'gcs-elapsed'.
---
** The escape sequence '\x' not followed by hex digits is now an error.
((memq action '(delete delete-self move-self)) 'deleted)
((eq action 'moved-from) 'renamed-from)
((eq action 'moved-to) 'renamed-to)
- ((eq action 'ignored) 'stopped)))
+ ((memq action '(ignored unmount)) 'stopped)))
actions))
file file1-or-cookie))
((eq action 'write) 'changed)
((memq action '(attrib link)) 'attribute-changed)
((eq action 'delete) 'deleted)
- ((eq action 'rename) 'renamed)))
+ ((eq action 'rename) 'renamed)
+ ((eq action 'revoke) 'stopped)))
actions))
file file1-or-cookie))
((memq action
'(created changed attribute-changed deleted))
action)
- ((eq action 'moved) 'renamed)))
+ ((eq action 'moved) 'renamed)
+ ((eq action 'unmounted) 'stopped)))
(if (consp actions) actions (list actions))))
file file1-or-cookie))
((memq action '(created changed attribute-changed deleted))
action)
((eq action 'moved) 'renamed)
+ ((eq action 'unmounted) 'stopped)
;; inotify actions:
((eq action 'create) 'created)
((eq action 'modify) 'changed)
((memq action '(delete delete-self move-self)) 'deleted)
((eq action 'moved-from) 'renamed-from)
((eq action 'moved-to) 'renamed-to)
- ((eq action 'ignored) 'stopped)))
+ ((memq action '(ignored unmount)) 'stopped)))
(if (consp actions) actions (list actions))))
file file1-or-cookie))
"Add a watch for FILE in DIR with FLAGS, using inotify."
(inotify-add-watch dir
(append
- '(dont-follow)
+ '(dont-follow ignored unmount)
(and (memq 'change flags)
'(create delete delete-self modify move-self move))
(and (memq 'attribute-change flags)
;; directories, so we watch each file directly.
(kqueue-add-watch file
(append
+ '(revoke)
(and (memq 'change flags)
'(create delete write extend rename))
(and (memq 'attribute-change flags)
(cond
((and (memq 'change flags) (memq 'attribute-change flags))
'(created changed changes-done-hint moved deleted
- attribute-changed))
+ attribute-changed unmounted))
((memq 'change flags)
- '(created changed changes-done-hint moved deleted))
- ((memq 'attribute-change flags) '(attribute-changed))))
+ '(created changed changes-done-hint moved deleted unmounted))
+ ((memq 'attribute-change flags) '(attribute-changed unmounted))))
(p (apply
#'start-process
"gvfs-monitor" (generate-new-buffer " *gvfs-monitor*")
(cond
((and (memq 'change flags) (memq 'attribute-change flags))
(concat "create,modify,move,moved_from,moved_to,move_self,"
- "delete,delete_self,attrib,ignored"))
+ "delete,delete_self,attrib"))
((memq 'change flags)
(concat "create,modify,move,moved_from,moved_to,move_self,"
- "delete,delete_self,ignored"))
- ((memq 'attribute-change flags) "attrib,ignored"))
+ "delete,delete_self"))
+ ((memq 'attribute-change flags) "attrib"))
+ events (concat events ",ignored,unmount")
;; "-P" has been added to version 3.21, so we cannot assume it yet.
sequence `(,command "-mq" "-e" ,events ,localname)
;; Make events a list of symbols.
(cond
((and (memq 'change flags) (memq 'attribute-change flags))
'(created changed changes-done-hint moved deleted
- attribute-changed))
+ attribute-changed unmounted))
((memq 'change flags)
- '(created changed changes-done-hint moved deleted))
- ((memq 'attribute-change flags) '(attribute-changed)))
+ '(created changed changes-done-hint moved deleted unmounted))
+ ((memq 'attribute-change flags) '(attribute-changed unmounted)))
sequence `(,command "monitor" ,localname)))
;; None.
(t (tramp-error
&& !NILP (Fmember (symbol, list5 (Qchanged, Qchanges_done_hint,
Qdeleted, Qcreated, Qmoved))))
|| (!NILP (Fmember (Qattribute_change, flags))
- && EQ (symbol, Qattribute_changed)))
+ && EQ (symbol, Qattribute_changed))
+ || (!NILP (Fmember (Qwatch_mounts, flags))
+ && EQ (symbol, Qunmounted)))
{
/* Construct an event. */
EVENT_INIT (event);
/* XD_DEBUG_MESSAGE ("%s", XD_OBJECT_TO_STRING (event.arg)); */
}
- /* Cancel monitor if file or directory is deleted. */
- if (!NILP (Fmember (symbol, list2 (Qdeleted, Qmoved)))
+ /* Cancel monitor if file or directory is deleted or unmounted. */
+ if (!NILP (Fmember (symbol, list3 (Qdeleted, Qmoved, Qunmounted)))
&& strcmp (name, SSDATA (XCAR (XCDR (watch_object)))) == 0
&& !g_file_monitor_is_cancelled (monitor))
g_file_monitor_cancel (monitor);
else if (EQ (symb, Qonlydir))
return IN_ONLYDIR;
+ else if (EQ (symb, Qignored))
+ return IN_IGNORED;
+ else if (EQ (symb, Qunmount))
+ return IN_UNMOUNT;
+
else if (EQ (symb, Qt) || EQ (symb, Qall_events))
return IN_ALL_EVENTS;
else
directory is monitored. */
if (kev.fflags & NOTE_RENAME)
actions = Fcons (Qrename, actions);
+ if (kev.fflags & NOTE_REVOKE)
+ actions = Fcons (Qrevoke, actions);
/* Create the event. */
if (! NILP (actions))
kqueue_generate_event (watch_object, actions, file, Qnil);
- /* Cancel monitor if file or directory is deleted or renamed. */
- if (kev.fflags & (NOTE_DELETE | NOTE_RENAME))
+ /* Cancel monitor if file or directory is deleted or renamed or
+ the file system is unmounted. */
+ if (kev.fflags & (NOTE_DELETE | NOTE_RENAME | NOTE_REVOKE))
Fkqueue_rm_watch (descriptor);
}
return;
`attrib' -- a FILE attribute was changed
`link' -- a FILE's link count was changed
`rename' -- FILE was moved to FILE1
+ `revoke' -- FILE was unmounted
When any event happens, Emacs will call the CALLBACK function passing
it a single argument EVENT, which is of the form
if (! NILP (Fmember (Qattrib, flags))) fflags |= NOTE_ATTRIB;
if (! NILP (Fmember (Qlink, flags))) fflags |= NOTE_LINK;
if (! NILP (Fmember (Qrename, flags))) fflags |= NOTE_RENAME;
+ if (! NILP (Fmember (Qrevoke, flags))) fflags |= NOTE_REVOKE;
/* Register event. */
EV_SET (&kev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR,
DEFSYM (Qattrib, "attrib"); /* NOTE_ATTRIB */
DEFSYM (Qlink, "link"); /* NOTE_LINK */
DEFSYM (Qrename, "rename"); /* NOTE_RENAME */
+ DEFSYM (Qrevoke, "revoke"); /* NOTE_REVOKE */
staticpro (&watch_list);