Hello Ypnose!
Ypnose <[email protected]> wrote:
|I'm currently "switching" to Albatros release (need to adapt a few lines
Cool.
|inside my mailrc), and I noticed PAGER environment variable isn't "used".
Ooops.?.?
|PAGER is defined in my "${HOME}/.profile" and it was honored in versions
|<14.8.0 without doing something else.
..Yes. No it's not that it is not used, it is that S-nail now
sets some variables so that users will see them when they call
`set':
/* TODO until we have an automatic mechanism for that, set some more
* TODO variables so that users see the internal fallback settings
* TODO (something like "defval=X,notempty=1") */
{
ok_vset(SHELL, XSHELL);
ok_vset(LISTER, XLISTER);
ok_vset(PAGER, XPAGER);
ok_vset(sendmail, SENDMAIL);
ok_vset(sendmail_progname, SENDMAIL_PROGNAME);
}
So you will see the same for any of the variables mentioned here.
It is however and indeed wrong for SHELL, LISTER and PAGER given
that POSIX explicitly mentions them as environment variables [1].
..And of course it should work your way.
(The problem i tried to face with this was a bug report in the Arch
Linux Forum where a user without installed MTA was left in the
forest [2], i.e.
Feb 28 .. /usr/bin/sendmail: No such file or directory
Feb 28 .. ... message not sent.
I have rewritten the manual and the error message would now also
say "executable not found (adjust *sendmail* variable)", but the
problem that remains is that the output of `set' would simply not
include any of the variables above, and `varshow' is S-nail
specific and pretty unknown... And of course you need to *know*
about the variable beforehand...)
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/mailx.html
[2] https://bbs.archlinux.org/viewtopic.php?id=194254
So, damn, yes, this is a bug that i, i think, haven't seen.
But.. i want the real solution as outlined in the comment above
and in more detail in TODO, i.e., a generic approach that flags
variables so that we can (a) provide the user a *complete listing*
of what is in fact the active set of variables, (b) know exactly
where the variable has to come from (POSIX is pretty clear on
that), (c) being able to automatically fall back to the (POSIX
defined) default value for a variable, even if users set and then
unset it, maybe (d) if some special property is matched (e.g, "set
but empty") and (e) without special-casing any such variable, etc.
Also note the above allocates dynamic memory, which has to vanish
completely unless users set values themselves. (Except for
caching purposes, i.e., once we "page-in" a variable.)
|Using the same box with s-nail 14.8.0, it defaults to "more" like the
|manpage says it. Typing set inside s-nail, shows me this output:
|
| PAGER more
|
|In my environment:
|
| $ echo $PAGER
| less
|
|With 14.7.8, here the value:
|
| PAGER less
|
|Using "set PAGER=less" in mailrc do the trick, but it's a bit "dirty"
|to me.
(..Even more horrific is the current handling of USER, TMPDIR and
HOME which the (BSD) codebase copies over into some internal
storage. v14.8 now tracks updates 1:1 instead of letting you set
the value but always using a completely different one. Ok, you
need `setenv' :-/)
|Before I leave, well done for this new release! Now, I'm ready to swim
|outside, "in" the rain.
So, thank you very much for reporting this issue, and to the ML!
I will definitely be fixed in the next version of S-nail.
But -- the right way, once and for all: adjusting a variable in
nail.h:enum okeys as needed, running ./create-okey-map.pl once,
and then having generic code in accmacvar.c that does all of the
housekeeping based on these readonly datasets without anymore
special-casing of variables.
So this will require quite some work. Not now.
But this codepath doesn't clash the v15.0 rewrite, so it seems
there will be a v14.8.x along the way.
P.S.: Sorry for the inconvenience anyway! Of course i can create
a patch that you could use to disable this explicit setting for
SHELL/LISTER/PAGER! Wait, i'll attach it, too.
Ciao, H.
--steffen
diff --git a/main.c b/main.c
index 26270f4..cd87854 100644
--- a/main.c
+++ b/main.c
@@ -317,9 +317,6 @@ _startup(void)
* TODO variables so that users see the internal fallback settings
* TODO (something like "defval=X,notempty=1") */
{
- ok_vset(SHELL, XSHELL);
- ok_vset(LISTER, XLISTER);
- ok_vset(PAGER, XPAGER);
ok_vset(sendmail, SENDMAIL);
ok_vset(sendmail_progname, SENDMAIL_PROGNAME);
}
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
S-nail-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/s-nail-users