1. 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.
      6cd9ccb0
  2. 01 Jan, 2020 1 commit
  3. 29 Dec, 2019 1 commit
  4. 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
      directories.
      ccd7cd2c
  5. 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.
      98f8c5fb
  6. 16 Nov, 2019 1 commit
  7. 14 Nov, 2019 1 commit
  8. 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.
      d0351f4d
  9. 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>
      0154e41b
  10. 06 Nov, 2019 1 commit
  11. 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
      byte-compiler.
      c6667cc6
  12. 14 Oct, 2019 2 commits
  13. 23 Sep, 2019 1 commit
  14. 23 Aug, 2019 1 commit
  15. 02 Aug, 2019 1 commit
  16. 01 Aug, 2019 1 commit
  17. 26 Jul, 2019 3 commits
  18. 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'.
      
      (dired-buffers-for-dir)
      * lisp/dired-aux.el (dired-tree-down, dired-kill-tree)
      (dired-insert-subdir, dired-rename-subdir): Update all callers (bug#32892).
      4b73c0cd
  19. 08 Jul, 2019 1 commit
  20. 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.
      c32cc627
  21. 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.
      436ccc69
  22. 30 May, 2019 1 commit
  23. 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.
      f744797a
  24. 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.
      62349fe8
  25. 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.
      49a363c8
  26. 20 May, 2019 1 commit
  27. 17 May, 2019 1 commit
  28. 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.
      7bba702e
  29. 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.
      5055e14d
  30. 07 Feb, 2019 1 commit
  31. 01 Jan, 2019 1 commit
  32. 22 Nov, 2018 1 commit
  33. 20 Oct, 2018 1 commit
    • Michael Heerdegen's avatar
      Fix help-form binding in dired-create-files · 1531bca5
      Michael Heerdegen authored
      This fixes Bug#32630: since "dired-aux" moved to lexical binding mode,
      the free variable TO in the constructed HELP-FORM got out of scope of
      the surrounding 'let'.
      
      * lisp/dired-aux.el (dired-create-files): Make the binding of
      HELP-FORM a string.
      1531bca5
  34. 11 Oct, 2018 1 commit
  35. 24 Sep, 2018 1 commit
    • Paul Eggert's avatar
      file-attributes cleanup · 662bee7d
      Paul Eggert authored
      Mostly, this replaces magic-number calls like (nth 4 A) with
      more-informative calls like (file-attribute-access-time A).
      It also fixes some documentation and minor timestamp coding
      issues that I noticed while looking into this.
      * doc/lispref/files.texi (File Attributes):
      * lisp/files.el (file-attribute-size)
      (file-attribute-inode-number, file-attribute-device-number):
      * src/dired.c (Fdirectory_files_and_attributes)
      (Ffile_attributes):
      Mention which attributes must be integers, or nonnegative integers,
      as opposed to merely being numbers.  Remove no-longer-correct
      talk about representing large integers as conses of integers.
      * doc/lispref/files.texi (Magic File Names):
      * doc/misc/gnus.texi (Low-level interface to the spam-stat dictionary):
      * lisp/autorevert.el (auto-revert-find-file-function)
      (auto-revert-tail-mode, auto-revert-handler):
      * lisp/auth-source.el (auth-source-netrc-parse):
      * lisp/cedet/ede/files.el (ede--inode-for-dir):
      * lisp/cedet/semantic/db-file.el (object-write):
      * lisp/cedet/semantic/db-mode.el (semanticdb-kill-hook):
      * lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p)
      (semanticdb-synchronize):
      * lisp/cedet/srecode/table.el (srecode-mode-table-new):
      * lisp/desktop.el (desktop-save, desktop-read):
      * lisp/dired-aux.el (dired-file-set-difference)
      (dired-do-chxxx, dired-do-chmod, dired-copy-file-recursive)
      (dired-create-files):
      * lisp/dired.el (dired-directory-changed-p, dired-readin):
      * lisp/dos-w32.el (w32-direct-print-region-helper):
      * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads)
      (autoload-find-destination, update-directory-autoloads):
      * lisp/emacs-lisp/shadow.el (load-path-shadows-same-file-or-nonexistent):
      * lisp/epg.el (epg--start, epg-wait-for-completion):
      * lisp/eshell/em-ls.el (eshell-ls-filetype-p)
      (eshell-ls-applicable, eshell-ls-size-string)
      (eshell-ls-file, eshell-ls-dir, eshell-ls-files)
      (eshell-ls-entries):
      * lisp/eshell/em-pred.el (eshell-predicate-alist)
      (eshell-pred-file-type, eshell-pred-file-links)
      (eshell-pred-file-size):
      * lisp/eshell/em-unix.el (eshell-shuffle-files, eshell/cat)
      (eshell-du-sum-directory, eshell/du):
      * lisp/eshell/esh-util.el (eshell-read-passwd)
      (eshell-read-hosts):
      * lisp/files.el (remote-file-name-inhibit-cache)
      (find-file-noselect, insert-file-1, dir-locals-find-file)
      (dir-locals-read-from-dir, backup-buffer)
      (file-ownership-preserved-p, copy-directory)
      (read-file-modes):
      * lisp/find-lisp.el (find-lisp-format):
      * lisp/gnus/gnus-agent.el (gnus-agent-unfetch-articles)
      (gnus-agent-read-agentview, gnus-agent-expire-group-1)
      (gnus-agent-request-article, gnus-agent-regenerate-group)
      (gnus-agent-update-files-total-fetched-for)
      (gnus-agent-update-view-total-fetched-for):
      * lisp/gnus/gnus-cache.el (gnus-cache-read-active)
      (gnus-cache-update-file-total-fetched-for)
      (gnus-cache-update-overview-total-fetched-for):
      * lisp/gnus/gnus-cloud.el (gnus-cloud-file-new-p):
      * lisp/gnus/gnus-score.el (gnus-score-score-files):
      * lisp/gnus/gnus-start.el (gnus-save-newsrc-file)
      (gnus-master-read-slave-newsrc):
      * lisp/gnus/gnus-sum.el (gnus-summary-import-article):
      * lisp/gnus/gnus-util.el (gnus-file-newer-than)
      (gnus-cache-file-contents):
      * lisp/gnus/mail-source.el (mail-source-delete-old-incoming)
      (mail-source-callback, mail-source-movemail):
      * lisp/gnus/nneething.el (nneething-create-mapping)
      (nneething-make-head):
      * lisp/gnus/nnfolder.el (nnfolder-read-folder):
      * lisp/gnus/nnheader.el (nnheader-file-size)
      (nnheader-insert-nov-file):
      * lisp/gnus/nnmail.el (nnmail-activate):
      * lisp/gnus/nnmaildir.el (nnmaildir--group-maxnum)
      (nnmaildir--new-number, nnmaildir--update-nov)
      (nnmaildir--scan, nnmaildir-request-scan)
      (nnmaildir-request-update-info)
      (nnmaildir-request-expire-articles):
      * lisp/gnus/nnmh.el (nnmh-request-list-1)
      (nnmh-request-expire-articles, nnmh-update-gnus-unreads):
      * lisp/gnus/nnml.el (nnml-request-expire-articles):
      * lisp/gnus/spam-stat.el (spam-stat-save, spam-stat-load)
      (spam-stat-process-directory, spam-stat-test-directory):
      * lisp/ido.el (ido-directory-too-big-p)
      (ido-file-name-all-completions):
      * lisp/image-dired.el (image-dired-get-thumbnail-image)
      (image-dired-create-thumb-1):
      * lisp/info.el (info-insert-file-contents):
      * lisp/ls-lisp.el (ls-lisp-insert-directory)
      (ls-lisp-handle-switches, ls-lisp-classify-file)
      (ls-lisp-format):
      * lisp/mail/blessmail.el:
      * lisp/mail/feedmail.el (feedmail-default-date-generator)
      (feedmail-default-message-id-generator):
      * lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases)
      (mail-abbrevs-setup):
      * lisp/mail/mspools.el (mspools-size-folder):
      * lisp/mail/rmail.el (rmail-insert-inbox-text):
      * lisp/mail/sendmail.el (sendmail-sync-aliases):
      * lisp/mh-e/mh-alias.el (mh-alias-tstamp):
      * lisp/net/ange-ftp.el (ange-ftp-parse-netrc)
      (ange-ftp-write-region, ange-ftp-file-newer-than-file-p)
      (ange-ftp-cf1):
      * lisp/net/eudcb-mab.el (eudc-mab-query-internal):
      * lisp/net/eww.el (eww-read-bookmarks):
      * lisp/net/netrc.el (netrc-parse):
      * lisp/net/newst-backend.el (newsticker--image-get):
      * lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
      * lisp/obsolete/fast-lock.el (fast-lock-save-cache):
      * lisp/obsolete/vc-arch.el (vc-arch-state)
      (vc-arch-diff3-rej-p):
      * lisp/org/ob-eval.el (org-babel--shell-command-on-region):
      * lisp/org/org-attach.el (org-attach-commit):
      * lisp/org/org-macro.el (org-macro-initialize-templates):
      * lisp/org/org.el (org-babel-load-file)
      (org-file-newer-than-p):
      * lisp/org/ox-html.el (org-html-format-spec):
      * lisp/org/ox-publish.el (org-publish-find-date)
      (org-publish-cache-ctime-of-src):
      * lisp/pcmpl-gnu.el (pcomplete/tar):
      * lisp/pcmpl-rpm.el (pcmpl-rpm-packages):
      * lisp/play/cookie1.el (cookie-snarf):
      * lisp/progmodes/cmacexp.el (c-macro-expansion):
      * lisp/ps-bdf.el (bdf-file-mod-time):
      * lisp/server.el (server-ensure-safe-dir):
      * lisp/simple.el (shell-command-on-region):
      * lisp/speedbar.el (speedbar-item-info-file-helper)
      (speedbar-check-obj-this-line):
      * lisp/thumbs.el (thumbs-cleanup-thumbsdir):
      * lisp/time.el (display-time-mail-check-directory)
      (display-time-file-nonempty-p):
      * lisp/url/url-cache.el (url-is-cached):
      * lisp/url/url-file.el (url-file-asynch-callback):
      * lisp/vc/diff-mode.el (diff-delete-if-empty):
      * lisp/vc/pcvs-info.el (cvs-fileinfo-from-entries):
      * lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
      * lisp/vc/vc-cvs.el (vc-cvs-checkout-model)
      (vc-cvs-state-heuristic, vc-cvs-merge-news)
      (vc-cvs-retrieve-tag, vc-cvs-parse-status, vc-cvs-parse-entry):
      * lisp/vc/vc-hg.el (vc-hg--slurp-hgignore-1)
      (vc-hg--ignore-patterns-valid-p)
      (vc-hg--cached-dirstate-search, vc-hg-state-fast):
      * lisp/vc/vc-hooks.el (vc-after-save):
      * lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
      * lisp/vc/vc-svn.el (vc-svn-merge-news, vc-svn-parse-status):
      * lisp/vc/vc.el (vc-checkout, vc-checkin, vc-revert-file):
      * lisp/xdg.el (xdg-mime-apps):
      Prefer (file-attribute-size A) to (nth 7 A), and similarly
      for other file attributes accessors.
      * doc/lispref/files.texi (File Attributes):
      * doc/lispref/intro.texi (Version Info):
      * doc/lispref/os.texi (Idle Timers):
      * lisp/erc/erc.el (erc-string-to-emacs-time):
      * lisp/files.el (file-attribute-access-time)
      (file-attribute-modification-time)
      (file-attribute-status-change-time):
      * lisp/net/tramp-compat.el:
      (tramp-compat-file-attribute-modification-time)
      (tramp-compat-file-attribute-size):
      * src/buffer.c (syms_of_buffer):
      * src/editfns.c (Fget_internal_run_time):
      * src/fileio.c (Fvisited_file_modtime)
      (Fset_visited_file_modtime):
      * src/keyboard.c (Fcurrent_idle_time):
      * src/process.c (Fprocess_attributes):
      Defer implementation details about timestamp format to the
      section that talks about timestamp format, to make it easier
      to change the documentation later if timestamp formats are
      extended.
      * lisp/gnus/gnus-util.el (gnus-file-newer-than):
      * lisp/speedbar.el (speedbar-check-obj-this-line):
      * lisp/vc/vc-rcs.el (vc-rcs-workfile-is-newer):
      Prefer time-less-p to doing it by hand.
      * lisp/ls-lisp.el (ls-lisp-format): Inode numbers are no longer conses.
      * lisp/vc/vc-bzr.el (vc-bzr-state-heuristic):
      Use eql, not eq, to compare integers that might be bignums.
      * lisp/org/ox-publish.el (org-publish-cache-ctime-of-src):
      Prefer float-time to doing time arithmetic by hand.
      662bee7d
  36. 22 Sep, 2018 1 commit
    • Stefan Monnier's avatar
      * lisp/multifile.el: New file, extracted from etags.el · 55ec674f
      Stefan Monnier authored
      The main motivation for this change was the introduction of
      project-query-replace.  dired's multi-file query&replace was implemented
      on top of etags.el even though it did not use TAGS in any way, so I moved
      this generic multifile code into its own package, with a nicer interface,
      and then used that in project.el.
      
      * lisp/progmodes/project.el (project-files): New generic function.
      (project-search, project-query-replace): New commands.
      
      * lisp/dired-aux.el (dired-do-search, dired-do-query-replace-regexp):
      Use multifile.el instead of etags.el.
      
      * lisp/progmodes/etags.el: Remove redundant :groups.
      (next-file-list): Remove var.
      (tags-loop-revert-buffers): Make it an obsolete alias.
      (next-file): Don't autoload (it can't do anything useful before some
      other etags.el function setup the multifile operation).
      (tags--all-files): New function, extracted from next-file.
      (tags-next-file): Rename from next-file.
      Rewrite using tags--all-files and multifile-next-file.
      (next-file): Keep it as an obsolete alias.
      (tags-loop-operate, tags-loop-scan): Mark as obsolete.
      (tags--compat-files, tags--compat-initialize): New function.
      (tags-loop-continue): Rewrite using multifile-continue.  Mark as obsolete.
      (tags--last-search-operate-function): New var.
      (tags-search, tags-query-replace): Rewrite using multifile.el.
      
      * lisp/emacs-lisp/generator.el (iter-end-of-sequence): Use 'define-error'.
      (iter-make): New macro.
      (iter-empty): New iterator.
      
      * lisp/menu-bar.el (menu-bar-search-menu, menu-bar-replace-menu):
      tags-loop-continue -> multifile-continue.
      55ec674f
  37. 02 Aug, 2018 1 commit
    • Tino Calancha's avatar
      New commands to create an empty file · e65ec81f
      Tino Calancha authored
      Similarly as `create-directory', `dired-create-directory',
      the new commands create the parent dirs as needed (Bug#24150).
      * lisp/files.el (make-empty-file): New command.
      
      * lisp/dired-aux.el (dired-create-empty-file): New command.
      (dired--find-topmost-parent-dir): New function extracted
      from `dired-create-directory'.
      (dired-create-directory, dired-create-empty-file): Use it.
      
      * lisp/dired.el (dired-mode-map):
      Add menu entry for `dired-create-empty-file'.
      
      * doc/emacs/dired.texi (Misc Dired Features)
      * doc/lispref/files.texi (Create/Delete Dirs): Update manual.
      ; * etc/NEWS: Announce the changes.
      e65ec81f