Questions tagged [files]

Use this tag for questions about moving, deleting, or opening files. Or for questions about the difference between a buffer and its file. For topics such as "Saving Files", use "buffers" instead.

294 questions
20
votes
2 answers

Save current file with a slightly different name

My files have long filenames and a part of the filename is a date and a version number. Often I'd like to save the file in the buffer using nearly the same name, just change version number or date. This would be much easier, if I had a command…
Keks Dose
  • 508
  • 5
  • 19
17
votes
9 answers

Recursively list all files and sub-directories

Is there a way, possibly using a package, to recursively list all the files (with paths) and sub-directories (or at least the empty sub-directories, since the paths to the non-empty ones can be gleaned from the paths of the files contained therein)…
Evan Aad
  • 1,541
  • 1
  • 14
  • 30
16
votes
1 answer

How to prevent Emacs from breaking hard links?

Let's say I have two files file1 and file2: $ echo aaa >file1 $ ln file1 file2 Then I check that the inodes are the same: $ ls -i 18749779 file1 18749779 file2 which shows that the two files are actually the same. Now I edit file1 in Emacs, and…
Håkon Hægland
  • 3,648
  • 1
  • 22
  • 51
15
votes
2 answers

What's wrong with `find-file-noselect`?

In a recent answer by lunaryorn, he stated: However, I'd recommend against most other parts of Org, for reasons already stated in comments: It's old, and full of legacy and harmful practices (e.g. find-file-noselect to read files…
mbork
  • 1,667
  • 1
  • 13
  • 23
15
votes
1 answer

Open large files?

I want to open just the head of a large file. I know you can use a shell command (M-! RET head file RET), but I lose helm completion, it opens in a separate window, and the buffer has the uninformative name of *Shell Command Output*. How can I open…
salotz
  • 1,400
  • 11
  • 21
14
votes
5 answers

How do I search and replace over a set of files?

I'd like to define a set of files within which I can search and replace text. To clarify: I would like to be able to search, e.g., in all files xk*.tex in a given directory (and excluding backup files). I would also like to be able to change the…
Claudio
  • 141
  • 1
  • 3
9
votes
2 answers

How can I jump to a file and line number from a list in a buffer?

I have a buffer with content like: src/file4.rs:9 src/file4.rs:33 src/file4.rs:64 I'd like to be able to put my cursor on a line and jump to the appropriate file / line in the other window, just like compilation-mode would. However, this buffer…
Shepmaster
  • 267
  • 1
  • 6
9
votes
2 answers

Can I view within Emacs the properties of a file which I already opened?

I've opened a file in Emacs. I'd like to view information about that file such as creation date, size, etc. within Emacs. Is there a key shortcut or any Emacs command for that? Thanks.
Terry
  • 370
  • 2
  • 14
8
votes
1 answer

How to prevent creating files starting with .# (lock files)?

Emacs 26 I have a file rest.api.rc. When I start editing it, the following lock file is automatically created: .#rest.api.rc After saving file rest.api.rc, the lock file .#rest.api.rc is gone. How I can prevent generating the lock file…
a_subscriber
  • 4,062
  • 1
  • 18
  • 56
5
votes
1 answer

Deleting a file with name that already exists in Trash

I use delete-by-moving-to-trash to move deleted files and folders into trash instead of deleting them. However, if the file or folder with the same name is already in Trash I get an error file already exists". On macOS and while I delete file using…
Navidot
  • 772
  • 5
  • 13
5
votes
0 answers

Emacs hitting "too many files open"

I am using Ubuntu 14.04LTS 64bit. I encounter this problem when I opened too many files by a emacs function. Error is signaled as a message and prevent me from opening more files. I checked my ulimit -a which shows my open files limit is 1024. So I…
tom
  • 365
  • 2
  • 7
5
votes
1 answer

Drag-and-drop file does not work anymore

Using Emacs 24.5 on a Gentoo/Kde workstation. Drag-and-drop of files used to work okay (as far as I remember), to open a new buffer on the dragged file. Same behaviour when using emacs -Q. It does not work anymore (FYI, I downgraded to emacs-23…
NdC
  • 51
  • 1
5
votes
1 answer

Save changes to an emacs file without changing the date

I sometimes would like to make changes to my emacs files but without changing the date of the modified file. For instance, I would like to write up a brief evaluation of a lecture I might have given. Ideally, I would not like to change the file's…
rari
  • 71
  • 2
4
votes
1 answer

Open .cbr files

Is it possible to open a CBR file with Emacs? I am not asking for a package similar to MComix, just a quick way to read the content of a .cbr file.
Boccaperta-IT
  • 1,556
  • 11
  • 24
4
votes
1 answer

Most recent files visited

I am looking for a solution for recently visited files and/or directories by applications run in gnome terminal here When I saw that question I thought of Emacs. Emacs has recentf-mode, does that mean that if I open a shell buffer by M-xshell or…
Tim
  • 5,007
  • 7
  • 32
  • 61
1
2 3