Version: (using KDE KDE 3.2.3) Currently, attempt to open in konqueror url like man: bash (note the space after semicolon!) result in the error claiming that bash is not found in manpath and that manpath can be extended via MANPATH variable setting. It is very confusing, especially considering that for instance on my Debian box MANPATH variable is not used at all (manpath file is in use), so it seems to be reasonable diagnosis. I think that in case user enters 'man: bash', 'info: bash' or something similar, the space should just be ignored and the corresponding man or info page opened. It is natural to use the space in this place. One can also consider improvement of this message in case the page really does not exist (say - man:bashhhh), so it accomodates situations when manpath is in use, not MANPATH.
I can fix that for man if you promise not to report a bug that http:// www.kde.org is not rendering kde's web page
Additional remark: I noticed when I started using 'man: blah' syntax frequently - it happened just when I got used to using 'gg: something' as shortcut to google search. As for the method of solving this bug, I would prefer 'man: ls' to present the correct manpage but if for some reason you dislike it, good error message ('unexpected space in the url, do you want man:ls ?') is acceptable too.
Little question: you tell that the file is called manpath; however kio_man processes the file /etc/manpath.config for Debian. Should that be fixed too? Have a nice day!
No, /etc/manpath.config is used on Debian too.
SVN commit 415698 by goutte: Better error when the man page is not found. (The idea is that a (newbie) user does not start to fix its MANPATH when the problem might only be a typo.) CCBUG:94095 M +6 -1 trunk/KDE/kdebase/kioslave/man/kio_man.cpp --- trunk/KDE/kdebase/kioslave/man/kio_man.cpp #415697:415698 @@ -444,7 +444,12 @@ bool pageFound=true; if (foundPages.isEmpty()) { - outputError(i18n("No man page matching to %1 found. You can extend the search path by setting the environment variable MANPATH before starting KDE.").arg(title)); + outputError(i18n("No man page matching to %1 found.<br><br>" + "Check that you have not mistyped the name of the page that you want.\n" + "Be careful that you must take care about upper case and lower case characters!<br>" + "If everything looks correct, then perhaps you need to set better the search path " + "for man pages, be it by the environment variable MANPATH or a matching file " + "in the directory /etc .").arg(title)); pageFound=false; } else if (foundPages.count()>1)
Just a question about comment #2 (but one that I have since I know this bug): why do you not use gg:something to search in Google. Therefore every URL in KDE would be of the same type: protocol:where Have a nice day!
Would you mind adding adding title=title.stripWhiteSpace() in kio_man.cpp parseUrl() ??
One additional remark: note that in case of extra leading (or trailing) space the error message (both old and new) DOES NOT SHOW this space. For HTML presentation 'No man page matching bash' and 'No man page matching bash' are displayed in exactly the same way. Therefore it could make sense to quote non-found page or do sth similar. And, I still think that stripping whitespace before searching for the manpage would be the best way. What do the user who typed 'man: bash' want to see? He wants to see bash manpage. So why bother him with error messages if we can easily show him what he wanted to see....
SVN commit 1212148 by mkoller: BUG: 94095 trim white space around the given URL so that "man: bash " also shows the bash man page. Also use Qt's internal Qt::escape instead the self brewn one M +3 -14 kio_man.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1212148
SVN commit 1212151 by mkoller: Backport r1212148 by mkoller from trunk to the 4.6 branch: CCBUG: 94095 trim white space around the given URL so that "man: bash " also shows the bash man page. Also use Qt's internal Qt::escape instead the self brewn one M +3 -14 kio_man.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1212151