1. 18 Jun, 2020 1 commit
    • Basil L. Contovounesios's avatar
      Fix and extend format-spec (bug#41758) · 0185d76e
      Basil L. Contovounesios authored
      * lisp/format-spec.el: Use lexical-binding.  Remove dependence on
      (format-spec-make): Clarify docstring.
      (format-spec--parse-modifiers): Rename to...
      (format-spec--parse-flags): ...this and simplify.  In particular,
      don't bother parsing :space-pad which is redundant and unused.
      (format-spec--pad): Remove, replacing with...
      (format-spec--do-flags): ...this new helper function which performs
      more of format-spec's supported text manipulation.
      (format-spec): Autoload.  Allow optional argument to take on special
      values 'ignore' and 'delete' for more control over what happens when
      a replacement for a format specification isn't provided.  Bring back
      proper support for a precision modifier similar to that of 'format'.
      * lisp/battery.el (battery-format): Rewrite in terms of format-spec.
      (battery-echo-area-format, battery-mode-line-format): Mention
      support of format-spec syntax in docstrings.
      * doc/lispref/strings.texi (Custom Format Strings):
      * etc/NEWS: Document and announce these changes.
      * lisp/dired-aux.el (dired-do-compress-to):
      * lisp/erc/erc-match.el (erc-log-matches):
      * lisp/erc/erc.el (erc-update-mode-line-buffer):
      * lisp/gnus/gnus-sieve.el (gnus-sieve-update):
      * lisp/gnus/gssapi.el (open-gssapi-stream):
      * lisp/gnus/mail-source.el (mail-source-fetch-file)
      (mail-source-fetch-directory, mail-source-fetch-pop)
      * lisp/gnus/message.el (message-insert-formatted-citation-line):
      * lisp/image-dired.el:
      * lisp/net/eww.el:
      * lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open)
      * lisp/net/network-stream.el (network-stream-open-shell):
      * lisp/obsolete/tls.el (open-tls-stream):
      * lisp/textmodes/tex-mode.el:
      Remove extraneous loads and autoloads of format-spec now that it is
      autoloaded and simplify its uses where possible.
      * test/lisp/battery-tests.el (battery-format): Test new format-spec
      * test/lisp/format-spec-tests.el (test-format-spec): Rename to...
      (format-spec) ...this, extending test cases.
      (test-format-unknown): Rename to...
      (format-spec-unknown): ...this, extending test cases.
      (test-format-modifiers): Rename to...
      (format-spec-flags): ...this.
      (format-spec-make, format-spec-parse-flags, format-spec-do-flags)
      (format-spec-do-flags-truncate, format-spec-do-flags-pad)
      (format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
  2. 16 Jun, 2020 1 commit
  3. 15 May, 2020 1 commit
  4. 29 Mar, 2020 1 commit
    • Juri Linkov's avatar
      Support state changing VC operations on directories in Dired (bug#34949) · 7a6f5a51
      Juri Linkov authored
      * lisp/dired-aux.el (dired-vc-next-action): New command.
      (dired-vc-deduce-fileset): Rename from vc-dired-deduce-fileset in vc.el.
      * lisp/dired.el (dired-mode-map): Remap vc-next-action to
      * lisp/vc/vc-dir.el (vc-dir-mark-files): New function.
      (vc-dir-refresh): Run hook vc-dir-refresh-hook.
      * lisp/vc/vc.el (vc-deduce-fileset): Rename arg 'observer' to
      'not-state-changing' and document it in docstring.
      (vc-dired-deduce-fileset): Rename to dired-vc-deduce-fileset in dired-aux.el.
      * lisp/cedet/ede.el (ede-turn-on-hook, ede-minor-mode):
      * lisp/desktop.el (desktop-minor-mode-table): Rename the long ago
      obsolete vc-dired-mode to vc-dir-mode.
  5. 23 Mar, 2020 1 commit
    • Juri Linkov's avatar
      * lisp/dired.el (dired-mark-region): New defcustom (bug#39902) · 3b7cb5f3
      Juri Linkov authored
      * lisp/dired.el (dired-mark-if): Use dired-mark-region.
      (dired-mark): Use dired-mark-region.  Fix docstring.
      (dired-mark-files-regexp, dired-mark-files-containing-regexp)
      (dired-mark-symlinks, dired-mark-directories)
      (dired-mark-executables, dired-flag-auto-save-files)
      (dired-flag-backup-files): Mention dired-mark-region in docstring.
      * lisp/dired-aux.el (dired-compare-directories):
      * lisp/dired-x.el (dired-mark-unmarked-files, dired-mark-sexp):
      Mention dired-mark-region in docstring.
  6. 24 Feb, 2020 1 commit
    • Paul Eggert's avatar
      Add 'nofollow' flag to set-file-modes etc. · 9d626dff
      Paul Eggert authored
      This avoids some race conditions (Bug#39683).  E.g., if some other
      program changes a file to a symlink between the time Emacs creates
      the file and the time it changes the file’s permissions, using the
      new flag prevents Emacs from inadvertently changing the
      permissions of a victim in some completely unrelated directory.
      * admin/merge-gnulib (GNULIB_MODULES): Add fchmodat.
      * doc/lispref/files.texi (Testing Accessibility, Changing Files):
      * doc/lispref/os.texi (File Notifications):
      * etc/NEWS:
      Adjust documentation accordingly.
      * lib/chmodat.c, lib/fchmodat.c, lib/lchmod.c, m4/fchmodat.m4:
      * m4/lchmod.m4: New files, copied from Gnulib.
      * lib/gnulib.mk.in: Regenerate.
      * lisp/dired-aux.el (dired-do-chmod):
      * lisp/doc-view.el (doc-view-make-safe-dir):
      * lisp/emacs-lisp/autoload.el (autoload--save-buffer):
      * lisp/emacs-lisp/bytecomp.el (byte-compile-file):
      * lisp/eshell/em-pred.el (eshell-pred-file-mode):
      * lisp/files.el (backup-buffer-copy, copy-directory):
      * lisp/gnus/mail-source.el (mail-source-movemail):
      * lisp/gnus/mm-decode.el (mm-display-external):
      * lisp/gnus/nnmail.el (nnmail-write-region):
      * lisp/net/tramp-adb.el (tramp-adb-handle-file-local-copy)
      * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-directly):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-write-region):
      * lisp/net/tramp.el (tramp-handle-write-region)
      * lisp/server.el (server-ensure-safe-dir):
      * lisp/url/url-util.el (url-make-private-file):
      When getting or setting file modes, avoid following symbolic links
      when the file is not supposed to be a symbolic link.
      * lisp/doc-view.el (doc-view-make-safe-dir):
      Omit no-longer-needed separate symlink test.
      * lisp/gnus/gnus-util.el (gnus-set-file-modes):
      * lisp/net/tramp.el (tramp-handle-file-modes):
      * lisp/net/tramp-gvfs.el (tramp-gvfs-handle-set-file-modes):
      * src/fileio.c (symlink_nofollow_flag): New function.
      (Ffile_modes, Fset_file_modes):
      Support an optional FLAG arg.  All C callers changed.
      * lisp/net/ange-ftp.el (ange-ftp-set-file-modes):
      * lisp/net/tramp-adb.el (tramp-adb-handle-set-file-modes):
      * lisp/net/tramp-sh.el (tramp-sh-handle-set-file-modes):
      * lisp/net/tramp-smb.el (tramp-smb-handle-set-file-modes):
      * lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-set-file-modes):
      Accept an optional FLAG arg that is currently ignored,
      and add a FIXME comment for it.
      * m4/gnulib-comp.m4: Regenerate.
  7. 08 Jan, 2020 1 commit
    • Eli Zaretskii's avatar
      Fix compression of directories in Dired · 6cd9ccb0
      Eli Zaretskii authored
      This fixes comporession and uncompression of directories on
      MS-Windows, but also on other systems.  The original code used
      ":" as the REGEXP of the directory entry in
      dired-compress-file-suffixes, which on Windows always matched any
      absolute file name, and can also match unusual file names on Posix
      hosts.  This false match would cause dired-compress-file to act as
      if we are decompressing a directory, but use a command suitable
      for compression, which would fail in interesting ways.
      We now use a REGEXP that can never match any valid file name.
      * lisp/dired-aux.el (dired-compress-file-suffixes): Make the
      "compress directory" entry's REGEXP really fail to match any valid
      file name.
      (dired-compress-file): Adapt to the change in
      dired-compress-file-suffixes.  (Bug#39024)
      (dired-compress): If the current file is a directory, or if the
      uncompressed file is a directory, don't remove the original from
      the listing, since it is left in the filesystem.
  8. 01 Jan, 2020 1 commit
  9. 29 Dec, 2019 1 commit
  10. 26 Dec, 2019 1 commit
    • Dmitry Gutov's avatar
      Speed up dired-do-find-regexp · ccd7cd2c
      Dmitry Gutov authored
      * lisp/dired-aux.el (dired-do-find-regexp): Speed up (bug#36857).
      Previously, 'find' was called for every marked file (for plain
      files and directories both).  Now 'find' is only called for
  11. 28 Nov, 2019 1 commit
    • Filipp Gunbin's avatar
      Do not call custom-reevaluate-setting in dired-isearch-filenames-end · 98f8c5fb
      Filipp Gunbin authored
        * lisp/dired-aux.el (dired-isearch-filenames-end)
        (dired-isearch-filenames, dired-isearch-filenames-regexp): Use
        temporary local variable for dired-isearch-filenames instead of
        custom-reevaluate-setting (Bug#30187).  Without this fix, the value
        set in .emacs with plain setq would be lost after one isearch.
  12. 16 Nov, 2019 1 commit
  13. 14 Nov, 2019 1 commit
  14. 12 Nov, 2019 1 commit
    • Juri Linkov's avatar
      * lisp/dired.el (dired-dwim-target): Add new choices (bug#35385) · d0351f4d
      Juri Linkov authored
      * lisp/dired.el (dired-dwim-target): Add choices
      dired-dwim-target-next and dired-dwim-target-recent.
      * lisp/dired-aux.el (dired-dwim-target-next)
      (dired-dwim-target-recent): New functions.
      (dired-dwim-target-directories): Call either of them.
      * doc/emacs/dired.texi (Operating on Files): Mention new
      preferences in dired-dwim-target.
  15. 10 Nov, 2019 1 commit
    • Stefan Kangas's avatar
      Make dired-get-subdir-min obsolete · 0154e41b
      Stefan Kangas authored
      * lisp/dired.el (dired-get-subdir-min): Redefine as obsolete function
      alias for 'cdr'.  (Bug#11571)
      (dired-get-subdir, dired-get-subdir-max, dired-clear-alist)
      (dired-next-subdir, dired-current-directory):
      * lisp/dired-aux.el (dired-rename-subdir-2)
      (dired-alist-sort, dired-insert-subdir-del)
      (dired-insert-subdir-doupdate, dired-goto-subdir)
      (dired-hide-subdir, dired-hide-all): Use 'cdr' instead of
      the above obsolete function.
      (dired-subdir-alist): Doc fix.
      Co-authored-by: default avatarDrew Adams <drew.adams@oracle.com>
  16. 06 Nov, 2019 1 commit
  17. 26 Oct, 2019 1 commit
    • Juri Linkov's avatar
      dired-dwim-target uses most recently visited window instead of next window. · c6667cc6
      Juri Linkov authored
      * doc/emacs/dired.texi (Operating on Files): Document behavior change.
      * lisp/dired-aux.el (dired-dwim-target-directories): New function.
      (dired-dwim-target-directory, dired-dwim-target-defaults): Use it
      to get the most recently used window instead of the next window (bug#35385).
      * lisp/dired.el (dired-dwim-target): Doc fix.
      * test/lisp/dired-tests.el: Remove unnecessary require and pacify
  18. 14 Oct, 2019 2 commits
  19. 23 Sep, 2019 1 commit
  20. 23 Aug, 2019 1 commit
  21. 02 Aug, 2019 1 commit
  22. 01 Aug, 2019 1 commit
  23. 26 Jul, 2019 3 commits
  24. 13 Jul, 2019 1 commit
    • Tino Calancha's avatar
      End predicate `dired-in-this-tree' with '-p' · 4b73c0cd
      Tino Calancha authored
      * lisp/dired.el(dired-in-this-tree-p): Rename from `dired-in-this-tree'.
      Add docstring.
      (dired-in-this-tree): Define an alias to `dired-in-this-tree-p'.
      * lisp/dired-aux.el (dired-tree-down, dired-kill-tree)
      (dired-insert-subdir, dired-rename-subdir): Update all callers (bug#32892).
  25. 08 Jul, 2019 1 commit
  26. 24 Jun, 2019 1 commit
    • Alexander Gramiak's avatar
      Add Zstandard compression support for dired · c32cc627
      Alexander Gramiak authored
      * lisp/dired-aux.el (dired-compress-file-suffixes): Add suffixes for
      zstd compressed tarballs and other files.
      (dired-compress-file): Treat options found in
      `dired-compress-file-suffixes' as arguments instead of part of the
      program name.
  27. 21 Jun, 2019 1 commit
    • Stefan Monnier's avatar
      * lisp/emacs-lisp/bytecomp.el (byte-compile-dynamic): Mark obsolete · 436ccc69
      Stefan Monnier authored
      See bug#11649 for an example problem, and emacs-devel discussion
      «Prickliness of the "invalid byte code" stuff».
      * lisp/wid-edit.el, lisp/wdired.el, lisp/vc/pcvs-util.el:
      * lisp/progmodes/executable.el, lisp/mail/sendmail.el:
      * lisp/emacs-lisp/cl-seq.el, lisp/emacs-lisp/cl-macs.el:
      * lisp/emacs-lisp/cl-lib.el, lisp/emacs-lisp/cl-extra.el:
      * lisp/dired-x.el, lisp/dired-aux.el, lisp/calendar/calendar.el:
      Don't use byte-compile-dynamic any more.
  28. 30 May, 2019 1 commit
  29. 25 May, 2019 1 commit
    • Paul Eggert's avatar
      Go back to "Maintainer: emacs-devel@gnu.org" · f744797a
      Paul Eggert authored
      Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
      no special maintainer for a file.  Although this wasn't documented
      it was common practice and removing the lines didn't have consensus.
  30. 24 May, 2019 1 commit
    • Dmitry Gutov's avatar
      Support "reverting" Xref buffers (bug#35702) · 62349fe8
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref--fetcher): New variable.
      (xref--xref-buffer-mode-map): Add binding for 'g'.
      (xref--revert-xref-buffer): New command.
      (xref--show-xref-buffer): Accept a function as the first argument.
      (xref--show-xrefs): Same.
      (xref--find-xrefs): Pass the above a fetcher function.
      * lisp/progmodes/project.el (project-find-regexp)
      (project-or-external-find-regexp): Same.
      * lisp/dired-aux.el (dired-do-find-regexp): Same.
  31. 22 May, 2019 1 commit
    • Dmitry Gutov's avatar
      Separate xref-find-definitions' behavior from other commands · 49a363c8
      Dmitry Gutov authored
      * lisp/progmodes/xref.el (xref-show-definitions-function):
      New variable.
      (xref--show-defs): Split off from xref--show-xrefs.
      (xref--find-definitions): Use it.
      (xref--not-found-error): New function.
      (xref--show-xrefs): Simplify.  Show the list buffer even when
      there is just one item in the list.  Remove the last argument.
      * lisp/dired-aux.el (dired-do-find-regexp): Update accordingly.
  32. 20 May, 2019 1 commit
  33. 17 May, 2019 1 commit
  34. 05 May, 2019 1 commit
    • Juri Linkov's avatar
      Use ngettext instead of dired-plural-s in Dired (bug#35287) · 7bba702e
      Juri Linkov authored
      * lisp/dired-aux.el (dired-map-over-marks-check): Use ngettext
      instead of dired-plural-s.
      (dired-create-files): Also add colon after operation name.
      (dired-compare-directories): Use ngettext and format-message.
      (dired-do-compress-to): Use ngettext.
      * lisp/dired.el (dired-internal-do-deletions)
      (dired-clean-up-after-deletion): Use ngettext instead of dired-plural-s.
  35. 17 Mar, 2019 1 commit
    • Stefan Monnier's avatar
      Dired: Use invisibility-spec instead of selective-display · 5055e14d
      Stefan Monnier authored
      * lisp/dired.el (dired-subdir-regexp): No need to pay attention to \r.
      (dired-remember-hidden): Use pcase-dolist and dired--hidden-p.
      (dired-mode): Set invisibility-spec instead of selective-display.
      (dired--hidden-p, dired--hide, dired--unhide, dired--find-hidden-pos):
      New functions.
      (dired-move-to-end-of-filename): Use dired--hidden-p.
      (dired-next-subdir): No need to pay attention to \r.
      (dired-fun-in-all-buffers): Use push.
      * lisp/dired-aux.el (dired-unhide-subdir, dired-hide-subdir, dired-hide-all):
      Use the new functions and with-silent-modifications.
      (dired-add-entry): Use dired--hidden-p.
      (dired-goto-subdir): No need to pay attention to \r.
      (dired-hide-check): Remove.
      (dired-subdir-hidden-p): Use dired--hidden-p.
      (dired-do-find-regexp): Use file-name-as-directory.
  36. 07 Feb, 2019 1 commit
  37. 01 Jan, 2019 1 commit