[Top][All Lists]

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

Re: Different key maps in different dired buffers

From: Whitfield Diffie
Subject: Re: Different key maps in different dired buffers
Date: Thu, 26 May 2016 08:05:33 -0700

> In addition to what others have said, which answers your question,
> I'd ask what you really want to do.

    I haven't seen anyone else say anything; did you see other
responses that I have somehow not received.

> In particular, are you trying to do something different for a given
> class (subset, kind) of Dired buffers, or just arbitrary different
> Dired buffers.

    Both, but in the case at hand, it was the former and you question
reveals an embarrassment of what I am doing in that the changes in
behavior of characters are just a means to doing something else.

    I have rewritten dired to have a dozen or more changes of
behavior, set by switches.  (If you are interested in this code, you
are welcome to it.  It is very variable in quality and is not
adequately documented.)  One of these is the switch
dired-directories-at-top, with the obvious meaning.  My calendar
consists of a directory of years, which are directories of days.  Each
day is a directory of events whose names begin with the times.  Some
of these are plain files; some are directories.  In the day
directories, I don't want to put the directories at the top.  I though
I could achieve this adequately (yes, it is a gross hack and not what
is really needed) by redefining ``f'' to be a function called
dired-find-file-in-future-dir.  I then found that ``f'' took on this
meaning in every dired buffer.

    I have other cases in which I have written a function that changes
the way a directory is displayed (for example comparing file names
numerically rather than as strings) as well as changing the functions
of some characters.  Probably the general form of my question is how
to put a dired buffer in a mode that does not become the mode of all
dired buffers.  I have not explored minor modes and I have don't think
I know the notion of a submode; that word does suggest the right

    Thank you very much for replying.  I have found the responses of
this list very variable.  I have asked questions that are more
interesting, more subtle, and less ignorant than this one, and been
met with silence.


reply via email to

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