Prevent crashes in certain situations (todo #9)
This commit is contained in:
parent
00861f086e
commit
f1a030c538
|
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [0.3.2] - 2020-05-08
|
||||||
|
### Fixed
|
||||||
|
* Workaround for crash in certain cases
|
||||||
|
|
||||||
## [0.3.1] - 2020-03-25
|
## [0.3.1] - 2020-03-25
|
||||||
### Added
|
### Added
|
||||||
* Marking files now works recursively, too.
|
* Marking files now works recursively, too.
|
||||||
|
|
12
README.md
12
README.md
|
@ -15,16 +15,6 @@ With prefix argument, or when only provided directories, run recursively.
|
||||||
|
|
||||||
Run it from a text file containing one file name per line to open the listed files.
|
Run it from a text file containing one file name per line to open the listed files.
|
||||||
|
|
||||||
## TODO
|
|
||||||
1. [x] Create user-customizable variable to hold default arguments
|
|
||||||
2. [x] Start sxiv on the file at point (using `-n ...`)
|
|
||||||
3. [x] Let user specify paths to be excluded.
|
|
||||||
4. [x] Mark files in subdirectories if run recursively (by inserting the subdirectory into the current buffer)
|
|
||||||
5. [ ] Let user edit options (ideally with transient.el) when called with null argument/two prefix arguments
|
|
||||||
6. [ ] When running with a lot of files, sxiv may take some time to start. Signal to the user that it is starting, and let them kill it if they want.
|
|
||||||
7. What should be the behavior when we open Dired-marked files, then mark files within sxiv?
|
|
||||||
8. [ ] sxiv-exclude-strings does not work recursively, because only the directories are passed to the process. Adding all files to the path might cause it to fail, or take a long time.
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
* `sxiv-dired-marked-files-p` doesn't work as intended with non '*' markers (e.g. C or D)
|
* `sxiv-dired-marked-files-p` doesn't work as intended with non '*' markers (e.g. C or D)
|
||||||
|
|
||||||
|
@ -39,6 +29,8 @@ At a cursory glance, picpocket (v20180914)
|
||||||
## Contributions and contact
|
## Contributions and contact
|
||||||
Feedback and MRs very welcome. 🙂
|
Feedback and MRs very welcome. 🙂
|
||||||
|
|
||||||
|
You may be interested in the [TODO.md](TODO.md)
|
||||||
|
|
||||||
Contact the creator and other Emacs users in the Emacs room on the Jabber network - [xmpp:emacs@salas.suchat.org?join](xmpp:emacs@salas.suchat.org?join) ([web chat](https://inverse.chat/#converse/room?jid=emacs@salas.suchat.org))
|
Contact the creator and other Emacs users in the Emacs room on the Jabber network - [xmpp:emacs@salas.suchat.org?join](xmpp:emacs@salas.suchat.org?join) ([web chat](https://inverse.chat/#converse/room?jid=emacs@salas.suchat.org))
|
||||||
|
|
||||||
(For help in getting started with Jabber, [click here](https://xmpp.org/getting-started/))
|
(For help in getting started with Jabber, [click here](https://xmpp.org/getting-started/))
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# TODO
|
||||||
|
1. [x] Create user-customizable variable to hold default arguments
|
||||||
|
2. [x] Start sxiv on the file at point (using `-n ...`)
|
||||||
|
3. [x] Let user specify paths to be excluded.
|
||||||
|
4. [x] Mark files in subdirectories if run recursively (by inserting the subdirectory into the current buffer)
|
||||||
|
5. [ ] Let user edit options (ideally with transient.el) when called with null argument/two prefix arguments.
|
||||||
|
* When files are marked in Dired - only display marked files, or ignore marks and run as usual
|
||||||
|
* When files are marked in Dired and we mark files in sxiv - replace the selection, or unmark the files marked this time
|
||||||
|
* Other options like running recursively, modifying arguments, etc
|
||||||
|
6. [ ] When running with a lot of files, sxiv may take some time to start. Signal to the user that it is starting, and let them kill it if they want.
|
||||||
|
7. [ ] sxiv-exclude-strings does not work recursively, because only the directories are passed to the process. Adding all files to the path might cause it to fail (bash length limit), or take a long time.
|
||||||
|
8. [ ] Make it work in find-dired buffers too
|
||||||
|
9. [ ] Bug - sometimes, if a lot of files (e.g. >50) are marked in sxiv, the input received by `sxiv-insert-subdirs` is incomplete (i.e. the first file name is a trailing segment of an actual existing filename).
|
3
sxiv.el
3
sxiv.el
|
@ -58,7 +58,8 @@ With no marked files, or if not in a Dired buffer, return nil."
|
||||||
Return PATHS unchanged."
|
Return PATHS unchanged."
|
||||||
(mapc (lambda (path)
|
(mapc (lambda (path)
|
||||||
;; is the file a direct child? (i.e. exists in the current directory?)
|
;; is the file a direct child? (i.e. exists in the current directory?)
|
||||||
(unless (file-exists-p (file-name-nondirectory path))
|
(unless (and (file-exists-p (file-name-nondirectory path))
|
||||||
|
(file-directory-p path))
|
||||||
(dired-insert-subdir (file-name-directory path))))
|
(dired-insert-subdir (file-name-directory path))))
|
||||||
paths)
|
paths)
|
||||||
paths)
|
paths)
|
||||||
|
|
Reference in New Issue