summaryrefslogtreecommitdiff
path: root/lisp/wdired.el
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
|
* A better fix for "Fix cancellation of Wdired"Michael Heerdegen2023-05-281-3/+2
| | | | | | * lisp/wdired.el (wdired-abort-changes): Call `dired-build-subdir-alist' instead of `dired-revert'. (Bug#63676)
* Fix cancellation of WdiredEli Zaretskii2023-05-261-0/+3
| | | | | * lisp/wdired.el (wdired-abort-changes): Call 'dired-revert'. Patch by Stephen Berman <stephen.berman@gmx.net>. (Bug#63676)
* Restore invisibility of symlink target on exiting wdired-modeStephen Berman2023-02-241-0/+1
| | | | | | | * lisp/wdired.el (wdired-change-to-dired-mode): Invoke dired-hide-details-update-invisibility-spec (bug#61510). * test/lisp/wdired-tests.el (wdired-test-bug61510): New test.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Make wdired match dired with symlink permissionsPaul Eggert2022-09-101-1/+2
| | | | | * lisp/wdired.el (wdired-do-perm-changes): Do not follow symlinks, to be consistent with plain dired (bug#50189).
* Merge from origin/emacs-28Stefan Kangas2022-08-261-26/+22
|\ | | | | | | | | | | 9e03e29c4e * lisp/wdired.el: Improve "Commentary" section. 92e90297f9 * lisp/wdired.el: Doc fix; don't mention obsolete variable. 2ccefef4c7 * lisp/progmodes/etags.el (next-file): Minor doc fix.
| * * lisp/wdired.el: Improve "Commentary" section.Stefan Kangas2022-08-251-20/+16
| |
| * * lisp/wdired.el: Doc fix; don't mention obsolete variable.Stefan Kangas2022-08-251-7/+7
| |
* | Fix wdired with (dired '(dir f1 f2 ...))Thierry Volpiatto2022-08-231-9/+22
| | | | | | | | | | * lisp/wdired.el (wdired-finish-edit): Fix wdired with (dired '(dir f1 f2 ...)) (bug#57334).
* | Remove duplicate key definitions from keymapsRobert Pluim2022-08-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/gnus/gnus-srvr.el (gnus-browse-mode-map): Remove binding for 'gnus-browse-prev-map'. * lisp/gnus/gnus-sum.el (gnus-summary-mode-map): Remove 'gnus-summary-down-thread' binding, and by symmetry 'gnus-summary-up-thread' (it's still available on "T-u"). * lisp/ibuffer.el (ibuffer-mode-map): Remove binding for 'ibuffer-mark-for-delete'. * lisp/wdired.el (wdired-perm-mode-map): Remove duplicate binding of "s" to 'wdired-set-bit'. * etc/NEWS: Announce 'gnus-summary-up-thread' change.
* | Fix wdired marking of unsuccessfully renamed filesLars Ingebrigtsen2022-06-171-3/+14
| | | | | | | | | | * lisp/wdired.el (wdired-finish-edit): Don't mark non-renamed files as renamed (bug#46438).
* | Add search function to search within filenames in Dired and WDired (bug#14013)Juri Linkov2022-03-281-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/dired-aux.el (dired-isearch-filenames-mode): Use dired-isearch-search-filenames on isearch-search-fun-function instead of dired-isearch-filter-filenames on isearch-filter-predicate. (dired-isearch-filter-filenames): Remove function. (dired-isearch-search-filenames): Add function. * lisp/isearch.el (isearch-message-prefix): Add isearch-search-fun-function to the list of supported advice-functions along with isearch-filter-predicate. * lisp/replace.el (replace-search): Add comment. * lisp/wdired.el (wdired-search-replace-filenames): New defcustom. (wdired-isearch-filter-read-only): Remove function. (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): Add and remove dired-isearch-search-filenames on isearch-search-fun-function instead of wdired-isearch-filter-read-only on isearch-filter-predicate. Also set/unset replace-search-function and replace-re-search-function. Remove and restore isearch-mode-hook with dired-isearch-filenames-setup. The problem is that dired-isearch-filenames-setup adds dired-isearch-filenames-end to isearch-mode-end-hook that removes dired-isearch-search-filenames added to isearch-search-fun-function in wdired-change-to-wdired-mode. Then replace-highlight can't use dired-isearch-search-filenames.
* | Allow using dired-hide-details-mode in wdired buffersLars Ingebrigtsen2022-01-281-0/+1
| | | | | | | | | | | | | | * lisp/dired.el (dired-hide-details-mode): Also work in wdired-mode buffers (bug#45127). * lisp/wdired.el (wdired-mode-map): Add a key binding.
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Use defvar-keymap in wdired.elStefan Kangas2021-12-201-35/+31
|/ | | | | * lisp/wdired.el (wdired-mode-map, wdired-perm-mode-map): Use defvar-keymap.
* ; More minor stylistic fixes found by checkdocStefan Kangas2021-09-221-2/+2
|
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-1/+1
|
* Make wdired work better in narrowed-to buffersLars Ingebrigtsen2021-07-191-59/+63
| | | | | | * lisp/wdired.el (wdired--before-change-fn): (wdired--restore-properties): Widen before doing anything so that we get all the changed bits (bug#49124).
* * lisp/wdired.el (wdired-normalize-filename): Sync withAndreas Schwab2021-05-291-7/+26
| | | | dired-get-filename. (Bug#48659)
* * lisp/wdired.el (wdired--before-change-fn): Wrap body in save-match-data.Juri Linkov2021-04-231-20/+21
| | | | Suggested by Michael Heerdegen <michael_heerdegen@web.de> (bug#14013)
* * lisp/wdired.el (wdired--self-insert): Put symbol property delete-selection.Juri Linkov2021-04-201-0/+2
|
* * lisp/wdired.el (wdired--self-insert): Fix thinkoStefan Monnier2021-03-271-4/+3
|
* * lisp/wdired.el: Fix minor regressions and simplify a bitStefan Monnier2021-03-271-114/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `wdired--current-column` more consistently to avoid mayhem when it doesn't return the same result as `current-column`. (wdired-get-filename): Fix the unprocessed case. (wdired-finish-edit): Don't force processing all the lines. (wdired--col-perm): Remove, redundant with `wdired--perm-beg`. (wdired-change-to-wdired-mode): Don't error in empty directory. (wdired--set-permission-bounds): Set `wdired--perm-beg` when we can't find permissions. Move `wdired--perm-beg` 1 char further (like `wdired--col-perm`). Use `wdired--current-column`. (wdired--point-at-perms-p): Fix when `wdired--perm-beg` is nil. (wdired--self-insert): Lookup the keymap to know command to call. (wdired--before-change-fn): Just use `point` instead of `beg`. Use `with-silent-modifications` here rather than in each of the `wdired--preprocess-*` functions. (wdired--preprocess-files): Presume we're at BOL and within `with-silent-modifications`. Fix application of `read-only`. (wdired-abort-changes): Don't use `with-silent-modifications` since we're really modifying the buffer. (wdired--preprocess-symlinks): Presume we're at BOL and within `with-silent-modifications`. (wdired--preprocess-perms): Presume we're at BOL and within `with-silent-modifications`. (wdired-set-bit): Add `char` argument. Use `wdired--current-column`. Copy previous text properties rather than duplicating the code of `wdired--preprocess-perms`. (wdired-toggle-bit): Delegate to `wdired-set-bit`.
* * lisp/wdired.el: Apply text properties lazilyArthur Miller2021-03-271-92/+128
| | | | | | | | | | | | | | | | | | | | | | | Entering wdired was taking time proportional to the size of the directory, making it inconvenient to quickly enter wdired just to rename one or two files in a large directory. (wdired-mode-map): Rebind `self-insert-command`. (wdired--perm-beg, wdired--perm-end): New vars. (wdired--col-perm, wdired--old-content, wdired--old-point) (wdired--old-marks): Rename vars, using "--" rather than "-". All users updated. (wdired--before-change-fn): New function. (wdired-change-to-wdired-mode): Use it `before-change-functions` instead of eagerly putting the various text properties here. (wdired--set-permission-bounds, wdired--current-column) (wdired--point-at-perms-p, wdired--line-preprocessed-p): New auxiliary functions. (wdired--self-insert): New command. (wdired--preprocess-files, wdired--preprocess-symlinks) (wdired--preprocess-perms): Add "--" to the name. Make it operate only on the current line. Use `with-silent-modifications`. (wdired-abort-changes): Use `with-silent-modifications`.
* * lisp/wdired.el: Fix typo in last change.Stefan Monnier2021-03-231-2/+2
| | | | | | | Reported by Michael Heerdegen <michael_heerdegen@web.de>. (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): The `(local FOO)` form takes an expression, so the var needs to be quoted.
* * lisp/wdired.el: Use lexical-bindingStefan Monnier2021-03-191-50/+42
| | | | | | | | | Remove redundant `:group` args. (wdired-change-to-wdired-mode): Use `add-function` to modify `revert-buffer-function`. (wdired-change-to-dired-mode): Adjust accordingly. (wdired-do-renames): Make sure to bind `dired-backup-overwrite` dynamically.
* Convert some more menus to easy-menu-defineStefan Kangas2021-02-231-14/+9
| | | | | | | | | | | * lisp/tar-mode.el (tar-mode-map): * lisp/textmodes/sgml-mode.el (sgml-mode-map, html-mode-map): * lisp/wdired.el (wdired-mode-map): Move menus from here... * lisp/tar-mode.el (tar-mode-immediate-menu, tar-mode-mark-menu) * lisp/textmodes/sgml-mode.el (sgml-mode-menu, html-mode-menu): * lisp/wdired.el (wdired-mode-menu): ...to here, and convert to easy-menu-define.
* Use `undefined' instead of `ignore' in wdiredLars Ingebrigtsen2021-02-211-3/+3
| | | | | * lisp/wdired.el (wdired-mode-map): Use `undefined' here instead of `ignore' to give the user more feedback.
* * lisp/wdired.el: Minor doc fixes.Stefan Kangas2021-01-281-10/+10
|
* Avoid recommending GoogleStefan Kangas2021-01-281-2/+2
| | | | | | | | | | | * doc/misc/org.texi (Link Abbreviations): * lisp/net/webjump.el (webjump-sample-sites): * lisp/org/ol.el (org-link-shell-confirm-function) (org-link-elisp-confirm-function): * lisp/org/org.el (org-highlight-links): * lisp/wdired.el: Avoid recommending Google. squash! Avoid recommending Google
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix wdired-get-filename when ls -F marks symlinksDaniel Martín2020-12-221-1/+4
| | | | | | | | * lisp/wdired.el (wdired-get-filename): In some systems like BSD or macOS, "ls -F" marks symlinks with a trailing "@". Add logic accounting for this so that wdired-get-filename returns the correct filename. This change also fixes test "wdired-test-bug34915" on macOS and BSD systems (bug#34915).
* Prefer setq-local in dired extensionsStefan Kangas2020-12-091-8/+8
| | | | | | | | * lisp/dired-aux.el (dired-diff, dired-compare-directories) (dired-do-create-files, dired-isearch-filenames): * lisp/dired-x.el (dired-virtual, dired-vm): * lisp/wdired.el (wdired-change-to-wdired-mode) (wdired-change-to-dired-mode, wdired-preprocess-perms):
* Use null-device where appropriateMichael Albinus2020-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/filesets.el (filesets-select-command): * lisp/shell.el (shell-mode): * lisp/term.el (term-exec-1): * lisp/wdired.el (wdired-do-symlink-changes): * lisp/cedet/ede/pmake.el (ede-proj-makefile-create): * lisp/eshell/esh-io.el (eshell-set-output-handle): * lisp/gnus/gnus-fun.el (gnus-grab-cam-x-face): * lisp/gnus/mml2015.el (mml2015-epg-key-image): * lisp/gnus/smime.el (smime-noverify-region): * lisp/org/ob-picolisp.el (org-babel-execute:picolisp): * lisp/org/ob-screen.el (org-babel-prep-session:screen) (org-babel-prep-session:screen): * lisp/play/fortune.el (fortune-quiet-strfile-options): * lisp/progmodes/cperl-mode.el (cperl-pod2man-build-command): * lisp/progmodes/sh-script.el (sh-tmp-file): * lisp/vc/diff-mode.el (diff-add-log-current-defuns) (diff--font-lock-prettify): * lisp/vc/ediff-mult.el (ediff-patch-file-form-meta): * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer) (ediff-fixup-patch-map, ediff-dispatch-file-patching-job): * lisp/vc/vc.el (vc-diff-internal): Use null-device or (null-device), respectively. (Bug#3736)
* wdired: fix error handling of set-file-modesAndreas Schwab2020-10-311-23/+21
| | | | | | | * lisp/wdired.el (wdired-perms-to-number): Return decimal number. (wdired-do-perm-changes): Handle error from set-file-modes. (wdired-finish-edit): Remove `rename' from error message. (Bug#44343)
* Allow killing files with C-k in wdired if -F is usedStephen Berman2020-10-111-32/+72
| | | | | | | | | | * lisp/wdired.el (wdired-change-to-wdired-mode): Add hook to restore properties. (wdired-change-to-wdired-mode): Adjust check for symlinks. (wdired-preprocess-files): Fix parsing when using the -F flag. (wdired-get-filename): Fix parsing of symlinks when using the -F flag. (wdired--restore-properties): Renamed, and restore more properties (bug#18475).
* Fix wdired-do-perm-changes when over TrampTino Calancha2020-10-011-3/+3
| | | | | | * lisp/wdired.el (wdired-do-perm-changes) Use set-file-modes instead of external program (bug#39284). This fixes the problem of passing the wrong argument to the external chmod.
* Fix bug in wdired-get-filenameTino Calancha2020-10-011-1/+1
| | | | | | * lisp/wdired.el (wdired-get-filename): Acknowledge the first argument (bug#39280). * test/lisp/wdired-tests.el (wdired-test-bug39280): Add test.
* wdired-do-renames: Speed up for long Emacs sessionsTino Calancha2020-09-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | `dired-rename-file' calls unconditionally `dired-rename-subdir'. The second function performs performs a loop on all the Emacs buffers; this step is only needed if FILE is a directory (bug#32899). In a long lived Emacs session, this can make a difference when renaming a bunch of files with `wdired'. For instance, in my 40 days old Emacs session, with ~ 700 buffers, this patch increases the speed to rename 2000 files a factor ~ 15. * lisp/dired-aux.el (dired-rename-file): Call `dired-rename-subdir' iif FILE is a directory. Add docstring. (dired-rename-subdir, dired-remove-entry) (dired-remove-file): Add docstring. (dired-remove-entry): Move definition into `dired.el'. * lisp/wdired.el (wdired-do-renames): Use a progress-reporter. * lisp/dired.el (dired-delete-entry): Use `dired-remove-entry'. Add docstring. (dired-buffers-for-dir, dired-fun-in-all-buffers): Change comment into docstring. (dired-fun-in-all-buffers): Prefer `when' and `push' here.
* Mark the end of file names correctly on Macos in wdiredLars Ingebrigtsen2020-08-041-4/+11
| | | | | * lisp/wdired.el (wdired--restore-dired-filename-prop): Fix problem with finding the end of the name on Macos.
* Add "Old-" prefix to "Version" header in some casesStefan Kangas2020-03-211-1/+1
| | | | | | | | | | | | | | | | | These version numbers are historical accidents and not relevant today. Ref: https://lists.gnu.org/r/emacs-devel/2020-03/msg00080.html * lisp/calendar/icalendar.el: * lisp/emacs-lisp/checkdoc.el: * lisp/hippie-exp.el: * lisp/linum.el: * lisp/master.el: * lisp/progmodes/cwarn.el: * lisp/repeat.el: * lisp/ruler-mode.el: * lisp/textmodes/remember.el: * lisp/wdired.el: * lisp/woman.el: Change "Version" header to "Old-Version".
* * lisp/wdired.el (wdired-next-line, wdired-previous-line): Preserve columnStefan Monnier2020-02-181-0/+2
|
* * lisp/wdired.el: Clean out isearch-filter-predicate (bug#37496)Juri Linkov2020-01-281-0/+2
| | | | | | * lisp/wdired.el (wdired-change-to-dired-mode): Use remove-function to remove wdired-isearch-filter-read-only (whose value was added in wdired-change-to-wdired-mode) from local value of isearch-filter-predicate.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Prevent infinite loop on entering wdired-modeStephen Berman2019-07-161-2/+1
| | | | | | | * lisp/wdired.el (wdired-preprocess-symlinks): Remove unneeded use of beginning-of-line, which also triggers an infinite loop in a find-dired buffer that doesn't end with a newline (see discussion in bug#35609).
* Allow using wdired in all dired-derived modesLars Ingebrigtsen2019-07-131-1/+1
| | | | | * lisp/wdired.el (wdired-change-to-wdired-mode): Allow using in dired derived modes (bug#32392). Suggested by James Nguyen.
* * lisp/emacs-lisp/bytecomp.el (byte-compile-dynamic): Mark obsoleteStefan Monnier2019-06-211-5/+0
| | | | | | | | | | | | 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.
* Make wdired-mode ignore ls file indicatorsStephen Berman2019-04-251-8/+17
| | | | | | | | * lisp/wdired.el (wdired--restore-dired-filename-prop): When dired-listing-switches includes "F" or "classify", don't treat appended indicator characters as part of the file name (bug#34915). * test/lisp/wdired-tests.el (wdired-test-bug34915): New test.