Discussion:
[VM] Any interest in trying to make local vs. IMAP folder treatment more seamless
blueman
2012-06-12 20:36:54 UTC
Permalink
For example, it would be nice to have a single vm-visit-any-folder
function which would visit local vs. IMAP folders depending on whether
there is a ':' (colon) in the name.

For example:
'foldername' = local folder 'foldername
':foldername' = IMAP folder on default imap server
'server:foldername' = IMAP folder on IMAP server 'server'
'folder\:name' = local folder 'foldername'

Similarly, having a single 'FCC' line that would be treated as IMAP or
local folders depending on the name of the header contents

Similarly, for other key frequently used functions.

This collapsing would be especially useful given the limited number of
key bindings so that for example 'v' can be used to visit any (IMAP or
local) folder.
Uday Reddy
2012-06-13 07:40:53 UTC
Permalink
Post by blueman
For example, it would be nice to have a single vm-visit-any-folder
function which would visit local vs. IMAP folders depending on whether
there is a ':' (colon) in the name.
'foldername' = local folder 'foldername
':foldername' = IMAP folder on default imap server
'server:foldername' = IMAP folder on IMAP server 'server'
'folder\:name' = local folder 'foldername'
Similarly, having a single 'FCC' line that would be treated as IMAP or
local folders depending on the name of the header contents
I am pretty sure that I would never include standard commands in VM with
such complex semantics.

The ultimate plan for handling the input of POP/IMAP folder names is going
to be the URL notation, which is now standard. I don't yet know wheter that
will allow all types of folders to be specified in a single command. If it
is possible, I will do so.
Post by blueman
This collapsing would be especially useful given the limited number of
key bindings so that for example 'v' can be used to visit any (IMAP or
local) folder.
My principle is that key bindings are meant for frequently-used commands.
For others, the best option is to define aliases, e.g.,

(defalias 'imap 'vm-visit-imap-folder)

I actually believe that the Emacs architecture is fundamentally flawed in
its overdependence on key bindings. I have had discussions about it in the
Emacs developers mailing list. Some points have been agreed, partially, but
the ideal solution requires a lot of reengineering, which they don't hve
stomach for.

The stop-gap solution is for us to define our own aliases and ditch key
bindings except when they are really needed.

Cheers,
Uday
r***@knighten.org
2012-06-13 23:52:56 UTC
Permalink
Post by Uday Reddy
My principle is that key bindings are meant for frequently-used commands.
For others, the best option is to define aliases, e.g.,
(defalias 'imap 'vm-visit-imap-folder)
I actually believe that the Emacs architecture is fundamentally flawed in
its overdependence on key bindings. I have had discussions about it in the
Emacs developers mailing list. Some points have been agreed, partially, but
the ideal solution requires a lot of reengineering, which they don't hve
stomach for.
The stop-gap solution is for us to define our own aliases and ditch key
bindings except when they are really needed.
Would you elaborate on this? I can guess what "fundamentally flawed in
its overdependence on key bindings" means but I expect my guess is acutally
wrong. Certainly the binding of self-insert-key to all the most common
characters on the keyboard fits the dictum of binding to frequently-used
commands, but most of my own personalized key bindings are quite special
purpose (and often violate the Emacs "rules" for key bindings.) On the other
hand I've never found aliases helpful.

-- Bob
--
Robert L. Knighten
***@knighten.org
Uday Reddy
2012-06-14 09:44:51 UTC
Permalink
Post by r***@knighten.org
Would you elaborate on this? I can guess what "fundamentally flawed in
its overdependence on key bindings" means but I expect my guess is acutally
wrong.
Key bindings form the only customizable user interface in Emacs. (There are
also menus, but they are still underused.)

Since the available combinations of keys is limited, we run up against the
limitations pretty soon. The key space has been divvied up to various
parties, some keys to core Emacs, some for the applications, and some for
the users. It is good that it has been done. Otherwise, we would have had
zillions of conflicts. But it also means that we run up against key space
limitations even sooner.

When I first started using Gnu Emacs, I remember reading "commands are Lisp
functions that have an interactive specification," and thinking "why are
they doing that?" Commands are elements of the user interface. Lisp
functions are elements of the implementation. Why are they identifying
commands with Lisp functions? Imagine an operating system like Windows or
Linux asking the users to invoke operations, not by picking things from a
menu, but rather calling operating system functions by the exact names that
are used in the implementation! That is the situation we have in Emacs.
But Lisp hackers, at least in the original days, didn't understand software
engineering.

The right solution would be to have a separate name space of "commands",
which can be bound to Lisp functions in a mode-specific way. Then I could
define a command like "imap" which is bound to "vm-visit-imap-folder" just
in VM mode, but it won't interfere with any other modes.

Since we don't have a separate name space of "commands", we can only borrow
commands from function names. A global function name like "imap" cannot be
bound at the application level. However, you, as the end user, can always
define it for yourself. So, I recommend that you do so. It saves you from
having to type in long function names like "vm-visit-imap-folder". Here are
some more convenient aliases of this kind:

(defalias 'folder 'vm-visit-folder)
(defalias 'imap 'vm-visit-imap-folder)
(defalias 'pop 'vm-visit-pop-folder)
(defalias 'virtual 'vm-visit-virtual-folder)

Cheers,
Uday

blueman
2012-06-13 12:47:02 UTC
Permalink
Post by Uday Reddy
My principle is that key bindings are meant for frequently-used commands.
For others, the best option is to define aliases, e.g.,
(defalias 'imap 'vm-visit-imap-folder)
I actually believe that the Emacs architecture is fundamentally flawed in
its overdependence on key bindings. I have had discussions about it in the
Emacs developers mailing list. Some points have been agreed, partially, but
the ideal solution requires a lot of reengineering, which they don't hve
stomach for.
The stop-gap solution is for us to define our own aliases and ditch key
bindings except when they are really needed.
Unfortunately, vm itself is not just binding heavy but actually binding
dependent in that some key functions *only* seem to work when called
from a key binding rather than from M-x. I think this is true btw for
certain mark-related functions with next command uses marks. So that
while aliases would shorten typing they still don't solve that problem.
Uday Reddy
2012-06-13 16:02:52 UTC
Permalink
Post by blueman
Unfortunately, vm itself is not just binding heavy but actually binding
dependent in that some key functions *only* seem to work when called
from a key binding rather than from M-x. I think this is true btw for
certain mark-related functions with next command uses marks. So that
while aliases would shorten typing they still don't solve that problem.
That is true, but note that `vm-visit-imap-folder' is something you would
never invoke with marked messages.

My solution has been to free up as many key bindings as possible so that the
users can bind them to whatever is most important to them. We also have
thread operations now, which can be invoked without messing with message
marking.

Cheers,
Uday
Loading...