Instead of for ivy-immediate-done, which is hard to discover and remember, you can press to move the selection line of current candidate to the line you are typing, and press .
I believe the reason dired always opens directories in a new window and persist is because of tramp. When you are listing files remotely it's very helpful to not have to rebuild that listing every time you navigate back and forth, especially if you have directories with lots of files.
This is great content, thank you! Just a quick hint, where I wonder why it is so rarely mentioned: in dired (bound to W in doom-emacs/evil?!) opens files in the default programm (at least on Ubuntu). It's super convenient for me!
Thanks a lot! Wow, I had never heard of `browse-url-of-dired-file` before, it seems to work pretty well for opening the right program. Great to see there's a decent built-in solution!
25:38 in case anyone forgets that `ivy-done` thing, if you go up one line (k in evil mode) it will select the line you're typing on and enter it as you typed it. Maybe not as slick as ivy immediate done, but very easy to remember (to just "scroll" over the thing you want -> what you typed in!)
If you are using evil, regexp grouping works with \( and \), although you may be able to change it in the configuration. It may also work like that in default emacs. For example, the regexp to replace file name (51:09) should have been ^My\(hab\), and then \1 would have contained "hab".
Wonderful video! I've been wanting to learn dired a long time, and now I have :) As for problems with *dired-open* and using the _dired-open-xdg_ function, I simply override the function (I'm also on a Mac, so I'll use _open_ instead of _xdg-open_ command). (eval-after-load "dired-open" (when (eq system-type 'darwin) '(defun dired-open-xdg () "Try to run `open' to open the file under point as long as the `file' is a regular file." (interactive) (if (executable-find "open") ;; use `open' instead of `xdg-open' (let ((file (ignore-errors (dired-get-file-for-visit)))) ;; TODO - Add check to ignore archives, as I'd like to keep the ;; dired functionality of peeking inside them (if (f-file-p file) ;; add an extra check for regular files here (start-process "dired-open" nil "open" (file-truename file)) nil)) nil)))) This seems to work pretty good so far for my use.
@@SystemCrafters yeah, I made a post about wanting to start a new emacs config in reddit and I was recommended this series (by I am assuming you). I dont regret clicking it, these videos are awesome. Although I am not watching them in the order they came out, as I dont have 10 hours to sit through in a single day or sth but in the order of my interest and they are great. I do hope you get more recognition, you deserve it!!
Thanks a lot! The videos definitely don't need to be watched in order, thankfully there isn't a lot of dependency between them even though I treat them as a series
man I missed it this video series is amazing please don't stop making it its so helpful also could you possibly make a tutorial on exwm because there's not much resources about it
Nice series, I would also be interested in optimizing emacs' performance. I think about garbage collection setup, early-init, gccemacs and profiling where the problem is if emacs gets slow
Can you cover how to read json files in Elisp please? I would wanna have a settings.json and change values of widths, heights, colors, everything in that file, and have Emacs read that file and with that configure everything.
I cannot for the life of me get dired-open working with use-package, even with exactly the same invocation: it simply wouldn't load. Nor would it load with ":commands dired", nor with ":after dired". The only way I could get it to _attempt_ to load is with ":hook dired-mode", but then I got complaints that autoload couldn't define the function `dired-open`. No idea what that means, and no other error messages. I got it working once by requiring it manually and setq-ing dired-open-extensions, but that defeats the point of use-package, surely. Dunno if it's a bug in dired-open, in use-package, in autoload.el, or in my approach. I'll just reimplement it. Learned some things about dired in this one, thanks!
1:02 - Intro
2:16 - About emacs-from-scratch Configuration
2:40 - Dired Basics (Invocation / Navigation)
9:54 - Dired Basics (Configuration)
14:51 - Dired Basics (File Operations)
20:48 - Dired Basics (Copying and Renaming files)
24:00 - Chat Topics (dealing with Ivy completion, `dired-dwim-target`, etc..)
27:16 - Dired Basics (Deleting files)
28:45 - Dired Basics (Creating and extracting archives)
31:35 - Dired Basics (Other common operations)
34:49 - Chat Topics (`wdired-exit`)
36:15 - Single Dired buffer
40:03 - File icons
41:11 - Open external files
46:04 - Hide / show dotfiles
48:10 - Chat Topics (`dired-maybe-insert-subdir`)
49:07 - Renaming files using regular expressions
52:52 - Chat Topics (`dired-omit-mode`)
53:10 - About another new series
53:50 - Outro
*One thing I noticed about the configuration:
On MacOS, `ls` command(BSD) does not have --group-directories-first option, which leads to the error "insert-directory: Listing directory failed but `access-file' worked" at dired invocation.
To avoid that, I needed to install coreutils and then set GNU `ls` to be used as below.
(use-package dired
:ensure nil
:commands (dired dired-jump)
:config
(setq dired-dwim-target t)
(when (string= system-type "darwin")
(setq insert-directory-program "/usr/local/bin/gls"))
:custom ((dired-listing-switches "-agho --group-directories-first")))
Welcome to Heaven, Dude!
Thank you a lot for this series, David! Now I am living on Emacs all time, using eshell and dired as main drivers! Nice!
That's awesome to hear!
Instead of for ivy-immediate-done, which is hard to discover and remember, you can press to move the selection line of current candidate to the line you are typing, and press .
Thanks Sheng! doesn't actually work for me, not sure why. I'd be glad if it did because you're right, it's easier to remember!
@@SystemCrafters You may need to set (setq ivy-use-selectable-prompt t). See: github.com/abo-abo/swiper#frequently-asked-questions
You are a role model for quality content. Congrats my friend. Learning every day with you as a teacher 😊👍
I believe the reason dired always opens directories in a new window and persist is because of tramp. When you are listing files remotely it's very helpful to not have to rebuild that listing every time you navigate back and forth, especially if you have directories with lots of files.
Good point! That makes a lot of sense
Thank you for another great episode David
Thanks a lot for watching!
This is great content, thank you! Just a quick hint, where I wonder why it is so rarely mentioned: in dired (bound to W in doom-emacs/evil?!) opens files in the default programm (at least on Ubuntu). It's super convenient for me!
Thanks a lot! Wow, I had never heard of `browse-url-of-dired-file` before, it seems to work pretty well for opening the right program. Great to see there's a decent built-in solution!
25:38 in case anyone forgets that `ivy-done` thing, if you go up one line (k in evil mode) it will select the line you're typing on and enter it as you typed it.
Maybe not as slick as ivy immediate done, but very easy to remember (to just "scroll" over the thing you want -> what you typed in!)
Nice pointer, thanks Sam!
If you are using evil, regexp grouping works with \( and \), although you may be able to change it in the configuration.
It may also work like that in default emacs.
For example, the regexp to replace file name (51:09) should have been ^My\(hab\), and then \1 would have contained "hab".
Thanks for dired-dwim-target, was looking for something like this ♥️
Thanks for sharing this kind of content
Wonderful video! I've been wanting to learn dired a long time, and now I have :)
As for problems with *dired-open* and using the _dired-open-xdg_ function, I simply override the function (I'm also on a Mac, so I'll use _open_ instead of _xdg-open_ command).
(eval-after-load "dired-open"
(when (eq system-type 'darwin)
'(defun dired-open-xdg ()
"Try to run `open' to open the file under point as long as the `file' is a regular file."
(interactive)
(if (executable-find "open") ;; use `open' instead of `xdg-open'
(let ((file (ignore-errors (dired-get-file-for-visit))))
;; TODO - Add check to ignore archives, as I'd like to keep the
;; dired functionality of peeking inside them
(if (f-file-p file) ;; add an extra check for regular files here
(start-process "dired-open" nil
"open" (file-truename file)) nil)) nil))))
This seems to work pretty good so far for my use.
Thanks for the incredible video. This series is great for new people looking to get into emacs
Thanks a lot, I'm glad if it brings new people to Emacs, it's a fantastic program!
@@SystemCrafters yeah, I made a post about wanting to start a new emacs config in reddit and I was recommended this series (by I am assuming you). I dont regret clicking it, these videos are awesome. Although I am not watching them in the order they came out, as I dont have 10 hours to sit through in a single day or sth but in the order of my interest and they are great. I do hope you get more recognition, you deserve it!!
Thanks a lot! The videos definitely don't need to be watched in order, thankfully there isn't a lot of dependency between them even though I treat them as a series
@@SystemCrafters yeah, thats what I would say as well
To solve the problem of having multiple dired buffers open, use the dired-find-alternate-file function which is bound to a
man I missed it this video series is amazing please don't stop making it its so helpful also could you possibly make a tutorial on exwm because there's not much resources about it
Thanks a lot! Good news, I'm starting a new series about EXWM next Friday!
@@SystemCrafters Omg thanks so much man exicted
Nice series, I would also be interested in optimizing emacs' performance. I think about garbage collection setup, early-init, gccemacs and profiling where the problem is if emacs gets slow
Thanks! I will definitely be covering this in a future video
If you've not found it yet, you can auto refresh dired buffers by setting dired-auto-revert-buffer to t
Can you cover how to read json files in Elisp please? I would wanna have a settings.json and change values of widths, heights, colors, everything in that file, and have Emacs read that file and with that configure everything.
I cannot for the life of me get dired-open working with use-package, even with exactly the same invocation: it simply wouldn't load. Nor would it load with ":commands dired", nor with ":after dired". The only way I could get it to _attempt_ to load is with ":hook dired-mode", but then I got complaints that autoload couldn't define the function `dired-open`. No idea what that means, and no other error messages. I got it working once by requiring it manually and setq-ing dired-open-extensions, but that defeats the point of use-package, surely. Dunno if it's a bug in dired-open, in use-package, in autoload.el, or in my approach. I'll just reimplement it.
Learned some things about dired in this one, thanks!
Linux. How in dired mode show Trash folder and restore files from it?
For evil collection, Shift+j invokes the dired-goto-file command instead of j.
Nice, didn't know about that one!
👍
super
Dired in same directory as file -> C-x f (find-file) C-d (dired), no configuration needed.
Anyone else need to Google the carrot key? :D Apparently it's the ^ key and it's actual name is the caret.
They are pronounced the same in US English unfortunately :)
Stop ido autocompletions -> C-f
And M-x locate.