unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 16553@debbugs.gnu.org
Subject: bug#16553: 24.3.50; `file-truename' returns a cons? (wrong-type-argument stringp (...))
Date: Sun, 26 Jan 2014 10:33:04 -0800 (PST)	[thread overview]
Message-ID: <8ea26242-db04-4456-b4dd-3680fbd76949@default> (raw)
In-Reply-To: <<83txcqaazz.fsf@gnu.org>>

> > The next thing I saw in the debugger was this bizarre call to
> > `file-name-sans-extension':
> >
> > Debugger entered--entering a function:
> > * file-name-sans-extension((require . fit-frame))
> 
> Isn't it possible that you have that weird cons cell in your
> load-history?  help-fns--autoloaded-p does this:
> 
>     (while (and load-hist (not found))
>       (and (caar load-hist)
> 	   (equal (file-name-sans-extension (caar load-hist)) file)
> 
> So if some element in load-history is that cons cell, this code
> will call file-name-sans-extension on that cons cell.

Yes.  Bravo and thank you once again, Eli.  I was wondering about
that cons.  I think you nailed it.  (That cons would not be an
entry, however, but the car of an entry, for the error to occur.)

I don't have that session anymore (and it involved quite a bit of
setup to reach that state).  But yes, in any given session I do
see entries that have 4th,, 5th, etc. subentries that are similar -
e.g.:

("d:/Emacs-24-2014-01-23/share/emacs/24.3.50/lisp/sort.elc"
  sort-fold-case
  sort-fold-case
  (t . sort-subr)
  (defun . sort-subr)
  (defun . sort-build-lists)
  (defun . sort-reorder-buffer)
  (t . sort-lines)
  (defun . sort-lines)
  (t . sort-paragraphs)
  ...)

That corresponds to what the `load-history' doc describes, so
I don't really think (require . fit-frame) should be considered
a "weird cons cell", provided it occurs at the right place.

But judging from the definition of `help-fns--autoloaded-p',
which loops over the `load-history' entries (it should not
descend inside entries, AFAICS), the error would be raised only
if `load-history' somehow had that cons cell as the car of one
of its entries, instead of as the cadr, caddr, etc.

AFAIK, I do not have any code that fiddles with `load-history',
but that session that I reported from involved loading a bunch
of the BBDB code, so I cannot speak for that.  Grepping the
BBDB files, I find no occurrence of `load-history' there either.

I don't see a problem with the `help-fns--autoloaded-p' code,
offhand.  But maybe it should made be bullet-proof, ensuring
that (caar load-hist) is a string before calling
`file-name-sans-extension'?





       reply	other threads:[~2014-01-26 18:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<cfa22bc5-b446-4bdd-beb5-4050ea5f0fec@default>
     [not found] ` <<bbb39510-b1db-46ec-ae8e-0fcdab41da84@default>
     [not found]   ` <<83txcqaazz.fsf@gnu.org>
2014-01-26 18:33     ` Drew Adams [this message]
2014-01-27  2:12       ` bug#16553: 24.3.50; `file-truename' returns a cons? (wrong-type-argument stringp (...)) Stefan Monnier
2014-01-27  2:43         ` Drew Adams
2014-01-27  2:55           ` Stefan Monnier
2014-01-27  3:07             ` Drew Adams
2014-02-10  3:44       ` Lars Ingebrigtsen
2014-01-25 22:35 Drew Adams
2014-01-25 23:09 ` Drew Adams
2014-01-26  1:16   ` Glenn Morris
2014-01-26 17:50   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ea26242-db04-4456-b4dd-3680fbd76949@default \
    --to=drew.adams@oracle.com \
    --cc=16553@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).