help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening multiple files in a single buffer?


From: Douglas Lewan
Subject: Re: Opening multiple files in a single buffer?
Date: Sat, 13 Jun 2020 11:20:55 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 6/13/20 10:31 AM, Gregory Heytings wrote:

Dear List,

I've now been using Emacs for many, many years, and there is perhaps a single feature I'm really missing, namely opening more than one file in a single buffer, with the contents of the files appearing one after the other in the same buffer, with some kind of visual separator between them. I don't know if that feature exists in other text editors.

For example, suppose you write a book, which has fifteen chapters in files chap1.tex, ..., chap15.tex.  Opening these files in a single buffer means that you could use isearch-{forward,backward} in the whole book.  (I know that multi-isearch-buffers could be used in this particular case, but it is not as convenient to use.)  You could also use query-replace on the whole book, or reindent all files, or execute shell-command on all files at once, and so forth.  (Again I know that all this can be done with already existing features, e.g. through dired, but again I find them not as convenient as what I have in mind.)

Each file would have its own major and minor modes, and the mode-line would adapt depending on the file corresponding to the buffer portion in which the point is currently located.

My question is: Is this feasible, or is the one-to-one correspondence between buffers and files too deeply rooted in Emacs' codebase that it is not feasible?  If it is feasible, could this feature be considered for implementation in a future Emacs version?

I would say it's feasible, but probably awkward as stated. An application that implements something similar via a sequence of buffers with a way of navigating next and previous and providing appropriate commands via a (map) function would probably be simpler to build and manage. It would also be much more natural.

--

,Doug
d.lewan2000@gmail.com
(908) 720 7908

If this is what winning looks like, I'd hate to see what losing is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]