emacs: Indirect Buffers

Say you have buffers A and B both visiting the same file. Sure, you can view different parts of this file in A and B, but once you narrow in one buffer, the same section is narrowed in the other.

When this is not the behaviour you want (when would you actually want this behaviour, is the real question imho), use indirect buffers!

An indirect buffer shares the text of some other buffer, which is called the base buffer of the indirect buffer. In some ways it is a buffer analogue of a symbolic link between files.


The text of the indirect buffer is always identical to the text of its base buffer; changes made by editing either one are visible immediately in the other. But in all other respects, the indirect buffer and its base buffer are completely separate. They can have different names, different values of point, different narrowing, different markers, different major modes, and different local variables.

Handy-dandy key chord C-x 4 c (clone-indirect-buffer-other-window): analogous to C-x 4 f, this binding creates an indirect buffer of the current buffer in another window. (Remember that c by remembering clone.)


Adding tap0 on ArchLinux

MirageOS networking examples tend to use ifconfig for this. On ArchLinux, ifconfig is (allegedly) deprecated, and we tend to use ip for things.

# ip tuntap add tap0 mode tap
# ip addr add dev tap0
$ ping # browse to if applicable