zsh-workers
 help / color / mirror / code / Atom feed
* perforce completion problems: doesn't use supplied p4 flags
@ 2003-08-18 14:16 Felix Rosencrantz
  2003-08-19 19:44 ` PATCH: " Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Rosencrantz @ 2003-08-18 14:16 UTC (permalink / raw)
  To: zw

The p4 completer doesn't seem to use the p4 flags provided to do completion.

For example if I do a:  "p4 -p perforce_host2:1666 client <TAB>"
It doesn't make use of the -p flag when trying to do completions for possible
clients.  It uses the default.  There are other flags that should also be
carried along when generating completions for some items like user/password.

Also the completer doesn't complete the "p4 -Ztag"  flag.

-FR.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* PATCH: perforce completion problems: doesn't use supplied p4 flags
  2003-08-18 14:16 perforce completion problems: doesn't use supplied p4 flags Felix Rosencrantz
@ 2003-08-19 19:44 ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2003-08-19 19:44 UTC (permalink / raw)
  To: zsh-workers

Felix Rosencrantz wrote:
> The p4 completer doesn't seem to use the p4 flags provided to do completion.
> 
> For example if I do a:  "p4 -p perforce_host2:1666 client <TAB>"
> It doesn't make use of the -p flag when trying to do completions for possible
> clients.  It uses the default.  There are other flags that should also be
> carried along when generating completions for some items like user/password.

I've made it use all of them, let me know if this causes problems.
(Hmm, it shouldn't use -x or -G, but those aren't common interactively
and you can't complete for -x anyway, and it shouldn't use -V, but you
can't complete for that either.)

> Also the completer doesn't complete the "p4 -Ztag"  flag.

I can't find any documentation for this, it's either old or only used
with a subset of commands.

Index: Completion/Unix/Command/_perforce
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_perforce,v
retrieving revision 1.8
diff -u -r1.8 _perforce
--- Completion/Unix/Command/_perforce	16 Jul 2003 01:44:17 -0000	1.8
+++ Completion/Unix/Command/_perforce	19 Aug 2003 19:38:24 -0000
@@ -237,20 +237,6 @@
 	return
     fi
 
-    if (( ! ${#_perforce_cmd_list} )); then
-	(( ${+_perforce_cmd_list} )) || typeset -ga _perforce_cmd_list
-	local hline
-	# Output looks like <tab>command-name<space>description in words...
-	# Ignore blank lines and the heading line beginning `Perforce...'
-	# Just gets run once, then cached, so don't bother optimising
-	# this to a grossly unreadable parameter substitution.
-	_call_program help-commands p4 help commands | while read -A hline; do
-	    (( ${#hline} < 2 )) && continue
-	    [[ $hline[1] = (#i)perforce ]] && continue
-	    _perforce_cmd_list+=("${hline[1]}:${hline[2,-1]}")
-	done
-    fi
-
     # If we are given a service of the form p4-cmd, treat this
     # as if it was after `p4 cmd'.  This provides an easy way in
     # for scripts and functions that emulate the behaviour of
@@ -278,6 +264,14 @@
 	fi
     done
 
+    # If we are at or after the command word, remember the
+    # global arguments to p4 as we will need to pass these down
+    # when generating completion lists.
+    local -a _perforce_global_options
+    if (( i <= CURRENT && i > 2 )); then
+	_perforce_global_options=(${words[2,i-1]})
+    fi
+
     if (( i >= CURRENT )); then
 	_arguments -s : \
 	    '-c+[client]:client:_perforce_clients' \
@@ -305,8 +299,37 @@
 # Command and argument dispatchers
 #
 
+# Front end to _call_program to add in the global arguments
+# passed to p4.
+(( $+functions[_perforce_call_p4] )) ||
+_perforce_call_p4() {
+    local cp_tag=$1
+    shift
+    _call_program $cp_tag p4 "${_perforce_global_options[@]}" "$@"
+}
+
+
+# The list of commands is cached in _perforce_cmd_list, but we
+# only generate it via this function when we need it.
+(( $+functions[_perforce_gen_cmd_list] )) ||
+_perforce_gen_cmd_list() {
+    (( ${+_perforce_cmd_list} )) || typeset -ga _perforce_cmd_list
+    local hline
+    # Output looks like <tab>command-name<space>description in words...
+    # Ignore blank lines and the heading line beginning `Perforce...'
+    # Just gets run once, then cached, so don't bother optimising
+    # this to a grossly unreadable parameter substitution.
+    _perforce_call_p4 help-commands help commands | while read -A hline; do
+	(( ${#hline} < 2 )) && continue
+	[[ $hline[1] = (#i)perforce ]] && continue
+	_perforce_cmd_list+=("${hline[1]}:${hline[2,-1]}")
+    done
+}
+
+
 (( $+functions[_perforce_commands] )) ||
 _perforce_commands() {
+    (( ${#_perforce_cmd_list} )) || _perforce_gen_cmd_list
     _describe -t p4-commands 'Perforce command' _perforce_cmd_list
 }
 
@@ -331,7 +354,7 @@
 _perforce_branches() {
     local bline match mbegin mend
     local -a bl
-    bl=(${${${(f)"$(_call_program branches p4 branches 2>/dev/null)"}##Branch }/ /:})
+    bl=(${${${(f)"$(_perforce_call_p4 branches branches 2>/dev/null)"}##Branch }/ /:})
     [[ $#bl -eq 1 && $bl[1] = '' ]] && bl=()
     (( $#bl )) && _describe -t branches 'Perforce branch' bl
 }
@@ -351,7 +374,7 @@
 	 [[ $PREFIX = (|*[^[:digit:]])(#b)(<->) ]] && num+=$match[1]
 	 [[ $SUFFIX = (#b)(<->)* ]] && num+=$match[1]
 	 if [[ -n $num ]]; then
-	     _message -r "$(_call_program describe p4 describe $num)"
+	     _message -r "$(_perforce_call_p4 describe describe $num)"
 	     return 0
 	 fi
     elif [[ ${NUMERIC:-0} -gt 0 ]]; then
@@ -385,7 +408,7 @@
     # Limit to the 20 most recent changes by default to avoid huge
     # output.
     cl=(
-${${${${(f)"$(_call_program changes p4 changes -m ${max:-20} $cstatus \$file)"}##Change\ }//\ on\ /:}/\ by\ /\ }
+${${${${(f)"$(_perforce_call_p4 changes changes -m ${max:-20} $cstatus \$file)"}##Change\ }//\ on\ /:}/\ by\ /\ }
 "default:change not yet numbered")
     [[ $#cl -eq 1 && $cl[1] = '' ]] && cl=()
     _describe -t changes "${ctype}change" cl $comma
@@ -410,7 +433,7 @@
 	compset -P '//' && slash=(-S/ -q)
     fi
 
-    cl=(${${${(f)"$(_call_program clients p4 clients)"}##Client\ }/\ /:})
+    cl=(${${${(f)"$(_perforce_call_p4 clients clients)"}##Client\ }/\ /:})
     [[ $#cl -eq 1 && $cl[1] = '' ]] && cl=()
     _describe -t clients 'Perforce client' cl $slash
 }
@@ -421,7 +444,7 @@
     local cline match mbegin mend
     local -a cl
 
-    cl=(${${${(f)"$(_call_program counters p4 counters)"}/\ /:}/\=/current value})
+    cl=(${${${(f)"$(_perforce_call_p4 counters counters)"}/\ /:}/\=/current value})
     [[ $#cl -eq 1 && $cl[1] = '' ]] && cl=()
     _describe -t counters 'Perforce counter' cl
 }
@@ -430,7 +453,7 @@
 (( $+functions[_perforce_counter_values] )) ||
 _perforce_counter_values() {
     if [[ -n $words[CURRENT-1] ]]; then
-	 local value="$(_call_program counter p4 counter $words[CURRENT-1] 2>/dev/null)"
+	 local value="$(_perforce_call_p4 counter counter $words[CURRENT-1] 2>/dev/null)"
 	 if [[ -n $value ]]; then
 	     # No space.  This allows stuff like incarg and decarg.
 	     compstate[insert]=1
@@ -485,7 +508,7 @@
     local dline match mbegin mend max
     local -a dl
 
-    dl=(${${${(f)"$(_call_program depots p4 depots)"}##Depot\ }/\ /:})
+    dl=(${${${(f)"$(_perforce_call_p4 depots depots)"}##Depot\ }/\ /:})
     [[ $#dl -eq 1 && $dl[1] = '' ]] && dl=()
     _describe -t depots 'depot name' dl
 }
@@ -533,7 +556,7 @@
     local -a files
 
     compset -P '*/'
-    files=(${${${(f)"$(_call_program integrated p4 integrated \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
+    files=(${${${(f)"$(_perforce_call_p4 integrated integrated \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
     [[ $#files -eq 1 && $files[1] = '' ]] && files=()
     compadd "$@" -a files
 }
@@ -545,7 +568,7 @@
     local -a files
 
     compset -P '*/'
-    files=(${${${(f)"$(_call_program opened p4 opened \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
+    files=(${${${(f)"$(_perforce_call_p4 opened opened \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
     [[ $#files -eq 1 && $files[1] = '' ]] && files=()
     compadd "$@" -a files
 }
@@ -557,7 +580,7 @@
     local -a files
 
     compset -P '*/'
-    files=(${${${(f)"$(_call_program resolved p4 resolved \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
+    files=(${${${(f)"$(_perfroce_call_p4 resolved resolved \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
     [[ $#files -eq 1 && $files[1] = '' ]] && files=()
     compadd "$@" -a files
 }
@@ -578,7 +601,7 @@
     local -a files
 
     compset -P '*/'
-    files=(${"${(f)$(_call_program dirs p4 dirs \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)}"##*/})
+    files=(${"${(f)$(_perforce_call_p4 dirs dirs \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)}"##*/})
     [[ $#files -eq 1 && $files[1] = '' ]] && files=()
     compadd "$@" -S / -q -a files
 }
@@ -590,7 +613,7 @@
     local -a files
 
     compset -P '*/'
-    files=(${${${(f)"$(_call_program files p4 files \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
+    files=(${${${(f)"$(_perforce_call_p4 files files \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/})
     [[ $#files -eq 1 && $files[1] = '' ]] && files=()
     compadd "$@" -R _perforce_file_suffix -a files
 }
@@ -619,7 +642,7 @@
 	typeset -gA _perforce_client_list
 	local -a tmplist
 	local tmpelt
-	tmplist=(${${${(f)"$(_call_program clients p4 clients)"}##Client\ }%%\ *})
+	tmplist=(${${${(f)"$(_perforce_call_p4 clients clients)"}##Client\ }%%\ *})
 	[[ $#tmplist -eq 1 && $tmplist[1] = '' ]] && tmplist=()
 	for tmpelt in $tmplist; do
 	    _perforce_client_list[$tmpelt]=1
@@ -641,7 +664,7 @@
     else
 	# We need to look at the View stanza of the client record
 	# to see what directories exist in the client view.
-	_call_program client "p4 client -o $client" 2>/dev/null | while read line; do
+	_perforce_call_p4 client "client -o $client" 2>/dev/null | while read line; do
 	    case $line in
 		([[:blank:]]##) type=
 			        ;;
@@ -785,7 +808,7 @@
 	pfx="$match[1]"
 	pfx=${(e)~pfx}
 	omitpats=(
-	    ${${${${(f)"$(_call_program files p4 files \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/}//(#m)[][*?()<|^~#\\]/\\$MATCH}
+	    ${${${${(f)"$(_perforce_call_p4 files files \"\$pfx\*\$\{\(Q\)SUFFIX\}\" 2>/dev/null)"}%\#*}##*/}//(#m)[][*?()<|^~#\\]/\\$MATCH}
 	)
 
 	[[ $#omitpats -eq 1 && $omitpats[1] = '' ]] && omitpats=()
@@ -859,7 +882,7 @@
 
 (( $+functions[_perforce_groups] )) ||
 _perforce_groups() {
-    _describe -t groups 'Perforce group' $(_call_program groups p4 groups)
+    _describe -t groups 'Perforce group' $(_perforce_call_p4 groups groups)
 }
 
 
@@ -884,13 +907,13 @@
 	# prefix argument.  Instead of listing possible completions,
 	# show the full description for the job which is on the line at
 	# the moment.
-	_message -r "$(_call_program jobs p4 jobs -e \"Job=\$PREFIX\$SUFFIX\" -l 2>/dev/null)"
+	_message -r "$(_perforce_call_p4 jobs jobs -e \"Job=\$PREFIX\$SUFFIX\" -l 2>/dev/null)"
 	return 0
     elif [[ ${NUMERIC:-0} -gt 0 ]]; then
 	max=$NUMERIC
     fi
 
-    _call_program jobs p4 jobs -m ${max:-20} | while read jline; do
+    _perforce_call_p4 jobs jobs -m ${max:-20} | while read jline; do
 	if [[ $jline = (#b)([^[:blank:]]##)' '[^[:blank:]]##' '(*) ]]; then
 	    jl+=("${match[1]}:${match[2]}")
 	fi
@@ -921,7 +944,7 @@
 
     # According to the manual, `p4 jobspec' requires admin privileges.
     # If this is true even of `p4 jobspec -o', we are a bit screwed.
-    _call_program jobspec p4 jobspec -o 2>/dev/null | while read line; do
+    _perforce_call_p4 jobspec jobspec -o 2>/dev/null | while read line; do
 	case $line in
 	    ([[:blank:]]##) type=
 			    ;;
@@ -985,7 +1008,7 @@
     # May be completing after `@'.
     compset -P '*@'
 
-    _call_program labels p4 labels | while read lline; do
+    _perforce_call_p4 labels labels | while read lline; do
 	if [[ $lline = (#b)'Label '([^[:blank:]]##)' '(*) ]]; then
 	    ll+=("${match[1]}:${match[2]}")
 	fi
@@ -1016,7 +1039,7 @@
     if [[ -z $PREFIX || $PREFIX = <-> ]]; then
 	# always allowed (same as none)
 	rl+=(0)
-	_call_program filelog 'p4 filelog $pfx' 2>/dev/null | while read rline; do
+	_perforce_call_p4 filelog 'filelog $pfx' 2>/dev/null | while read rline; do
 	    if [[ $rline = (#b)'... #'(<->)' change '(*) ]]; then
 		rl+=("${match[1]}:${match[2]}")
 	    fi
@@ -1038,7 +1061,7 @@
     local jline match mbegin mend
     local -a statuses
 
-    _call_program jobspec p4 jobspec -o | while read jline; do
+    _perforce_call_p4 jobspec jobspec -o | while read jline; do
 	if [[ $jline = (#b)Status[[:blank:]]##(*/*) ]]; then
 	    statuses=(${(s./.)match[1]})
 	    break
@@ -1058,7 +1081,7 @@
     local line match mbegin mend expl
     local -a vars
 
-    _call_program help-environment p4 help environment | while IFS= read line; do
+    _perforce_call_p4 help-environment help environment | while IFS= read line; do
 	if [[ $line = $'\t'(#b)([A-Z][A-Z0-9_]##)* ]]; then
 	   vars+=($match[1])
 	fi
@@ -1361,8 +1384,9 @@
     if (( ! ${#_perforce_help_list} )); then
 	(( ${+_perforce_help_list} )) || typeset -ga _perforce_help_list
 	# All commands have help.
+	(( ${#_perforce_cmd_list} )) || _perforce_gen_cmd_list
 	_perforce_help_list=($_perforce_cmd_list)
-	_call_program help p4 help | while read -A hline; do
+	_perforce_call_p4 help help | while read -A hline; do
 	    if [[ $hline[1] = p4 && $hline[2] = help ]]; then
 		_perforce_help_list+=("$hline[3]:${hline[4,-1]}")
 	    fi

-- 
Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: perforce completion problems: doesn't use supplied p4 flags
  2003-08-20 11:08 Felix Rosencrantz
@ 2003-08-20 11:59 ` Peter Stephenson
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2003-08-20 11:59 UTC (permalink / raw)
  To: zw

Felix Rosencrantz wrote:
> > I've made it use all of them, let me know if this causes problems.
> > (Hmm, it shouldn't use -x or -G, but those aren't common interactively
> > and you can't complete for -x anyway, and it shouldn't use -V, but you
> > can't complete for that either.)
> 
> That will cause problems.  Sometimes I use "-G" from the command line, I
> use/test it with a python filter.   (btw -x seems broken to me, not the
> completer, the command.)  Also, the "-Ztag" flag changes the  output format,
> which is likely to cause problems for the completer.

I was planning to improve this anyway...

It also makes completion after p4 -p work better.

Index: Completion/Unix/Command/_perforce
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_perforce,v
retrieving revision 1.10
diff -u -r1.10 _perforce
--- Completion/Unix/Command/_perforce	20 Aug 2003 10:04:13 -0000	1.10
+++ Completion/Unix/Command/_perforce	20 Aug 2003 11:56:54 -0000
@@ -251,27 +251,41 @@
 	fi
     fi
 
+    # Options with arguments we need to pass down when calling
+    # p4 from completers.  There are no options without arguments
+    # we need to pass.  (Don't pass down -L language since we
+    # parse based on English output.)
+    local argopts_pass="cCdHpPu"
+    # Other options which have arguments but we shouldn't pass down.
+    # There are some debugging options, but they tend to get used
+    # with the argument in the same word as the option, in which
+    # case they will be handled OK anyway.
+    local argopts_ignore="Lx"
+
+    # If we are at or after the command word, remember the
+    # global arguments to p4 as we will need to pass these down
+    # when generating completion lists.
+    local -a _perforce_global_options
+
     # We need to try and check if we are before or after the
     # subcommand, since some of the options with arguments, in particular -c,
     # work differently.  It didn't work if I just added '*::...' to the
     # end of the arguments list, anyway.
     for (( i = 2; i < CURRENT; i++ )); do
-	if [[ $words[i] = -[cCdHLpPux] ]]; then
+	if [[ $words[i] = -[$argopts_pass$argopts_ignore] ]]; then
 	    # word with following argument
+	    if [[ $words[i] = -[$argopts_pass] ]]; then
+		_perforce_global_options+=(${words[i,i+1]})
+	    fi
 	    (( i++ ))
+	elif [[ $words[i] = -[$argopts_pass]* ]]; then
+	    # word including argument which we want to keep
+	    _perforce_global_options+=(${words[i]})
 	elif [[ $words[i] != -* ]]; then
 	    break
 	fi
     done
 
-    # If we are at or after the command word, remember the
-    # global arguments to p4 as we will need to pass these down
-    # when generating completion lists.
-    local -a _perforce_global_options
-    if (( i <= CURRENT && i > 2 )); then
-	_perforce_global_options=(${words[2,i-1]})
-    fi
-
     if (( i >= CURRENT )); then
 	_arguments -s : \
 	    '-c+[client]:client:_perforce_clients' \
@@ -280,7 +294,7 @@
 	    '-H+[hostname]:host:_hosts' \
 	    '-G[python output]' \
 	    '-L+[message language]:language: ' \
-	    '-p+[server port]:port:_ports' \
+	    '-p+[server port]:port:_perforce_hosts_ports' \
 	    '-P+[password on server]:password: ' \
 	    '-s[output script tags]' \
 	    '-u+[user]:user name:_users' \
@@ -305,6 +319,9 @@
 _perforce_call_p4() {
     local cp_tag=$1
     shift
+    # This is for our own use for parsing, and we need English output,
+    # so...
+    local +x P4LANGUAGE
     _call_program $cp_tag p4 "${_perforce_global_options[@]}" "$@"
 }
 

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PATCH: perforce completion problems: doesn't use supplied p4 flags
@ 2003-08-20 11:08 Felix Rosencrantz
  2003-08-20 11:59 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Rosencrantz @ 2003-08-20 11:08 UTC (permalink / raw)
  To: zw

> I've made it use all of them, let me know if this causes problems.
> (Hmm, it shouldn't use -x or -G, but those aren't common interactively
> and you can't complete for -x anyway, and it shouldn't use -V, but you
> can't complete for that either.)

That will cause problems.  Sometimes I use "-G" from the command line, I
use/test it with a python filter.   (btw -x seems broken to me, not the
completer, the command.)  Also, the "-Ztag" flag changes the  output format,
which is likely to cause problems for the completer.

> > Also the completer doesn't complete the "p4 -Ztag"  flag.
>
> I can't find any documentation for this, it's either old or only used
> with a subset of commands.
Not particularlly documented, except through the wonders of Google. :) It
changes the output format on some commands, which can sometimes be useful with
a grep.  Also, there is -vrpc, but I haven't found that particularly useful.

Though, I think this change will help quite a bit as it is.  Thanks Peter.
-FR.
--- Felix Rosencrantz <f_rosencrantz@yahoo.com> wrote:
> The p4 completer doesn't seem to use the p4 flags provided to do completion.
> 
> For example if I do a:  "p4 -p perforce_host2:1666 client <TAB>"
> It doesn't make use of the -p flag when trying to do completions for possible
> clients.  It uses the default.  There are other flags that should also be
> carried along when generating completions for some items like user/password.
> 
> Also the completer doesn't complete the "p4 -Ztag"  flag.
> 
> -FR.
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-08-20 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-18 14:16 perforce completion problems: doesn't use supplied p4 flags Felix Rosencrantz
2003-08-19 19:44 ` PATCH: " Peter Stephenson
2003-08-20 11:08 Felix Rosencrantz
2003-08-20 11:59 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).