If you have a SEARCH with
nonoise="on" header="..." format="..."
, the header is not shown. This is a bug, nonoise should only suppress default noise (search string, total), not explicitely supplied parameters.
--
PTh
Note: this is a symptom of an inconsistency between
noheader
and
header
, which is why the Summary has changed
CC
Hmmm. The doc for
nonoise
(in
VarSEARCH) states:
Shorthand for nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"
So
nonoise="on" header="fred"
should behave as
noheader="on" header="fred"
Putting aside the obvious dilemma,
%SEARCH{"dilemma" topic="Item2692" header="fred"}%
returns
Searched: dilemma
fred
If you have a SEARCH with nonoise `on` header `...` format `...` , the header is not shown. This is a bug, nonoise should only suppress default noise (search string...
Number of topics: 1
and
%SEARCH{"dilemma" topic="Item2692" noheader="on" header="fred"}%
returns
Searched: dilemma
fred
If you have a SEARCH with nonoise `on` header `...` format `...` , the header is not shown. This is a bug, nonoise should only suppress default noise (search string...
Number of topics: 1
i.e. noheader
suppresses
header
. Since
nonoise
implies with
noheader
,
%SEARCH{"dilemma" topic="Item2692" nonoise="on" header="fred"}%
should suppress
header
. In fact it returns:
fred
This is consistent with the behaviour of
noheader
. Discarded.
CC
Re-opening this. Any user who does a SEARCH with
nonoise="on" header="..." format="..."
is surprised that the header is not shown. Please do not close bug because of inconvenience.
--
PTh
I explained in great detail above why I discarded this report. "Inconvenience" has
nothing to do with it. It is all to do with
consistency.
nonoise/header
behaves exactly as
noheader/header
, which is what a user who reads the doc will expect.
I agree that making
noheader
override
header
is a bit nasty; perhaps
header=""
would have been a better option than
noheader
. If you want to deprecate
noheader
, or change the priority of
header
so it overrides
noheader
that's fine by me. Just please try to be consistent.
I changed the headline to reflect that
nonoise
is just a symptom, the cause is the
noheader/header
ambiguity. A fix to this ambiguity will fix
nonoise
for free.
CC
We do not agree on this one. I think, not showing the header with
nonoise="on" header="fred"
is counter-intuitive, and
noheader="on" header="fred"
does not make sense to the average user. Changed subject to reflect that.
--
PTh
I vote for having
nonoise
not remove the header.
AC
I'll try and explain once again. This is
trivial from a code perspective, it is
all about documentation.
nonoise="on"
is documented as "Shorthand for
nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"
". You want to change that to "Shorthand for
nosummary="on" nosearch="on" nototal="on" zeroresults="off" noheader="on" noempty="on"
except if
header
is also defined in which case it's
nosummary="on" nosearch="on" nototal="on" zeroresults="off" noempty="on"
". Sounds very confusing to me.
I quite agree that
noheader="on" header="fred"
does not make sense; that's exactly the point I made above. I invited you to change the function of
noheader
such that it does
not override
header
, which would
also avoid the need to code up a special case for
nonoise
, and would significantly simplify the documentation. For example,
noheader
is documented as "Show search header, unless seach is inline and a format is specified (Cairo compatibility)" (sic), which is not exactly clear or user-friendly.
BTW while you are at it, perhaps you could document the expected behavior of
noheader="off"
.
CC
It was my understanding that new
nonoise
should only create
nosummary="on" nosearch="on" nototal="on" zeroresults="off" noempty="on"
.
AC
No, the idea behind
nonoise
is that it can be used when you simply want a list back from a search that can be used as a parameter to another twikivariable. For that to work, it needs
noheader
.
CC
Since I'm not getting any sensible input on the proposed spec change I went ahead and did it anyway.
header
now overrides
noheader
.
CC
4.1.0 released
KJL