[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43165: [PATCH] Add load this file lisp function.
From: |
Drew Adams |
Subject: |
bug#43165: [PATCH] Add load this file lisp function. |
Date: |
Wed, 2 Sep 2020 08:51:48 -0700 (PDT) |
> Just do: `M-x load-file RET M-n RET'
I was going to say this yesterday, when I saw
the enhancement request.
Just do: `M-x load-file RET RET'. No need for
`M-n'. Of course, one needs to know this, to
do it. I've been doing it forever. Would I
want a key for it? Not I.
But it's true that we have `kill-this-buffer'.
The reason we have `kill-this-buffer', I believe,
is just for a menu item (`Close': `<menu-bar>
<file> <kill-buffer>'). It makes little sense
to bind it to a keyboard key. But someone could.
`load-file' is in the same boat, I think. There's
little use for a `load-this-file' command, in
terms of keyboard key bindings. But I suppose
it could serve (like `Close') as a menu item.
Actually, there's a difference from `kill-buffer':
the risk of killing something unintended versus
the risk of loading something unintended. Maybe
the same reason we show the default in the prompt,
for `kill-buffer'.
If you were to bind `kill-this-buffer' to a key,
and accidentally hit that key, bye-bye wrong
buffer, perhaps. In a menu that's less likely
to happen. For `load-this-file' there's less of
a "danger", if you accidentally try to load the
current file when you shouldn't.
I don't see a need for such a command, personally,
but about the same thing goes for `kill-this-buffer'.
Note, BTW, that we don't even bind `load-file'
by default. It's not really a command that users
use every 10 minutes.
Personally, I'd say we don't need a `load-this-file'.
Just one opinion.