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.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
119 views

Why is cloning of file buffers prohibited?

Why does clone-buffer not work on file buffers. I can make it work by the following advice: (advice-add 'clone-buffer :around (lambda (oldfun &rest args) "Allow cloning file buffers." ...
5
votes
1answer
448 views

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 ...
4
votes
0answers
1k views

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 ...
3
votes
0answers
1k views

When using emacsclient, how can I open the file in the active buffer?

When I open a file with emacsclient without invoking -c, Emacs visits the file in a new buffer in the background while leaving my current window configuration in place. I'd like to change this, e.g. ...
2
votes
0answers
56 views

Simple Atom-style jump-to-file

I'm upgrading Emacs and moving from macOS to Windows after quite a few years getting by with a very old setup (eg, custom scripts for Anything). I've installed Helm. I'm interested in a simple way to: ...
2
votes
0answers
110 views

How to make find-file-other-window reuse existing window

Is it possible to make find-file-other-window open the file in a pre-existing window instead of creating a new one? Currently: |A---|B---| |A-|C-|B---| |----|----| -> ...
2
votes
2answers
539 views

How to open multiple files in multiple windows at startup

In earlier versions of emacs one could use emacs -nw file1 file2 file3 and see three files (and no buffer list) at startup. For recent versions this no longer works. Is it possible to add some code to ...
2
votes
0answers
48 views

find-library equivalent for C internal source code files

Is there a built-in Emacs equivalent of find-library for the C internal source code files? If there is an additional step needed to create an index of the files (e.g., make tags) when building Emacs, ...
2
votes
0answers
100 views

Accidentally visiting a FIFO

I'm in Dired, and one of the files in the current directory is a named pipe (FIFO) prw-r--r--+ 1 ivan staff 0 Feb 6 11:13 some_pipe If I (accidentally) visit it (with dired-visit-file), ...
2
votes
0answers
167 views

How to find/grep in Python virtualenv with projectile/helm easier?

How I can customize helm/projectile behaviour to find files and grep in $VIRTUALENV dir easier? Or maybe I can write some function(s) to find/grep in virtualenv of current project?
1
vote
0answers
52 views

Sharing .org file between two users

My secretory creates a daily agenda for me by capturing task to shared org file mytodo.org. When I open the agenda or mark the task done, her ability to capture new task gets limited as the mytodo.org ...
1
vote
0answers
110 views

Problem saving (C-x C-s) files on a NFS drive with emacs 24/25

Starting with Emacs 24 (using various different versions of Ubuntu and Linux Mint), if I open a file on an NFS drive, modify it and attempt to save it C-x C-s, I get the message of: Saving <...
1
vote
1answer
184 views

How to mount/unmount devices?

I'm interested in mount/umount usb and other devices directly from emacs. In many file mangers (like nautilus) the devices are automatically discovered and indicated with an icon, it's possible to do ...
1
vote
0answers
70 views

f.el: f-split behaviour

Using f-split from f.el: (require 'f) (f-split "c:/a/b") returns ("/" "c:" "a" "b") What is the rationale? Shouldn't it be ("c:" "a" "b")? Also in Emacs for Windows the value of: (f-path-...
1
vote
0answers
65 views

Dired+: Copy to nonexistent directory

Windows 10, Emacs 25.1, Dired+ I try to copy a file from test folder to nonexistent folder new: But I get this error: Is it possible to make Emacs autocreate folder new and copy the file to it? It ...
1
vote
0answers
32 views

How to write custom read-file-name with expanded set of completions?

I am seeking advice for how to get tab completion in the minibar with a custom set of completion candidates that are either subdirectories or build targets from Makefiles. For context, I'm using the ...
1
vote
0answers
35 views

How to write a function for editing a file and then running a command?

I would like to write a function that does the equivalent of the shell command: vim $MY_FILE && $MY_COMMAND In other words, I would like to open a file in a buffer, and then when I save/...
1
vote
1answer
84 views

Manage freedesktop trashcan with dired mode

Trashed files are stored in the FreeDesktop standard location: ~/.local/share/Trash/files. How do I restore or permanently delete files in that folder using dired?
1
vote
0answers
125 views

Mac OS X problem accessing file via symlink

GNU Emacs 24 on El Capitan. When opening a file whose path includes a directory which is a symlink, Emacs emits the following error: *ERROR*: Wrong type argument: numberp, "Bus error: 10" If I ...
1
vote
0answers
35 views

Is it possible to display and edit the contents of a linked file?

In a Stack Overflow question, another poster wants to write OpenGL shader programs near to where they are used. However, performance tuning indicates that you should compile these shaders once at the ...
1
vote
0answers
142 views

deactivate saveplace.el for filetype

Saveplace is a nice tool to remember where I have left of in a file. But for Org files it causes me problems when I quit emacs in the middle of a heading. My current try to deactivate it in org-files ...
0
votes
0answers
38 views

Setting up Emacs as an external editor on windows 10

Apologies if this has been asked multiple times already, haven't found a useful answer. I am trying to use Emacs as an external editor on two separate applications in windows 10, one is a notes app (...
0
votes
1answer
140 views

Open file in orgmode with external application. Check if file exists and create file from template if necessary

I want to create a file with org-open-at-point from a template if that file does not exist. If it exists, I want to open it in an external app. In org-mode, file-links are created by [[file:path-to-...
0
votes
2answers
42 views

How to automatically create another file that matches a regex based on a file created?

Suppose I create a file in dir1/file1.txt. As soon as I write the file for the first time, I want to create another file in dir2/file1_friend.txt. But when I create a file dir1/file2.txt, I want the ...
0
votes
0answers
26 views

Can image-dired track renamed files?

I would like to view images using image-dired, then rename them. What I do at the moment: Open image-dired with my directory of choice. Mark an image that I want to rename. In the corresponding dired+...
0
votes
0answers
45 views

How to get a list of all folder names under a folder?

I have a folder structure like this,i want get a list that all folder names in pack folder. Then traverse the list and load them ├── pack │   ├── completion │   │   ├── company │   │   │   └── pack-...
0
votes
1answer
434 views

Test file permissions in Windows

The file-writable-p docstring says: Return t if file FILENAME can be written or created by you. In Windows you cannot usually write on files when they are used by a different app. In these ...
0
votes
0answers
97 views

How to get thing-at-point between separators

I'm trying to get hold of the current filename at point. In an arbitrary buffer. Say I have list of files in a buffer and I want to be able to do something with each file. For that I need to ...