Gnus development mailing list
 help / color / mirror / Atom feed
* Errors parsing .newsrc
@ 2014-01-10 11:51 Chris Warburton
  2014-01-11  2:47 ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Warburton @ 2014-01-10 11:51 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]

Hello, I've recently upgraded Ubuntu and Gnus is now failing to parse my
.newsrc.

gnus-version says Gnus v5.13
emacs-version says GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version
3.8.6) of 2014-01-03 on gold, modified by Debian

I use Gnus with nnimap and nnrss. Here's a snippet of my .newsrc:

Deleted Messages: 1
INBOX! 1-8766
InvoiceTests: 1-17
Jira:
Jira/ETraining: 1-213
Jira/Git: 1-1485
Jira/Git Binaries: 1-165
Jira/Hadoop: 1-3117
Jira/Internal Support: 1-3559
Jira/SHARK: 1-87
Jira/SO: 1-71
Jira/SPARK: 1-20
Jira/SVN: 1-1479
Jira/WHC: 1-75
Jira/Web: 1-2034
Recurly: 1-25
Subscription Errors: 1-3330
Workspace: 1-152
[Gmail]:
[Gmail]/All Mail! 1-1961,1963-3148,3150-3151, (and so on)

These are all IMAP folders (Gmail "tags"). When Gnus starts I'm getting
messages like these:

Opening connection to imap.gmail.com via tls...
Opening connection to imap.gmail.com...done
Saving file /home/chris/.newsrc-dribble...
Wrote /home/chris/.newsrc-dribble [2 times]
Gnus auto-save file exists.  Do you want to read it? (y or n)  n
Reading /home/chris/.newsrc.eld...
Reading /home/chris/.newsrc...
Mangled line: Deleted Messages: 1
Mangled line: Jira/Git Binaries: 1-165
Mangled line: Jira/Internal Support: 1-3559
Mangled line: Subscription Errors: 1-3330
if: Wrong type argument: symbolp, [Gmail]

It looks like the gnus-newsrc-to-gnus-format function isn't parsing spaces
in the group names, eg. it reads "Deleted", then checks if it's subscribed
by comparing the next character " " to ":", which is false, then it starts
looking for ranges. Since "Messages" isn't a valid range, it gives the
"Mangled line" error. I tried removing a space from a call to
"skip-chars-forward", but there's a call "(read buf)" which still stops at
the space.

I don't mind getting my hands dirty with this, but my knowledge of Emacs
Lisp isn't great.

As for the "Wrong type argument", I tried removing the "[Gmail]:" line but
it made no difference.

Has anyone seen issues like this before?

Thanks,
Chris

[-- Attachment #2: Type: text/html, Size: 2453 bytes --]

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

* Re: Errors parsing .newsrc
  2014-01-10 11:51 Errors parsing .newsrc Chris Warburton
@ 2014-01-11  2:47 ` Eric Abrahamsen
  2014-01-11 13:09   ` Chris Warburton
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2014-01-11  2:47 UTC (permalink / raw)
  To: ding

Chris Warburton <chriswarbo@googlemail.com> writes:

> Hello, I've recently upgraded Ubuntu and Gnus is now failing to parse
> my .newsrc.

[...]

> It looks like the gnus-newsrc-to-gnus-format function isn't parsing
> spaces in the group names, eg. it reads "Deleted", then checks if
> it's subscribed by comparing the next character " " to ":", which is
> false, then it starts looking for ranges. Since "Messages" isn't a
> valid range, it gives the "Mangled line" error. I tried removing a
> space from a call to "skip-chars-forward", but there's a call "(read
> buf)" which still stops at the space.
>
> I don't mind getting my hands dirty with this, but my knowledge of
> Emacs Lisp isn't great.
>
> As for the "Wrong type argument", I tried removing the "[Gmail]:"
> line but it made no difference.

I had a related problem, but in the *Server* buffer, not newsrc. I
patched `nnimap-get-groups' to make it read the Gmail group names
correctly, but assumed since no one else was having the problem that it
was something I'd screwed up locally.

I don't even have a .newsrc here, just the .newsrc.eld. If you've *also*
got the .newsrc.eld, you could try setting gnus-read-newsrc-file to nil
temporarily, which will have it ignore the plain old .newsrc.

If that works, my understanding is that it's okay to abandon the .newsrc
file altogether by setting gnus-save-newsrc-file to nil.

If you don't have a newsrc.eld file, then I don't know why not, and
maybe someone else can suggest something.

I'm on git gnus, so YMMV...

Yours,
eric




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

* Re: Errors parsing .newsrc
  2014-01-11  2:47 ` Eric Abrahamsen
@ 2014-01-11 13:09   ` Chris Warburton
  2014-01-12  9:12     ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Warburton @ 2014-01-11 13:09 UTC (permalink / raw)
  To: ding

On Sat, Jan 11, 2014 at 2:47 AM, Eric Abrahamsen
<eric@ericabrahamsen.net> wrote:

> I had a related problem, but in the *Server* buffer, not newsrc. I
> patched `nnimap-get-groups' to make it read the Gmail group names
> correctly, but assumed since no one else was having the problem that it
> was something I'd screwed up locally.

I've been using the following for a about a year to handle Gmail group names and
haven't had an issue before:

(setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")

> I don't even have a .newsrc here, just the .newsrc.eld. If you've *also*
> got the .newsrc.eld, you could try setting gnus-read-newsrc-file to nil
> temporarily, which will have it ignore the plain old .newsrc.

I tried that but it didn't help I'm afraid :(

Chris



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

* Re: Errors parsing .newsrc
  2014-01-11 13:09   ` Chris Warburton
@ 2014-01-12  9:12     ` Eric Abrahamsen
  2014-01-13  9:20       ` Chris Warburton
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2014-01-12  9:12 UTC (permalink / raw)
  To: ding

Chris Warburton <chriswarbo@googlemail.com> writes:

> On Sat, Jan 11, 2014 at 2:47 AM, Eric Abrahamsen
> <eric@ericabrahamsen.net> wrote:
>
>> I had a related problem, but in the *Server* buffer, not newsrc. I
>> patched `nnimap-get-groups' to make it read the Gmail group names
>> correctly, but assumed since no one else was having the problem that it
>> was something I'd screwed up locally.
>
> I've been using the following for a about a year to handle Gmail group names and
> haven't had an issue before:
>
> (setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
>
>> I don't even have a .newsrc here, just the .newsrc.eld. If you've *also*
>> got the .newsrc.eld, you could try setting gnus-read-newsrc-file to nil
>> temporarily, which will have it ignore the plain old .newsrc.
>
> I tried that but it didn't help I'm afraid :(

But you reported problems in gnus-newsrc-to-gnus-format... If you've
removed or ignored that file, how is it still not working?




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

* Re: Errors parsing .newsrc
  2014-01-12  9:12     ` Eric Abrahamsen
@ 2014-01-13  9:20       ` Chris Warburton
  2014-01-13 11:04         ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Warburton @ 2014-01-13  9:20 UTC (permalink / raw)
  To: ding

On Sun, Jan 12, 2014 at 9:12 AM, Eric Abrahamsen
<eric@ericabrahamsen.net> wrote:

>>> I don't even have a .newsrc here, just the .newsrc.eld. If you've *also*
>>> got the .newsrc.eld, you could try setting gnus-read-newsrc-file to nil
>>> temporarily, which will have it ignore the plain old .newsrc.
>>
>> I tried that but it didn't help I'm afraid :(
>
> But you reported problems in gnus-newsrc-to-gnus-format... If you've
> removed or ignored that file, how is it still not working?

Ah, I've tried setting gnus-read-newsrc-file again and Gnus is now
loading :) I thought I'd
already tried this, after reading the "Startup Files" section of the
manual, but I probably
copy/pasted the wrong variable name and set gnus-save-newsrc-file to
nil instead!

Many thanks for helping me get up and running! I'm happy to experiment
and find the cause
if anyone cares. Otherwise I'll just add it to the long list of things
I've had to fix after an
Ubuntu upgrade (PulseAudio, Perl, MySQL, apt, ....!)

Thanks!
Chris



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

* Re: Errors parsing .newsrc
  2014-01-13  9:20       ` Chris Warburton
@ 2014-01-13 11:04         ` Eric Abrahamsen
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2014-01-13 11:04 UTC (permalink / raw)
  To: ding

Chris Warburton <chriswarbo@googlemail.com> writes:

> On Sun, Jan 12, 2014 at 9:12 AM, Eric Abrahamsen
> <eric@ericabrahamsen.net> wrote:
>
>>>> I don't even have a .newsrc here, just the .newsrc.eld. If you've *also*
>>>> got the .newsrc.eld, you could try setting gnus-read-newsrc-file to nil
>>>> temporarily, which will have it ignore the plain old .newsrc.
>>>
>>> I tried that but it didn't help I'm afraid :(
>>
>> But you reported problems in gnus-newsrc-to-gnus-format... If you've
>> removed or ignored that file, how is it still not working?
>
> Ah, I've tried setting gnus-read-newsrc-file again and Gnus is now
> loading :) I thought I'd
> already tried this, after reading the "Startup Files" section of the
> manual, but I probably
> copy/pasted the wrong variable name and set gnus-save-newsrc-file to
> nil instead!

Glad it's working!

> Many thanks for helping me get up and running! I'm happy to experiment
> and find the cause
> if anyone cares. Otherwise I'll just add it to the long list of things
> I've had to fix after an
> Ubuntu upgrade (PulseAudio, Perl, MySQL, apt, ....!)

Try Arch linux -- things just break a little bit, continuously. It
spreads the pain out!




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

end of thread, other threads:[~2014-01-13 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10 11:51 Errors parsing .newsrc Chris Warburton
2014-01-11  2:47 ` Eric Abrahamsen
2014-01-11 13:09   ` Chris Warburton
2014-01-12  9:12     ` Eric Abrahamsen
2014-01-13  9:20       ` Chris Warburton
2014-01-13 11:04         ` Eric Abrahamsen

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).