nmh-workers
[Top] [All Lists]

Re: folder-specific defaults? [long]

2002-07-03 23:39:44
Jerry Peek <jpeek(_at_)jpeek(_dot_)com> wrote:

Tobias Nijweide wrote:
2 Where do we look for component files:

a - If fixed path (Starting with '/', '~', './' or '../'), only one choice.
b - Current, or selected folder
c - Recursive search upwards from current folder, up to:
d - User nmh directory
e - /etc/nmh (or whatever is the value of nmhetcdir)

I haven't actually tried your code, so I might be on the wrong track 
here... still, I've got some comments about c.  Instead of recursive 
search upwards, can we assume that people who want to use this feature 
would simply make *links* (hard or soft), from whatever folders they 
create, into a master copy (somewhere) of the component files they want 
to use in that folder?

You also have to be careful with the recursive search upwards to watch out
for symlinks. If you have something where your nmh directory is ~/Mail,
but that is really a symlink to somewhere else, then doing ".." from the
actual folder directory will never get you to "~/Mail" because that's a
symlink link (not a directory). You'd need to go upwards just by doing
string manipulations on the directory path string.

It seems to me that a link is a fine way to propagate particular
components files to the folder(s) where they're wanted. Using links
(instead of a recursive search upwards) would also let people *block*
the feature (and use the default components files in the nmh directory,
I guess), in any particular subfolders where they want to.

I agree...it might be nice to only have to create one file, but it's not
that big a deal to create links to it. That's what I've done with that
scan wrapper script that we've been playing with lately. In my +trash
folder, I did this:

   ln -s ~/Mail/scan.trash scan.format

and that scan script picks it up as my default scan format.

Scott


<Prev in Thread] Current Thread [Next in Thread>