dave@csd4.milw.wisc.edu (David A Rasmussen) (02/02/88)
I would like to configure elm to have certain elmrc variables set such that people don't need their own .elmrc. Basically I want weed=off and alwaysleave=on (and anything else that comes to mind). I didn't see a place in the header files to do this, although being kinda groggy today I may well have missed this. Can anyone enlighten me? Dave Rasmussen c/o Computing Services Division @ U of WI - Milwaukee Internet: dave@csd4.milw.wisc.edu Uucp: uwvax!uwmcsd1!uwmcsd4!dave {o,o} Csnet: dave%uwmcsd4@uwm Bellnet: +1 (414) 229-5133 \u/ ICBM: 43 4 58 N/ 87 55 52 W Usnail: 3200 N Cramer #E380, Milw WI 53211
taylor@hplabs.HP.COM (Dave Taylor) (02/02/88)
David Rasmussen asks about changing the default values of various options within Elm for the entire user community. The easiest way to do this is to; 1. figure out what elmrc variable corrresponds to what actual variable in the program 2. change the default accordingly. The two files in question are ``src/read_rc.c'' for step 1, and ``hdrs/elm.h'' for step 2. Let's look at a few examples: To change "weed" to be OFF by default: % cgrep '"weed"' src/read_rc.c -------- } else if (equal(word1, "weed")) { filter = is_it_on(word2); % grep filter hdrs/elm.h int filter = 1; /* flag: weed out header lines? */ To change the default - this is where to go. For "alwaysleave": % cgrep '"alwaysleave' src/read_rc.c -------- } else if (equal(word1, "alwaysleave") || equal(word1, "leave")) { always_leave = is_it_on(word2); % grep always_leave hdrs/elm.h int always_leave = 0; /* flag: always leave msgs pending? */ We can see that it defaults to FALSE. Does this make sense? Would an easier way of setting these defaults be worth the effort? If so, how would you like to see it done? --- Dave Taylor ps: Thanks to my collegue Tai Jin for the `cgrep' command....