[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Etymology of `visiting' files, and for that matter, of `finding' the
Florian v. Savigny
Re: Etymology of `visiting' files, and for that matter, of `finding' them
Wed, 10 Aug 2016 11:24:53 +0200
> I think it may also be a bit of a retronym. Emacs has two commands for
> opening files: C-x C-f and C-x C-v. They needed mnemonics that
> distinguished them, so the first is "Find" and the second is "Visit".
> GNU Emacs has abandoned the mnemonic name of C-x C-v.
This is really interesting (along with the information on the "first"
buffer that originally opened when you started Emacs), and it has
created some unintuitiveness:
C-x C-f find-file
C-x C-v find-alternate-file
I remember I changed these key bindings long ago, because I did find
them unmemnonic, to:
C-x C-f find-file
C-x C-v view-file
C-x C-a find-alternate-file (I think this one had no default binding.)
It is also interesting that Dired uses the following single-key
e dired-find-file (obviously motivated by the term "editing")
;; but also:
f dired-find-file (in reverence to function name and tradition)
I realise now that "visit" unfortunately collides with "view", but I
still think that the nice "visiting" metaphor deserves more
Of course, "finding" a file is now a term which is sort of hardwired
into my brain, but in decades of amateur hacking, I have become
convinced that not only the readability of code is very important, but
that *even more so*, it matters how painless, intuitive and memnonic
the user interface is (which is, surprisingly, even true when I have
programmed that interface /myself/), and that it is harmful to make
things unnecessarily unintuitive there. (Which may, in Emacs' case,
arguably contribute to making its use look like an esoteric endeavor
that is best left to the initiated, because it requires you to give
some words different meanings in your head than they normally have.)
The term "finding" a file would normally be used to refer to finding a
file, i.e. searching for and (hopefully) finding it, in line with the
*nix "find" command. Any function which expects the path of a file as
an argument hardly has any finding left to do.
As an interesting practical example of this confusion, consider the
find-dired and find-lisp libraries, in which "find" means "find". I
have only just discovered them, after ~ 20 yrs of using Emacs on a
several times daily basis, and even then only because this thread
inspired me to do so. I often forget where certain files are, but I
never looked for (or, at least, found) Emacs functions that could have
helped me to actually find them.
I am now seriously wondering whether the special Emacs meaning of
"finding" a file kept me from doing so. It does look like it, because
normally, I trust that there is an Emacs function for everything, and
look for it. But functions starting with "search-" consistently
referred to searching buffers (or files) for _strings_, and "find-"
was also ... well, already spoken for.
In my last post, my question if we could "rectify" this was at least
half a joke, but I now think there may be a case for making Emacs
terminology a bit more in line with normal language here. (Which is
not always, or necessarily, the same as (rigidly) "consistent", of
course, because normal language itself is definitely not consistent.)
Any thoughts on this?
Florian von Savigny