BTS

Issue388

Title grml-etc-core: completion for newsbeuter
Priority feature Status dead
Superseder Nosy List ft, mika, z3ttacht
Assigned To Topics

Created on 2008-01-28.08:34:33 by z3ttacht, last changed 2009-11-27.16:56:05 by mika.

Files
File name Uploaded Type Edit Remove
grml-etc-core_completion-newsbeuter.patch z3ttacht, 2008-01-28.08:34:33 text/x-diff
grml-etc-core_completion-newsbeuter_improved.patch z3ttacht, 2008-01-29.14:04:47 text/x-diff
grml-etc-core_completion-newsbeuter_kiss.patch z3ttacht, 2008-01-31.08:25:27 text/x-diff
Messages
msg2333 (view) Author: ft Date: 2009-07-01.09:34:11
This is an old bug that did not gain substantial momentum after being
marked 'needs-progress' for a considerable amount of time.

The bug is closed as 'dead'.

If someone is actually working(!) on this issue again feel free to
reopen it, so the progress can be monitored within the BTS.
msg2267 (view) Author: ft Date: 2009-06-02.13:38:54
This is an old bug that did not move for a considerable amount of
time. Therefore this issue is marked as 'needs-progress'. We will be
monitoring this issue for the period of a month. If it does not gain
substantial momentum up to that time, the bug will be closed as 'dead'.
msg2146 (view) Author: ft Date: 2009-04-06.23:32:35
Another oooold issue.

What's the status here?
Send a completion to newsbeuter for it to ship it as contributed code?
Send it to zsh-workers for zsh inclusion?

Regards, Frank
msg1147 (view) Author: z3ttacht Date: 2008-02-03.11:34:23
* Frank Terbeck <bts@bts.grml.org> [2008-02-03 11:47]:
> I'm not too sure if the grml header is appropriate for something to be
> included in zsh itself.
Ah, good hint. No, the header wouldn't be shipped with the zsh
version. It's just there for grml, as it is done for all the other
configs.

Hence, there wouldn't be any problems with licenses and the like.
msg1145 (view) Author: ft Date: 2008-02-03.10:46:48
Alexander Steinböck <bts@bts.grml.org>:
> Alexander Steinböck <z3ttacht@grml.org> added the comment:
> > FWIW, I think a proper completion for newsbeuter would be of general
> > interest; So, I think it would be best to implement it and submit it
> > to zsh-workers.
> 
> If I'd get your blessing on the latest version, I would be happy _and_
> honoured to do that.

I didn't see anything immediately wrong.
I'm not too sure if the grml header is appropriate for something to be
included in zsh itself.

Another thing, that might cause trouble, is the fact that the license
for your completion and zsh's license differ (zsh is distributed under
a bsd-like license).

I'm not a lawyer, so I don't know if that's possible, or not (nor do I
know, if the zsh upstream will accept a file that is explicitly
versioned differently from the rest of the source.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg1144 (view) Author: z3ttacht Date: 2008-02-03.10:37:45
> FWIW, I think a proper completion for newsbeuter would be of general
> interest; So, I think it would be best to implement it and submit it
> to zsh-workers.
If I'd get your blessing on the latest version, I would be happy _and_
honoured to do that.
msg1143 (view) Author: ft Date: 2008-02-02.09:31:30
Alexander Steinböck <bts@bts.grml.org>:
> Alexander Steinböck <z3ttacht@grml.org> added the comment:
> > I don't like '/usr/share/doc/newsbeuter/examples' either.
> Me neither, now. (o;
> 
> > zsh doesn't know which version I'm running; Therefore, it can only
> > guess for the right place for examples in such a directory.
> Right. I guess, I just was blinded with trying to get completion
> working for selective directories. I had another approach with
> exceptions as well. Maybe that's another way, just excluding files
> which really can't be a config file. E.g. images, videos, compressed
> files etc.
> 
> > Also, is newsbeuter able to deal with gzipped config files at all?
> > If not, it's pointless anyway (unless you do some smart =(...) magic
> > in your completion, when it finds .gz), if the examples are gzipped
> > by default.
> No, it can't cope with {g,b}zipped files. Although such an approach
> with your aforementioned magic would be neat, wouldn't it.
> 
> > What is the point in completing these at all?
> I guess, I'm getting ahead of myself here. And as you've mentioned,
> KISS would suffice^Wbe better here. Just wanted to do something
> special. (o;

Oops,  I missed that there was a diff attached to that message. Sorry.

How are we going to go about this now?
See my suggestions here: <http://bts.grml.org/grml/msg1129>.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg1134 (view) Author: z3ttacht Date: 2008-01-31.08:25:27
> I don't like '/usr/share/doc/newsbeuter/examples' either.
Me neither, now. (o;

> zsh doesn't know which version I'm running; Therefore, it can only
> guess for the right place for examples in such a directory.
Right. I guess, I just was blinded with trying to get completion
working for selective directories. I had another approach with
exceptions as well. Maybe that's another way, just excluding files
which really can't be a config file. E.g. images, videos, compressed
files etc.

> Also, is newsbeuter able to deal with gzipped config files at all?
> If not, it's pointless anyway (unless you do some smart =(...) magic
> in your completion, when it finds .gz), if the examples are gzipped
> by default.
No, it can't cope with {g,b}zipped files. Although such an approach
with your aforementioned magic would be neat, wouldn't it.

> What is the point in completing these at all?
I guess, I'm getting ahead of myself here. And as you've mentioned,
KISS would suffice^Wbe better here. Just wanted to do something
special. (o;
But as long as it is not working 100%, I'll not propagate this kind of
completion to grml anymore. It's not a good thing to impose the user's
will on this after all.
But I'll try to find a way, to _first_ look in ~/.newsbeuter, then
complete for everything else.

I'm sorry for any inconvenience,
z3ttacht
msg1129 (view) Author: ft1 Date: 2008-01-30.20:33:52
[Adding ak to Cc: for obvious reasons]
[Full-quoting therefore]

Michael Prokop <bts@bts.grml.org>:
> Michael Prokop <mika@grml.org> added the comment:
> * Frank Terbeck <ft@bewatermyfriend.org> [20080130 10:29]:
> > Alexander Steinböck <bts@bts.grml.org>:
> > [...]
> > > +conf_dir=( $HOME/.newsbeuter /usr/share/doc/newsbeuter/examples )
> > [...]
> 
> > I don't like '/usr/share/doc/newsbeuter/examples' either.
> 
> > What happens if I installed newbeuter from a .deb, which keeps its
> > examples there, but I also installed a SVN snapshot in, which keeps
> > its examples in '/usr/local/share/doc/newsbeuter/examples', with
> > potentially incompatible configuration files... (you know, development
> > versions...).
> 
> > zsh doesn't know which version I'm running; Therefore, it can only
> > guess for the right place for examples in such a directory.
> 
> > Also, is newsbeuter able to deal with gzipped config files at all?
> > If not, it's pointless anyway (unless you do some smart =(...) magic
> > in your completion, when it finds .gz), if the examples are gzipped
> > by default.
> 
> > What is the point in completing these at all?
> 
> > I would probably just use plain the _files completion for config files
> > anyway, and *maybe* look into ~/.newbeuter as well, if you must.
> 
> JFYR: I just talked to upstream of newsbeuter, Andreas would ship
> the zsh completion file directly via his upstream tar.gz (through
> something like the contrib directory). Maybe Andreas can help us in
> finding an elegant solution regarding this configuration file issue
> you are talking about as well. :)

FWIW, I think a proper completion for newsbeuter would be of general
interest; So, I think it would be best to implement it and submit it
to zsh-workers. That way, every zsh user could get the pleasure of
using it. No matter if he is running grml, debian, gentoo or whatever.

It could be distributed with newsbeuter, as long as there is no
release of zsh, that ships it. Once that has happened, you don't have
to worry about it anymore.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg1125 (view) Author: mika Date: 2008-01-30.19:36:02
* Frank Terbeck <ft@bewatermyfriend.org> [20080130 10:29]:
> Alexander Steinböck <bts@bts.grml.org>:
> [...]
> > +conf_dir=( $HOME/.newsbeuter /usr/share/doc/newsbeuter/examples )
> [...]

> I don't like '/usr/share/doc/newsbeuter/examples' either.

> What happens if I installed newbeuter from a .deb, which keeps its
> examples there, but I also installed a SVN snapshot in, which keeps
> its examples in '/usr/local/share/doc/newsbeuter/examples', with
> potentially incompatible configuration files... (you know, development
> versions...).

> zsh doesn't know which version I'm running; Therefore, it can only
> guess for the right place for examples in such a directory.

> Also, is newsbeuter able to deal with gzipped config files at all?
> If not, it's pointless anyway (unless you do some smart =(...) magic
> in your completion, when it finds .gz), if the examples are gzipped
> by default.

> What is the point in completing these at all?

> I would probably just use plain the _files completion for config files
> anyway, and *maybe* look into ~/.newbeuter as well, if you must.

JFYR: I just talked to upstream of newsbeuter, Andreas would ship
the zsh completion file directly via his upstream tar.gz (through
something like the contrib directory). Maybe Andreas can help us in
finding an elegant solution regarding this configuration file issue
you are talking about as well. :)

regards,
-mika-
msg1121 (view) Author: ft1 Date: 2008-01-30.09:29:23
Alexander Steinböck <bts@bts.grml.org>:
[...]
> +conf_dir=( $HOME/.newsbeuter /usr/share/doc/newsbeuter/examples )
[...]

I don't like '/usr/share/doc/newsbeuter/examples' either.

What happens if I installed newbeuter from a .deb, which keeps its
examples there, but I also installed a SVN snapshot in, which keeps
its examples in '/usr/local/share/doc/newsbeuter/examples', with
potentially incompatible configuration files... (you know, development
versions...).

zsh doesn't know which version I'm running; Therefore, it can only
guess for the right place for examples in such a directory.

Also, is newsbeuter able to deal with gzipped config files at all?
If not, it's pointless anyway (unless you do some smart =(...) magic
in your completion, when it finds .gz), if the examples are gzipped
by default.

What is the point in completing these at all?

I would probably just use plain the _files completion for config files
anyway, and *maybe* look into ~/.newbeuter as well, if you must.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg1120 (view) Author: z3ttacht1 Date: 2008-01-29.20:12:24
* Alexander Steinböck <bts@bts.grml.org> [2008-01-29 15:04]:
> Btw, do you think it makes sense cascading the completion for config
> files the way it is done in the patch.
>
> -[snip]-
> % regex='([^.]##|*gz)(.)'
> -[snap]-
Ok, ist does not! Not w/o inserting the right directory beforehand. I
was totally missing that, du to just checking the aforementioned
RegExp. My bad. Will investigate on that.

Sorry for any misleading or misunderstanding.
msg1119 (view) Author: z3ttacht Date: 2008-01-29.14:04:47
* Frank Terbeck <bts@bts.grml.org> [2008-01-28 20:04]:
> > > > +typeset -a conf_dir conf_ignore
> > > Please use 'local' variables.
> > *argh* Sure! But isn't typeset automatically local in functions and
> > such?
> > Or did I miss something here?
> Yeah, but see the docs for the local builtin.
> It forbids -f and -g.
> ...and (more importantly) it is by far more clear, what is meant, if
> you just use local.
Ok, ic. It's indeed the better way to go.

> IMO, *nothing* should *ever* look in 'skel' for anything.
Yes, it is. Now that I think about it. Sure. I guess, I used it for
testing the regex for `_files -g' and just left it then.

Btw, do you think it makes sense cascading the completion for config
files the way it is done in the patch.

-[snip]-
% regex='([^.]##|*gz)(.)'
-[snap]-

And, as speaking of it, why the heck does the completion spit out dir.
While, when executed on the command line, e.g.

-[snip]-
% la {.newsbeuter,/usr/share/doc/newsbeuter/examples}/([^.]##|*gz)(.)
-[snap]-

it's working fine?

And, is there a way to give another description of where the files
come from. Kinda like groups. E.g.

,----
| % newsbeuter -C
| Completing - configfile
| Completing in ~/.newsbeuter
| config           error_log        killfile         saved_articles/
| filter           queue            urls
| Completing in /usr/share/doc/newsbeuter/examples
| config.gz
`----

Kind regards,
z3ttacht
msg1118 (view) Author: ft1 Date: 2008-01-28.19:04:34
Alexander Steinböck <bts@bts.grml.org>:
> 
> Alexander Steinböck <z3ttacht@grml.org> added the comment:
> 
> * Frank Terbeck <ft@bts.grml.org> [2008-01-28 18:49]:
> > > +typeset -a conf_dir conf_ignore
> > Please use 'local' variables.
> *argh* Sure! But isn't typeset automatically local in functions and
> such?
> ,----[ man 1 zshparam | less -p 'Local Parameters' ]-
> | The typeset builtin, and its alternative forms declare, integer, local
> | and readonly (but not export),  can be used to declare a parameter as
> | being local to the innermost scope.
> `----
> Or did I miss something here?

Yeah, but see the docs for the local builtin.
It forbids -f and -g.
...and (more importantly) it is by far more clear, what is meant, if
you just use local.

> > > +conf_dir=( $HOME/.newsbeuter /etc/skel/.newsbeuter )
> > '/etc/skel'?
> I know, that directory doesn't exist yet. But more for newsbeuter is
> coming. And then there will be one. (o;
> 
> Or did you mean something else? Does it not make sense to look for
> config files for completion in there within grml?

IMO, *nothing* should *ever* look in 'skel' for anything.

It is a directory skeleton for new users. And that's it.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg1117 (view) Author: z3ttacht Date: 2008-01-28.18:40:57
* Frank Terbeck <ft@bts.grml.org> [2008-01-28 18:49]:
> > +typeset -a conf_dir conf_ignore
> Please use 'local' variables.
*argh* Sure! But isn't typeset automatically local in functions and
such?
,----[ man 1 zshparam | less -p 'Local Parameters' ]-
| The typeset builtin, and its alternative forms declare, integer, local
| and readonly (but not export),  can be used to declare a parameter as
| being local to the innermost scope.
`----
Or did I miss something here?

> > +conf_dir=( $HOME/.newsbeuter /etc/skel/.newsbeuter )
> '/etc/skel'?
I know, that directory doesn't exist yet. But more for newsbeuter is
coming. And then there will be one. (o;

Or did you mean something else? Does it not make sense to look for
config files for completion in there within grml?

Kind regards,
z3ttacht
msg1116 (view) Author: ft1 Date: 2008-01-28.17:49:46
Alexander Steinböck <bts@bts.grml.org>:
> +typeset -a conf_dir conf_ignore

Please use 'local' variables.

> +conf_dir=( $HOME/.newsbeuter /etc/skel/.newsbeuter )

'/etc/skel'?

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925
msg1112 (view) Author: z3ttacht Date: 2008-01-28.08:34:33
see attached file
History
Date User Action Args
2009-11-27 16:56:05mikasetnosy: mika, ft, z3ttacht
2009-11-27 16:55:58mikasetnosy: mika, ft, z3ttacht
2009-11-14 12:13:26mikasetnosy: mika, ft, z3ttacht
2009-07-01 09:34:12ftsetstatus: needs-progress -> dead
nosy: mika, ft, z3ttacht
messages: + msg2333
2009-06-02 13:38:55ftsetstatus: chatting -> needs-progress
nosy: mika, ft, z3ttacht
messages: + msg2267
2009-04-06 23:32:35ftsetnosy: mika, ft, z3ttacht
messages: + msg2146
2008-02-03 11:34:23z3ttachtsetnosy: mika, ft, z3ttacht
messages: + msg1147
2008-02-03 10:46:48ftsetnosy: mika, ft, z3ttacht
messages: + msg1145
2008-02-03 10:37:45z3ttachtsetnosy: mika, ft, z3ttacht
messages: + msg1144
2008-02-02 09:31:32ftsetnosy: mika, ft, z3ttacht
messages: + msg1143
2008-01-31 08:25:28z3ttachtsetfiles: + grml-etc-core_completion-newsbeuter_kiss.patch
nosy: mika, ft, z3ttacht
messages: + msg1134
2008-01-30 20:33:52ft1setnosy: mika, ft, z3ttacht
messages: + msg1129
2008-01-30 19:36:03mikasetnosy: mika, ft, z3ttacht
messages: + msg1125
2008-01-30 09:29:24ft1setnosy: mika, ft, z3ttacht
messages: + msg1121
2008-01-29 20:12:25z3ttacht1setnosy: mika, ft, z3ttacht
messages: + msg1120
2008-01-29 14:04:50z3ttachtsetfiles: + grml-etc-core_completion-newsbeuter_improved.patch
nosy: mika, ft, z3ttacht
messages: + msg1119
2008-01-28 19:04:35ft1setnosy: mika, ft, z3ttacht
messages: + msg1118
2008-01-28 18:40:58z3ttachtsetnosy: mika, ft, z3ttacht
messages: + msg1117
2008-01-28 17:49:46ft1setstatus: unread -> chatting
nosy: mika, ft, z3ttacht
messages: + msg1116
2008-01-28 08:34:33z3ttachtcreate