🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #795

Re: does kyle not like imap questions?

#795
From: tristero
Date: Sun, 20 Jul 2003 13:49
59 lines
3347 bytes
In article <vhkap0n37gk3d0@corp.supernews.com>, Kyle Jones wrote:
> The reason I'm not answerting IMAP questions at the moment is
> that I can't answer them.

That's fair, and honest :)


> deeply into the problems.  When I get a block of time when I'm
> not tired, I will address the issues, I promise.  If you could do
> "make debug" and then (setq debug-on-error '(arith-error)) to get
> a stacktrace, that would be helpful.

Here's the relevant portion

Debugger entered--Lisp error: (arith-error)
  /(7790 0)
  (setq tabs (/ list-length (/ columns ...)) tabs (+ tabs (if ... 0 1)))
  (let ((buffer-read-only nil) (separation 3) tabs longest columns list-length q i$
  (save-excursion (let (... ... tabs longest columns list-length q i w start comma$
  vm-show-list((<very long list of files>))


The immediate problem is that the expression 

 (/ columns (+ longest separation))

evaluates to 0 if the denominator is larger than the numerator.  Since
this expression is itself used as the denominator of (two) other
expressions, the result is divide-by-0 error in that case.

The simple fix is obvious enough: replace the expression above with
something like:

 (max 10 (/ columns (+ longest separation))) ;; 10 is arbitrary

I'm actually surprised this problem hasn't arisen in other contexts
which call vm-show-list.  Did that function change recently?


In this case 'longest' is very large indeed, which is what makes the
expression above eval to 0.  And that's so because the list being
passed in initially includes every file at every level in my home
directory on the imap server, with '/' being treated as simply a
character in the filename.  In other words, a file N levels down will
appear in this list as:

 "directory1/directory2/directory3/..../directoryN/thefilename"

Which makes for pretty long names.



I mention this because now I'm wondering whether this flattened out
processing of filenames isn't in some way related to the more
important problem, the fact that my imap folders always show up as
empty.  Possibly there's some confusion in what imap folder VM thinks
it's asking for and what the imap server thinks was requested, eg
because VM is parsing the selection and requesting only the
thefilename (in the example above) rather than the full spec?
Technical Details
Message-ID: <b6xSa.92276$wk6.25798@rwcrnsc52.ops.asp.att.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail
References: <vfkSa.89063$sY2.42113@rwcrnsc51.ops.asp.att.net> <vhkap0n37gk3d0@corp.supernews.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,39c3b8eb6a88a9b4
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 2003-07-20 06:50:00 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!rwcrnsc52.ops.asp.att.net.POSTED!not-for-mail
Newsgroups: gnu.emacs.vm.bug
From: tristero <tristero@waste.net>
Subject: Re: does kyle not like imap questions?
References: <vfkSa.89063$sY2.42113@rwcrnsc51.ops.asp.att.net> <vhkap0n37gk3d0@corp.supernews.com>
User-Agent: slrn/0.9.7.4 (Darwin)
Lines: 65
Message-ID: <b6xSa.92276$wk6.25798@rwcrnsc52.ops.asp.att.net>
NNTP-Posting-Host: 66.31.41.137
X-Complaints-To: abuse@comcast.net
X-Trace: rwcrnsc52.ops.asp.att.net 1058708999 66.31.41.137 (Sun, 20 Jul 2003 13:49:59 GMT)
NNTP-Posting-Date: Sun, 20 Jul 2003 13:49:59 GMT
Organization: Comcast Online
Date: Sun, 20 Jul 2003 13:49:59 GMT