dired

cannot open load dired-details

烂漫一生 提交于 2019-11-28 09:49:39
问题 I just installed the emacs package dired-details from inside emacs via M-x package-list-packages clicked on the package name and then install in the newly opened buffer. Then I put those lines into my .emacs : (require 'dired-details) (setq-default dired-details-hidden-string ">---< ") (dired-details-install) When I restart emacs , I get the following error: File error: Cannot open load file, dired-details The interesting thing is, that when I mark the code region above and apply M-x eval

Distinguishing files with extensions, from hidden files and no extensions

六月ゝ 毕业季﹏ 提交于 2019-11-28 02:26:43
I'm having difficulty distinguishing files with extensions, from files without extensions, and hidden files. I'm using (file-name-extension (dired-get-file-for-visit)) in dired-mode, and the type of file extension determines what action to take -- e.g., open in Emacs, or open externally with a particular application. A hidden file (e.g., .hidden ) returns a value of nil instead of "hidden" . A file with no extension (e.g., foo ) also returns a value of nil . Can anyone suggest an alternative method to handle this? (let* ( (input-regexp '("odt" "wpd" "docx" "doc" "xls" "pdf" "tif" "bmp" "jpg"))

How do I create an empty file in emacs?

风格不统一 提交于 2019-11-27 20:01:06
问题 How can I create an empty file from emacs, ideally from within a dired buffer? For example, I've just opened a Python module in dired mode, created a new directory, opened that in dired, and now need to add an empty __init__.py file in the directory. If I use C-x C-f __init__.py RET C-x C-s then emacs doesn't create the file because no changes have been made to it. I would have to type in the file, save it, delete my typing and then save it again for that to work. Thanks 回答1: Here's an

Emacs dired: too much information

强颜欢笑 提交于 2019-11-27 13:41:13
问题 I'm trying to use Emacs and everything is fine, but the information about every file in my directory is too comprehensive. How can I tell it to show only file name (and maybe filesize in human readable format)? I tried options like dired-listing-switches but without any luck. 回答1: You can reduce the amount of information displayed by using Emacs' ls emulation instead of allowing it to use ls directly. To enable ls emulation, add the following code to your startup file (probably .emacs or

In Emacs dired, how to find/visit multiple files?

假装没事ソ 提交于 2019-11-27 12:20:00
问题 If I have multiple files marked, how do I find/visit all those marked files in emacs, beside running dired-find-file on each of them? Is there a build-in command, or do I need some extra lisp code? 回答1: If you add this to your .emacs, you'll be able to open the files via the keybinding 'F'. (eval-after-load "dired" '(progn (define-key dired-mode-map "F" 'my-dired-find-file) (defun my-dired-find-file (&optional arg) "Open each of the marked files, or the file under the point, or when prefix

How do I stop emacs dired mode from opening so many buffers?

拥有回忆 提交于 2019-11-27 10:45:08
问题 When I use dired mode to browse around and find a file I want to open in Emacs, dired opens a new buffer for each directory I visit when looking for the file each time I select a directory with Enter , which means I can end up with a lot of buffers I don't want: . * newer 0 Fundamental c:/work/stackoverflow/batch/mydir/newer % mydir 302 Dired by name c:/work/stackoverflow/batch/mydir/ % batch 616 Dired by name c:/work/stackoverflow/batch/ % stackoverflow 1017 Dired by name c:/work