KNEWS(1)
KNEWS π knews β Karl's threaded newsreader for X ποΈβ¨
okay bestie, buckle up, this is the manual for knews, section 1 of the general commands manual. it's giving very thorough, so grab a snack π
β¨ NAME β¨
knews β Karl's threaded newsreader for X π¦
β¨ SYNOPSIS β¨
knews [ options ]
β¨ DESCRIPTION β¨
so like, Knews is a threaded newsreader with an X Window interface that uses NNTP to get news π
this manual is here to explain the stuff that isn't obvious just from looking at the interface. so if you're just trying to get started, you honestly probably don't need to read this whole thing, no cap. but if you're the type who reads the docs for fun (main character energy, respect π«Ά), keep going.
β¨ OPTIONS β¨
on top of the standard X Toolkit options, knews also accepts these options, which set various X resources. for what each resource actually does, go check the sections on resources and the config file, bestie.
lowkey clutch: you don't have to type out the entire name of the option, as long as what you typed is unique. abbreviate away π
-nntpServerhostname β sets the resourceKnews.nntpServerto hostname. this will cause knews to connect to this server on startup π+/-bellβ sets the resourceKnews.belltoTrue/False.+/-separateβ sets the resourceKnews.separateWindowstoTrue/False.+/-activeβ sets the resourceKnews.readActiveFiletoTrue/False.+/-descriptionsβ sets the resourceKnews.retrieveDescriptionstoTrue/False.+/-fillβ sets the resourceKnews.fillNewsrcFiletoTrue/False.+/-keepβ sets the resourceKnews.keepThreadInfotoTrue/False.-installβ this will make knews install its own colormap π¨-visualclass β sets the resourceKnews.visualClass.-depthbits β sets the resourceKnews.visualDepth.+/-icaseβ will set the resourceKnews.icaseRegexpstoTrue/False.+/-imagesβ this will turn on/off inline images and color allocation πΌοΈ-ncolsnumber β sets the resourceKnews.nColsto number, which is the max number of colors knews will allocate for inline images.-versionβ prints out the version and compile time to stderr and quits π
β¨ THE THREAD TREE β¨
the articles in a thread are displayed as nodes in a tree π³ (iconic, we love a hierarchy).
- a border inside a node β that article is unread π
- a border outside a node β the article is 'tagged' π·οΈ
- a dashed branch in the tree β there's been a change of subject π
by default, you can scroll around in the tree with the middle mouse button.
an empty box in the tree means it's a 'fake' article β i.e. one that has expired on the server, hasn't arrived yet, or was posted in a different newsgroup. it's giving ghost π»
β¨ TAGGING ARTICLES β¨
articles in the thread tree can be tagged with the third mouse button π±οΈβ¨
clicking on a subject with the third mouse button causes the unread articles in that thread to be tagged in preorder (depth first).
once you've tagged the articles, you can mark them read/unread, save or pipe them in order, and so on. periodt. π
β¨ CLICKING ON URLS β¨
Knews supports a simple form of clicking on URLs π
the way it works: you select a piece of text in the article text window and click on it with the middle mouse button. if there's no selection, knews will make a crude guess as to what the URL might be π (we respect the confidence).
the resource Knews.urlCommand must be set for this to work β see the section on X resources for details.
β¨ DRAG AND DROP β¨
the all groups list and the kill list can be reordered by drag'n'drop π«³π«
the default translation is the second mouse button.
β¨ ABORT β¨
you may abort the interaction with the NNTP server at any time β
this causes the connection to be closed, and a new one to be opened.
β οΈ heads up bestie: note that this puts a certain load on the server. be nice to the server, she's doing her best π₯Ί
β¨ THREAD AHEAD β¨
Knews is capable of threading groups in the background while you're, like, reading another group. multitasking queen π
to do this, you click on one or more groups in the group list with the right mouse button. Knews then opens a second connection to the server and uses it to thread the selected groups.
the status of the thread ahead is shown in the group list as a character:
-β the group is scheduled for thread ahead.*β the group is being threaded.+β the group has been threaded.
β¨ REGULAR EXPRESSIONS β¨
the regular expressions used by knews are POSIX.2 extended regular expressions, similar to those used by egrep(1), and by default case insensitive.
β οΈ note that these are not anchored by default, so that e.g. the expression'alt'will match any string containing the three character sequence'alt'.
see Henry Spencer's excellent man-page for details, regex(7) π
β¨ SEARCHING β¨
article heads and bodies may be searched for regular expressions π
searching applies to read or unread articles as specified with the 'only unread' toggle, and starts with the 'next' article.
the newsgroup list may also be searched. π«
β οΈ Note: the 'Stop' button stops the search as soon as the current article has been retrieved from the server. this is different from 'Abort', which requires closing and reopening the connection to the server.
it's also possible to use XPAT searching, if the nntp server supports it. to do this, you fill in the 'Header' field on the search popup with the header you're interested in (e.g. 'Content-Type') and the wildcard field with a wildcard expression. pressing 'Submit' then sends this to the server, and after a while it responds with a list of matching articles. you can then move between those articles with the 'Next' and 'First' buttons on the search popup. slay π
β¨ FILE NAME EXPANSION β¨
in most places where knews uses file names β like the save/pipe popup, the save/pipe action procedures, and the newsrcFile options etc β ~ is expanded to $HOME, and the following %'s are expanded:
%%β%%nβ the name of the current group.%Nβ the name of the current group, capitalized.%gβ the name of the current group, slashed.%Gβ the name of the current group, capitalized and slashed.%sβ the name of the nntp server.%pβ the number of the port the server listens to.%aβ the number of the currently selected article.
Slashed means that the dots are replaced with slashes.
β οΈ note that if you save an entire thread to a file containing %a, the number will not change with the article. it's just like that fr fr π
β¨ THE KILL FILE β¨
the kill file may be used to 'kill' (mark read) or 'hot' (mark interesting) articles, subjects and threads based on different criteria πͺπ₯
each line in the kill file specifies an entry according to the following syntax:
(F)(S)(A)[Col] || Group regexp || Field expression
(F)
this is a character specifying to which header this entry applies. legal values are:
'M'β the'Message-ID:'header, by far the most efficient.'S'β the'Subject:'header.'F'β the'From:'header.'X'β the'Xref:'header.
β οΈ note that'X'only works if the'Xref:'header is included in the overview files from the server. also note that the'Re: 'prefix is not considered part of the subject.
entries applying to a message-id automatically expire when the relevant article has expired. bye π
(S)
this is a character specifying the scope of the entry, i.e. what articles are killed/'hotted' when this entry applies to an article. legal values are:
'A'β this article.'S'β all articles with the same subject.'T'β the entire thread.'t'β the subthread starting with this article.
(A)
this is a character specifying the action of the entry. legal values are:
'K'β Kill, which means mark read.'H'β Hot, which means mark interesting.
[col]
in 'hot' entries, this is the color used to mark the relevant articles with π
||
this two character sequence is used as a separator.
Group regexp
only newsgroups matching this regular expression will be affected by this entry. this field is empty in the per-group kill files.
Field expression
if the header field is 'S', 'F' or 'X', this is a regular expression, and the entry applies to all matching articles.
if the header field is 'M', this is a message id; this id is probably the fastest type of kill entry, since it can be checked with a single hash lookup β‘
to see what articles were killed: when you have read all unread articles, or marked them read, use the 'mark unread, killed' feature on the misc menu. π΅οΈβοΈ
when a kill rule is applied, hot articles are not killed π₯β‘οΈπ
since the entries in the kill file are processed in order, it's possible to put kills at the beginning, so that the articles are killed before they have a chance to become hot. strategic π
there is one global kill file (~/.knews/.kill-%s by default) and one kill file per group (~/.knews/%s/%g/KILL by default). the rules in the global kill file are applied before the per-group kill file. order matters bestie π
β¨ MIME VIEWERS AND MAILCAP FILES β¨
Knews has internal support for these content-types: text/plain, message/rfc822, message/partial, multipart/mixed and multipart/digest π
for other types, knews will look for a mailcap entry for that type (see mailcap(5)). if one is found, a clickable line will be inserted in the article text window that is used to start the viewer π±οΈβ¨
if there is no viewer, then:
- if the type is a subtype of
text, knews will display it. - if it is a subtype of
multipart, knews will treat it asmultipart/mixed. - otherwise, knews will give the user opportunity to 'Save or Pipe'.
mailcap files are found via the environment variable MAILCAPS, which is a colon separated list of path names. if this variable is not set, a default list of
$HOME/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
will be used.
β οΈ note that all files found will be merged to produce the mailcap database.
as a hack around miss/over designed mailcap files, knews will ignore entries for text/plain and multipart/mixed. we said what we said π
(more coming bestie, don't go anywhere π)
TEXT/PLAIN ARTICLES β the vibe check for plain ol' text π
okay so when knews is staring at an article of type text/plain with some specific charset, these are the resources that decide how it gets served up to your eyeballs:
Knews.charset.headerFontKnews.charset.bodyFontKnews.charset.quoteFontKnews.charset.listFontKnews.charset.treeFontKnews.charset.encodingKnews.charset.headEncHack
The header, body and quote fonts are the ones doing the heavy lifting for headers, regular text and quoted text inside the article window. iconic trio tbh π
Knews also has some support for encoded 16-bit charsets, and that's where the encoding resource comes in. Legal values are, no cap:
utf-7β the encoding specified for unicode in rfc 1642.16-bitβ straight 16-bit network byte order.hz-gb-2312β the encoding for chinese described in rfc 1842.ksc-5601β also callediso-2022-kr, described in rfc 1557.big5β another encoding for chinese.
heads up bestie β due to the author's non-existent understanding of asian languages, these encodings have not been extensively tested. Lots of guess work here. π fr fr, they said it themselves.
For every single newsgroup you can specify a default charset (peep the section on THE CONFIG FILE). The fonts for that charset get used to display articles that are out here with no proper MIME-headers. Also, the listFont and treeFont (which may not be encoded) get used in the thread list and the article tree respectively. πΈ
When you're specifying an encoded charset as defaultCharset, it might still be a whole vibe to assume the headers are ascii. You pull that off by setting the headEncHack resource up there β¬οΈ, and setting the headerFont to an ascii (superset) font. π
MESSAGE/PARTIAL β putting the pieces back together π§©
Unless the config option assemblePartials is False (again, see THE CONFIG FILE), when knews runs into an article of type message/partial, it will be rememberered. π (yes, "rememberered", that's the manpage's spelling and we respect the icon's choices)
Once all the parts have been seen, a notice pops up offering to assemble the parts. it's giving puzzle completion energy β¨
There's also an entry on the misc menu that lets you tag a bunch of articles and process them to look for message/partial articles. π¦
POSTING MIME β when your post is a lil extra π
When you post an article that's carrying 8 bit characters but has no Content-Type header, knews will add one for you, with charset equal to the value of the defaultCharset config option. Slay, it's got you. π
Also, when quoting articles that have Content-Type: text/plain and charset equal to the defaultCharset, knews will decode the article before quoting it. π₯
And in both of those contexts, the charset iso-8859-1 will be used if defaultCharset is not set. β
READING THE SPOOLDIR β the obscure secret menu π
Knews supports a rather obscure mechanism for communicating with an arbitrary program instead of an nntp server. iykyk. π€«
Using knewsd(1), this can be used for reading news (in)directly from the spool dir, or even mail folders if they're in the correct format. π
Here's how it works: if the nntp server is given as #str, where str is an arbitrary string not containing white space or the characters '/', '.' or '*', knews finds the value of the resource Knews.#str and tries to execute that program. The program has its standard input and output connected to knews. π«Ά
If you use this resource setting:
Knews.#spool: knewsd -spool /var/spool/news \
-active /usr/local/news/active
with the appropriate paths for your system, you can read the spool directory by specifying the nntp server as '#spool' in e.g. the connect dialogue. π
This could easily be used to read mh(1) style mail folders too. versatile queen behavior π
β¨ X RESOURCES β¨
okay so bestie, there are a ton of X resources that control how knews looks and acts. Almost every widget in the widget hierarchy has the usual suspects β background, foreground, shadowWidth, and so on. For the full tea, go look at the application defaults file Knews.ad that ships in the distribution. And if you wanna feel the resources in your soul, try editres(1). π
Alsooo, knews has a tiny little xpm-file-to-pixmap converter built in, so you can totally do settings like this:
Knews*backgroundPixmap: ~/pixmaps/texture.xpm
Knews.nntpServerβ set this and knews automatically connects to that nntp server on startup. This overrides theNNTPSERVERenvironment variable. If your server listens on a non-standard port, you can say so likefoo.bar:1234. And if you do not want knews to autoconnect, just don't set this β or$NNTPSERVER. simple as that πKnews.editCommandβ this is the editor used to edit posts. Possible values include:
Knews.editCommand: xemacs +%i %s
Knews.editCommand: emacs +%i %s
Knews.editCommand: xterm -e vi +%i %s
%s stands for the name of a temporary file, and %i for the line where editing should begin. The default value of this resource is a compile time option. π
Knews.urlCommandβ the command used for clicking on URLs.%sgets expanded to the URL, and the whole thing gets passed to the shell. As a simple security measure, URLs will not be allowed to contain quotes, parentheses, whitespace or ampersands. (she's got boundaries, respect them π«Ά)Knews.printCommandβ if this resource is set, the misc menu will have a print option which invokes this command.Knews.needsTerminal,Knews.copiousOutputβ these are two shell command templates used for mailcap viewers that have theneedsterminalor thecopiousoutputflag set, respectively. In these,%Cwill be expanded to the relevant mailcap command. An example should explain it:
Knews.needsTerminal: exec xterm -e /bin/sh -c '%C'
Knews.copiousOuptut: exec xterm -e /bin/sh '(%C) | less'
Knews.mimeTypesβ this should point to a file whose contents map filename extensions to mime types. The syntax of this file is examplified by the following list of compiled in types:
image/jpeg jpg jpeg
image/gif gif
application/postscript ps
This is used to guess the Content-Type of attachments. πΈ
Knews.bellβ set it toFalseand the bell goes bye-bye. πKnews.sortGroupsβ set it toTrueand knews keeps newsgroups alphabetically sorted when new groups are subscribed. organized queen energyKnews.separateWindowsβ set it toTrueand knews will use a different top level window for the article text widget.Knews.stderrTimeoutβ when knews starts a pipe or similar, it captures the standard error output and displays it in a notice popup. This resource is the time in milliseconds that popup should stay up. The default is10000. Setting this to0means stay up indefinitely, and negative means no popups.Knews.showCacheβ if this isTrue, knews will show the state of the article caches in a small popup. See the config optionscacheAheadSizeandcacheTrailSizefor details. πKnews.mailNameβ if you have a mail address which isn't of the form'userid@domain.name', you can set this to the part of the address that goes before the'@', e.g.
Knews.mailName: FirstName.LastName
Note that your userid will still be used for the 'Sender' header if necessary.
Knews.useIconβ if this is set toTrue(which is the default), knews will use an icon. πKnews.confirmQuitβ set it toTrueand knews asks for confirmation before disconnecting or quitting. no accidental rage-quits bestie πKnews.confirmCatchupβ set it toTrueand knews asks for confirmation before catching up a group.Knews.confirmQuitGroupβ set it to'True'and knews asks for confirmation before leaving a group. Set it to'tagged'and knews asks confirmation when exiting a group if there are tagged articles.Knews.visualClassclass,Knews.visualDepthbits β if these are set, knews will use a visual of the specified class and depth. Typical values for depth are8or24. Legal values for class are'StaticGray)','GrayScale','StaticColor','PseudoColor','TrueColor'and'DirectColor'. The depth will be ignored if no class is specified. π¦Knews.installCmapβ if this is set toTrue, knews will create its own colormap.Knews.inlineImagesβ this boolean resource turns on/off inline images and color allocation. Knews can showjpeg,gifandpngimages (if compiled with support for this). π₯Knews.nColsβ this is the maximum number of colors knews will allocate for inline images. The default is137(17 greys and a 5x5x5 color cube minus the 5 greys in that cube).Knews.colorHackβ if this is set toTrue, knews tries to allocate the same colors as other programs have already allocated, thus increasing the chances for color sharing. The number of colors is controlled by the resourceKnews.nCols.
π¨ the color, font & geometry glow-up zone
The following resources can be used to change various color, font and geometry settings:
Knews*grouplist.preferredLines,Knews*grouplist.preferredColumnsβ these specify the number of lines and columns the grouplist widget will start up with. The default is14for lines and84for columns.Knews*text.preferredLines,Knews*text.preferredColumnsβ these specify the number of lines and columns the article text widget starts up with. The default is32for lines and84for columns.Knews*ArtTree.nodeColumnsβ the width of the nodes in the article tree in characters. The default is16.Knews*rubberColorβ the color used for rubberbanding in one or two widgets. The default isred. β€οΈKnews.headerColor,Knews.bodyColor,Knews.quoteColorβ the colors used for headers, ordinary text and quoted text respectively in the article window.Knews*innerColor,Knews*innerDashedβ the color and line style used for the border of unread articles in the article tree. The defaults areRedandFalse.Knews*outerColor,Knews*outerDashedβ the color and line style used for the border of tagged articles in the article tree. The defaults areforegroundandFalse.Knews*ScrList.fontβ the font used in the lists.Knews.defaultHotColorβ the color used for hot entries in the kill file when the specified color is invalid or cannot be allocated.
π§ some miscellaneous resources
Knews.icaseRegexpsβ set this toFalseand regular expressions become case sensitive. They are case insensitive by default.Knews.readActiveFile,Knews.retrieveDescriptions,Knews.fillNewsrcFile,Knews.showNumberLines,Knews.keepThreadInfo,Knews.checkForNewGroupsβ these set the default values for the corresponding configuration options. Their main purpose is to allow command line arguments. Read the section on the config file for details. πKnews.newsrcTemplate,Knews.oldNewsrcTemplateβ these set the default values for the configuration optionsnewsrcFileandoldNewsrcFile; the default values are~/.newsrc-%sand~/.oldnewsrc-%s. A value not containing%swill not be accepted; if you want the traditional~/.newsrcfor a particular server, see the resourceKnews.configNntpServerbelow. βKnews.killFileTemplateβ this sets the default value of the config optionkillFile. The default value is~/.knews/.kill-%s.Knews.groupKillFileTemplateβ this is the template for the per-group kill file. The default is~/.knews/%s/%g/KILL, so that e.g. the newsgroupnews.software.readerswill have~/.knews/%s/news/software/readers/KILLas kill file, where%sis the name of the server, as usual.Knews.configFileβ the configuration file used by knews. The default value is~/.knews/config-%s; a value not containing%swill not be accepted. π¨Knews.configNntpServer,Knews.configPostingAgentβ settingconfigNntpServerwill make knews Do The Right Thing when the user first connects to this server, which means setting the newsrc file for this server to~/.newsrcwhen creating the config file.
If the configPostingAgent is set, this will be used for the postingAgent config option for the configNntpServer.
Knews.generatePathβ if this is set toTrue, knews will generate a Path header for articles. The header will be'Path: d!u'wheredanduare such that the From header generated by knews would be'From: u@d'.Knews.autoSubscribeβ the value of this resource will be used when creating a new newsrc file. If it starts with a'/', it is taken as a pathname of a file whose contents will be inserted into the new newsrc file; otherwise the literal value of this resource will be inserted into the newsrc file. The default value is
news.answers:\nnews.newusers.questions:\n
Knews.bogusFileSystemβ when knews checks for new groups, it uses the atime (time of last access) of the config file. Some filesystems (e.g.AFS) have no concept of atime, but fakes it with mtime (time of last modification) instead. Setting this resource toTruewill make knews forcibly update the mtime of the config file. π
βοΈ THE CONFIG FILE βοΈ
When knews connects to an NNTP server it reads a configuration file that will affect its behavior. This file is by default called ~/.knews/config-%s where %s expands to the name of the server β but this may be changed with the Knews.configFile resource. π
The syntax of the config file is the same as for X resource files. And when knews can't find the configure file, a new one will be created containing some default settings and a few examples settings that should be sufficient to clue you in as to how it works. she's got you, bestie π
okay so first thing first β you can use #include statements in the config file to pull in other files π. Relative pathnames are considered relative to the current working directory, which for knews is always $HOME. And no, ~ pathnames are not handled in #includes (if you want that you have to hack Xlib π β iconic honestly).
π the global (i.e. per server) options
newsrcFile,oldNewsrcFileβ these two tell knews which newsrc file and oldnewsrc file to use for this server.~pathnames and the same%expansions as for saving are handled, no cap. Ifoldnewsrcis set to an empty string, no backup of the newsrc file will be created (it's giving "living dangerously" energy π).
The default values for these are the values of the resources Knews.newsrcTemplate and Knews.oldNewsrcTemplate, whose default values are ~/.newsrc-%s and ~/.oldnewsrc-%s, respectively.
For a way of automatically using the standard file ~/.newsrc for a specific server, see the resource Knews.configNntpServer above π.
killFileβ the kill file, bestie. The default value is the value of the resourceKnews.killFileTemplate, whose default value is~/.kill-%s. πcacheDirβ this directory is used for storing cached articles and thread data for groups. The default is~/.knews/cache-%sβ¨.readActiveFileβ setting this toFalsewill stop knews from reading the active file when connecting, using the groups in the newsrc file instead. This will speed up connection on slow lines if you don't have too many subscribed groups. The default is the value of the resourceKnews.readActiveFile, whose default isTrue.retrieveDescriptionsβ a boolean option indicating whether to retrieve newsgroup descriptions from the server. The default is the value of the resourceKnews.retrieveDescriptions, whose default isTrue. Setting this toFalsemay slightly speed up connection time.descriptionsFileβ if this is set, the given file will be used to cache group descriptions: whenretrieveDescriptionsisTrue, knews saves the descriptions to this file, and whenretrieveDescriptionsisFalse, knews reads descriptions from this file instead of from the server. Cute, right? π¦fillNewsrcFileβ setting this toTruewill make knews write all groups it knows about to the newsrc file, which may be a good idea if the optionreadActiveFileis set toFalse. The default is the value of the resourceKnews.fillNewsrcFile, whose default isFalse, which means only put information in the newsrc file.tryListActiveβ when this isTrue(the default) andreadActiveFileisFalse, knews will try the"LIST ACTIVE wildmat"nntp extension. If this fails knews will complain and fall back to the old"GROUP"stuff π.checkForNewGroupsβ this is a boolean option indicating whether to check for new groups when connecting to this server. The default isTrue. The atime (time of last access) of the config file will be used for the check.threadAheadGroupsβ this is a white-space separated list of groups to be automatically scheduled for thread ahead when connecting. The special values'all'and'All'may be used to designate all subscribed groups with unread articles and all subscribed groups, respectively π.saveThreadInfoβ setting this toTruewill allow 'thread ahead' data to be saved between sessions: knews will not remove the files with this data when quitting, and when connecting knews will check for these files for all subscribed groups. If this is set, the optionsthreadAheadGroupsandkeepThreadInfowill be ignored π.rescanTimeoutβ this indicates the time in minutes between automatic rescans. The default is60minutes,0means no automatic rescans. Regardless of this, rescans will only be performed at special points, to prevent a 'rescan-idle-rescan' loop.groupNameColumnsβ the width of the group name in the group list, default is42.askHowManyβ setting this toTruewill make knews ask at which article the threading of a group should start. A hack. That's it, that's the description π .postingAgentβ if this is specified, knews will use this for posting, instead of posting via NNTP. If your server requires some kind of authentication that only inews understands, you could set this to'inews -h'. Note that inews appends the signature, so you don't want knews to add one too π.
Also see the resource Knews.configPostingAgent above.
authInfoPass,authInfoUserβ these are used to implement the NNTPAUTHINFO USER/PASSprotocol if required by the server. These exist mostly for backward compatibility; authentication is usually only required when posting, and then it is better to use inews forpostingAgent, since presumably inews knows all about the required authentication.
Here's an example of some settings that will improve things over a slow network connection, and it ate:
readActiveFile: False
retrieveDescriptions: False
descriptionsFile: ~/.knewss/cache-%s/descriptions
fillNewsrcFile: True
hmm wait, that's not quite it β here's the real one, verbatim:
readActiveFile: False
retrieveDescriptions: False
descriptionsFile: ~/.knews/cache-%s/descriptions
fillNewsrcFile: True
but note that you will probably want to read the active file and group descriptions at least the first time you connect to a server π«Ά.
π the per group resources
The following resources may be set on a per group basis; they should be prefixed with the name of the group they apply to.
keepThreadInfoβ this tells knews whether to keep thread information in memory after the group is exited. This will make reentering the group fast β‘. Legal values are:True,SubscribedandFalse.'Subscribed'means only do it if the group is subscribed, and exists to allow settings such as:
*keepThreadInfo: Subscribed
to keep thread info for all subscribed groups. The default value for this option is 'Subscribed' if the resource Knews.keepThreadInfo is set to True and 'False' otherwise.
cacheAheadSize,cacheTrailSizeβ these two set the sizes of the two article caches, the defaults are0. The 'ahead cache' is used to prefetch articles from the server in the background using a second connection. The 'trail cache' is used to keep articles that you have already read, so that going back, saving or uudecoding will be faster. The maximum values for these are32. No cap on the cap... wait, yes there is, it's32π.sortThreadsβ this indicates how the threads should be sorted. A thread consists of several subjects. These are sorted within the thread according to the order they occur. Then the threads are sorted according to the setting of this option. The legal values and their meanings are:subjectβ alphabetically by the first subject in the thread.sizeβ number of unread articles in the thread.full-sizeβ number of articles in the thread.hotβ number of hot articles in the thread.dateβ the date of the first unread article.average-dateβ the average date of unread articles in the thread.authorβ alphabetically by the firstFrom:line in the thread.noneβ no sorting.
All these values may be prefixed with a minus sign to indicate a reversal of the order, or a plus sign which is a no-op. The default value is none.
expireKillsβ setting this toFalsewill stop expirations from the kill file. The default isTrue, which means that Message-id kills will expire when you enter a group where the kill entry would have been applicable, but the article with that message-id was not found.attributionβ this string is used to attribute quotations when you post a followup. The default is
In article %m,\n %f writes:
where \n is a newline. The following %'s are expanded:
%%β%%dβ the date of the quoted article in the form01 Jan.%fβ theFrom:line of the article replied to.%iβ the initials of the previous poster.%Iβ the initials of the previous poster, capitalized.%mβ the message-id of the article replied to.%nβ the current newsgroup.%rβ the real name of the previous poster.%sβ the subject of the quoted article.%tβ the time of the quoted article in the form18:24:02.%wβ the week day of the quoted article.%yβ the year of the quoted article.
Thus '%w, %d %y %t GMT' will give the date in standard rfc822 format β¨.
fullNameβ this is the full name used in the'From:'header in the articles you post. The default is$NAME, if set, otherwise the gecos field from the password file, suitably truncated.headerFormatβ a colon and white-space separated list specifying which headers to show in the article window, and in what order. The default is
Subject:Newsgroups:Followup-To:Reply-To:\
Content-Description:Date:Organization:From:
If the name of the header starts with a capital letter (From: as opposed to from:), knews will decode rfc1522 encoded words encountered in this header. (Those are the weird things that look like =?iso-8859-1?q?stuff_here?=.) Encoded 16-bit charsets are not decoded in headers yet π.
assemblePartialsβ this boolean tells whethermessage/partialarticles will be remembered and offered for assembly.quoteRegexpβ lines in an article matching this regular expression will be considered quoted lines, and may be marked with a different color and font. The default is
^[ \t]*[:>|]
which matches lines beginning with an arbitrary amount of white space (the \t denotes a tab, note that \t won't actually work) followed by a >, : or | character.
You will probably want to have this expression anchored... π
defaultCharsetβ the fonts for this charset will be used to display articles that lack MIME-headers. If this is not set,us-asciiwill be assumed.
Also, rfc1522 encodings of this charset in the From and Subject header will be decoded when displayed in the article tree and the thread list. In this case, iso-8859-1 is the default.
showNumberLinesβ a boolean option indicating whether to show the number of lines in articles in the thread tree. The default is the value of the resourceKnews.showNumberLines, whose default isFalse.signatureFileβ bestie, the contents of this file will be used to sign the articles you post (before editing, obvs). Default is~/.signature. πsubjectColumnsβ the width of the subject in the thread list. Default is56. β¨quoteString,quoteQuoteStringβ these strings are used for quoting when posting a followup article. The first one quotes lines that were not quoted in the original article, and the second one is for lines that were already quoted. What lines are considered quoted is determined byquoteRegexp. The defaults are"> "and">"respectively. In these strings,%iis expanded to the initials of the previous author and%Ito the initials, capitalized. πpostedAndMailedβ this string will be inserted into articles that are also mailed to the previous author. Default is"[posted and mailed]". π¦distributionβ if this is set, it will be used as the content of a'Distribution'header. The default value is the value of the environment variableDEFNEWSDISif set, otherwise empty. πΈfullHeaderβ a boolean specifying whether to show all headers in the article window. It also means turn off all MIME transformations. Default isFalse. πreplyToβ a string used to construct the'Reply-To:'header in the articles you post. The default is the value of the environment variableREPLYTOif set, otherwise empty. π«Άorganizationβ a string used to construct the'Organization:'header in the articles you post. The default is$NEWSORGif set, otherwise$ORGANIZATIONif set, otherwise nothing. πprocessXrefsβ if this boolean isTrue, as it is by default, articles that are crossposted will be marked read in all groups when you read them, mark them read, kill them or catch them up. Note that this only applies to subscribed groups, and will only work if the server's overview file contains theXref:headers. π₯extraHeadersβ this string is inserted into the head of all articles you post (before editing). Default is empty. This could be used to put in Mime headers, like this:
*extraHeaders: Content-Type: text/plain; charset=iso-8859-1
followupHeadersβ this is a combination ofextraHeadersandattribution: it is inserted in the headers of replies and followups and the same%'s as inattributionare expanded. An example:
*followupHeaders: X-Comment-To: %r
uuDirβ uudecoded files will end up in this directory. Or rather, the forked off uudecoding process will be given this as its current working directory. Default is~/News. πuuProgramβ this program will be used to uudecode files: it will be given the bodies of the relevant articles on standard input. Default isNULL, which means that knews will do its best to filter out garbage and then pipe the rest to'uudecode'. π
Here is an example of how to set different signatures for different newsgroups:
swnet*signatureFile: ~/.signature-svensk
de*signatureFile: ~/.signature-deutsch
*linux*signatureFile: ~/.signature-linux
The first sets the file ~/.signature-svensk for all groups in the swnet hierarchy, the second one sets the file ~/.signature-deutsch for the de hierarchy, and the last one sets the file ~/.signature-linux for any group containing linux as a component (not merely a substring). The file ~/.signature will be used for all other groups.
β¨ ACTIONS β¨
Knews defines a number of actions that can be tied to keys and buttons via translations. For the default translations, see the application defaults file.
do-the-right-thing()β does the right thing. πkill-append(field, scope [, color]),kill-prepend(field, scope [, color])β these action procedures append and prepend respectively entries to the kill file for the current group according to the currently selected article.
Valid values for the field parameter are "From", "Subject" and "Message-Id", and valid values for scope are "Thread", "Subthread" and "Subject". If the color parameter is present, the entry added is a hot-entry with that color, otherwise it is a kill-entry.
It is probably a good idea to use these with field = "message-id", since message-id kills are very efficient and expire with the corresponding article.
popup-kill([group])β this will popup a kill file editor for the supplied group. If no group is given, the editor for the global kill file is popped up. πmime-hack(content-type, content-transfer-encoding)β this action procedure reloads the current article, pretending it had the specifiedContent-TypeandContent-Transfer-Encodingheaders. For examplemime-hack(image/jpeg, uue)reloads the current article pretending it hasContent-Typeimage/jpegand is uuencoded, thus making knews display it as an inline image.
The default key-bindings have the following:
ctrl-J mime-hack(image/jpeg, uue)
ctrl-G mime-hack(image/gif, uue)
ctrl-P mime-hack(image/png, uue)
tree-up(arg),tree-down(arg),tree-left(arg),tree-right(arg),tree-down-right(arg)β these move around in the thread tree. If theargis'read', they will also read in the relevant article, ifargis'fake', they will also try to read'fake'articles. π³list-up(arg),list-down(arg)β these move up and down in the lists. Ifargis given, it is the number of steps, or if it contains a., the fraction of the window to move. πenter-mode(),exit-mode()β these two actions moves between modes. πͺtree-or-list-up(arg),tree-or-list-down(arg),tree-left-or-exit-mode(arg),tree-right-or-enter-mode(arg)β these are combination actions. E.g.tree-or-list-up(arg)doestree-uporlist-up(1), depending on which is relevant. π§read-article(arg)β this rereads the current article. Ifargis given, the article is displayed with full header and no MIME transformations. πview-thread(arg)β this moves between the subject list and the thread tree. Ifargis'toggle', it toggles, ifargis'yes'it goes to the tree, and ifargis'no', it goes to the subject list. πfollowup(arg),reply(arg),followup-and-reply(arg),post-new()β these correspond to the options on the post menu. Ifargis given as'yes'or'no', it indicates whether to include quoted text. βοΈuudecode(),clear-tagged(),mark-read-article(),mark-read-subject(),mark-read-thread(),mark-read-subthread(),mark-read-to-current(),mark-read-all(),mark-read-tagged(),mark-read-non-tagged(),mark-read-cold(),mark-unread-article(),mark-unread-subject(),mark-unread-thread(),mark-unread-subthread(),mark-unread-all(),mark-unread-tagged(),mark-unread-killed()β these perform the corresponding functions on the misc menu. πpipe(command, parts [, scope]),save(filename, parts [, scope])β pipe and save actions. The argument'parts'is a combination of the characters'f','s','h','b','e', corresponding to the'bogus from','bogus subject','head','body'and'empty line'options on the save popup window. The'scope'parameter is optional, and is one of'window','article','subject','thread','subthread'and'tagged', corresponding to those options on the save popup. πΎtag-thread([all]),tag-subject([all])β these tag the unread articles in a thread or subject. If'all'is specified, they tag all articles in the thread or subject. π·οΈuntag-thread(),untag-subject()β these untag the tagged articles in a thread or subject. π§Ήtag-hot()β this action tags all unread hot articles, same as on the misc menu. π₯catchup(),unsubscribe(),subscribe()β guess what. πchange-size(pixels)β changes the size of the upper portion of the main window by the specified number of pixels. πschedule-thread-ahead()β causes a group to be scheduled for'thread ahead'. β°popup-find-group()β popups the'find group'popup, same as the'find group'option on the misc menu. π
π§ WIDGETS π§
The X interface of knews is built with its own widget set plus the Layout Widget. You are welcome to use it if you like. Unfortunately there is no documentation. π
π AUTHOR π
This software is Copyright 1995, 1996 by Karl-Johan Johnsson.
π ACKNOWLEDGMENTS π
- The threading algorithm was inspired from
trn. Thanks to Wayne Davison. π - Knews uses Keith Packard's Layout Widget. π§©
- The distribution includes Henry Spencer's regex package for environments that do not have the POSIX.2 regular expression functions. π¦
- Thanks to Mattias Jonsson for ardent testing. π§ͺ
- From the gif89a spec:
"The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated."
- Any problems are of course entirely due to me. π
π SEE ALSO π
egrep(1), knewsd(1), trn(1), uudecode(1), mailcap(5), newsrc(5), regex(7).
π KNOWN PROBLEMS π
- If the server doesn't support
XOVER, threading will be very slow. π - The
uudecodefunction may not recognize or correctly handle all cases. π€· - The dithering algorithm used for grayscale images and color gifs (essentially
'closest match') is very poor. π¬ AUTHINFO SIMPLEdoesn't work for the second connection. π- When the last article in a group has been cancelled, the number of unread articles may be incorrect. π΅
π BUGS π
Send bug reports to kjj@matematik.su.se. π§
ok bestie, that's the whole KNEWS(1) manual β 1996, KNEWS(1), mwah πβ¨
π¦ where this page comes from
- debian trixie: knews 1.0b.1-39
- ubuntu noble: knews 1.0b.1-37build2
- ubuntu resolute: knews 1.0b.1-39
- ubuntu stonking: knews 1.0b.1-39
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms