* lisp/wdired.el (wdired--before-change-fn):
(wdired--restore-properties): Widen before doing anything so that
we get all the changed bits (bug#49124).
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`.
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`.
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.
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.
* 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).
* 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).
* 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.
`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.
* 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.
* 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).
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.
* 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.
* lisp/wdired.el (wdired--restore-dired-filename-prop): Use
dired-permission-flags-regexp instead of dired-filename to test
whether the file is a symlink, since calling file-symlink-p on the
latter may fail in wdired-mode (bug#32673).
* lisp/wdired.el (wdired--restore-dired-filename-prop): If the
file name is a symbolic link, only propertize the link name. This
prevents wdired-create-parentdirs from turning the link into a
directory.
After every change in wdired-mode, put the dired-filename text
property on the file name. This ensures that changing some but not
all characters in the name succeeds with non-nil
wdired-use-interactive-rename (bug#32173) and it also ensures that
changed names can be found (e.g. by dired-isearch-filenames) while
still in wdired-mode.
* lisp/wdired.el (wdired--restore-dired-filename-prop): New function.
(wdired-change-to-wdired-mode): Add it to after-change-functions.
(wdired-change-to-dired-mode): Remove it from after-change-functions.
(wdired-finish-edit): Move invocation of
wdired-change-to-dired-mode below invocation of wdired-do-renames,
so that the latter runs wdired--restore-dired-filename-prop, but
above the invocation of revert-buffer to avoid using
wdired-revert, which changes back to wdired-mode.
(wdired-search-and-rename): Wrap renaming in unwind-protect and if
user types C-g when prompted to change the file name, make sure we
return to dired-mode.
This is a fairly minimal fix for the release branch; a more
comprehensive fix is on master, so do not merge this to master.
* lisp/wdired.el (wdired-search-and-rename): Remove dired-filename
text property in order to find new filename when it only partially
replaces old filename (bug#32173). If user quits before renaming
succeeds, restore the dired-filename text property.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
facb5e2 Update Emacs manual section related to character folding
4efea8e ; * etc/DEBUG: Fix a typo. (Bug#22984)
f8df21b Update admin/notes/unicode
950be68 Add symref-filepattern entries for c?perl-mode
8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them.
985dacf ; NEWS update for the last change in etags
741a6f8 Sync with gnulib
7352c6c Rework C source files to avoid ^(
a589e9a By default, etags produces unqualified Perl tag names
72c7438 Indent methods with keyword names correctly
28532a9 Propertize character literals and special global variables
differently
a7d6f39 ; Fix last change in NEWS
83b2a20 Change how /etc/NEWS presents character folding
b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding
off by default""
711ca36 Properly handle lambda as read function (bug 22961)
1b9d616 Propertize operator symbol names with symbol syntax class
9b16bc2 Stop recognizing :#{} as symbol in ruby-mode
366ec77 Allow using the left shift operator without spaces on both sides
02bf7cc Properly handle unquoting in wdired (bug 22938)
16cf469 ; Spelling fix and tighten up comment
f50bc04 Allow splat operator before percent literal
991c801 Don't apply the return value of goto-char as syntax class
6e63b3e Guard against nested percent literals
066f3bc Recognize iuwu-mod after an escaped newline
6f7a57c Fix symbolic mode string conversion for s and t
50b9826 Update 'ucs-names' database
993b2fb Improve doc string of 'shell-command'
b71c717 Make the code in movemail_strftime more general
cc057e4 Speed up redisplay of binary files with long series of nulls
e51b27e Remove the highlighting support for quoting 'like this' inside
Lisp docstrings
b1abce1 Restore leading space in movemail pop output
98b8d44 Fix bidi-paragraph-direction in Rmail view buffer
dc9d837 Don't misindent computed property generator methods
7923112 Fix mbox files produced by movemail on MS-Windows
c45a1ca doc string file descriptor exhaustion fix
265141b Fix Bug#22814
The recorded old names are not quoted, don't unquote them.
* lisp/wdired.el (wdired-normalize-filename): Add argument
unquotep, only unquote if non-nil.
(wdired-get-filename): Don't unquote the old file name.
(wdired-get-previous-link): Always unquote.
* lisp/wdired.el (wdired-create-parent-directories): New
variable (bug#6817).
(wdired-create-parentdirs): New function.
(wdired-do-renames): Use it.
* doc/emacs/dired.texi (Wdired): Mention
`wdired-create-parent-directories'