[Top][All Lists]

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

Re: Fundamental mode vs. special mode

From: Juri Linkov
Subject: Re: Fundamental mode vs. special mode
Date: Mon, 24 Oct 2011 08:11:33 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (x86_64-pc-linux-gnu)

>> Anyway, binding "q" to `quit-window' is no good; I imagine some users
>> expect want to be able to edit the buffer.  Same with other cases like
>> the *Messages* buffer.
> OK. I guess to me a buffer like *Shell Mode Output* is a read-only
> buffer, hence `special'.

I edit buffers like *Shell Command Output* and *Messages* all the time -
to better understand the output by removing unnecessary parts, etc.

> As a user, I feel like buffers Emacs creates, which show some kind of
> status information (logs, shell output etc.), I should be able to read
> and acknowledge (e.g. with `q') like other `special' buffers.

This problem exists only for self-inserting keys like `q'.
Another annoying key that prevents editing in some
non-read-only modes is `g' (`revert-buffer').  It would be better
to find non-self-inserting keybindings for them.

Then we will have two versions (long and short) for these keybindings,
like longer `C-h m' and shorter `h' and `?' for `describe-mode',
and longer `M-<' and shorter `<' for `beginning-of-buffer'.

> It feels like quite often I have to think about what the correct
> command is for this buffer, where I feel it should be more natural
> from a UI point of view.

Perhaps there should be a clearer separation between edit and view modes.
So in edit mode (even when major mode is derived from `special-mode'),
all single key should be self-inserting.  And in view mode (including
modes derived from `special-mode') single keys like `q' and `g' are
acceptable because the buffer is read-only anyway.  Actually we already
have a keybinding to switch between edit and view modes: `C-x C-q'.

reply via email to

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