all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "andrés ramírez" <rrandresf@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 14120@debbugs.gnu.org
Subject: bug#14120: invalid load-history in emacsen that CANNOT_DUMP
Date: Mon, 17 Feb 2020 17:14:54 +0000	[thread overview]
Message-ID: <86zhdhi19t.fsf@gmail.com> (raw)
In-Reply-To: <jwvv9o5jlqz.fsf-monnier+emacs@gnu.org>

Hi Stefan.

Stefan> Any chance you can try and investigate where/why/how that
Stefan> spurious value gets pushed to `load-history`?

Yes. I am going to try.

Stefan> AFAICT the only place where `load-history` gets modified is in
Stefan> lread.c:build_load_history.  Could you add some assertions
Stefan> there to try and catch the sucker?

I was aware of that. At that moment. I pointed to lread.c also. But this
seems too happen during startup (reading the dot emacs setup).

I am going to list what I would need to do for reaching the goal:
1. Recompile Emacs23 (for enabling debugging-symbols)
2.  Put a breakpoint on lread.c:build_load_history and watch how
many times it is called and with wich params. It seems a very long list
of params

3. After it. I suppose I should start emacs23 -Q  and try lo call one by
one lread.c:build_load_history with those params. And after every
function invocation I would need to check if that symbol(the spurious
one that corrupts the list) have got inside the
loads-history-list.

An idea: As I have a running emacs23 session right now.
--8<---------------cut here---------------start------------->8---
      (defun load-history-filename-element (file-regexp)
        "Get the first elt of `load-history' whose car matches FILE-REGEXP.
Return nil if there isn't one.
NOTE2ME: upd stringp condition cos of error on tramp"
        (let* ((loads load-history)
               (load-elt (and loads (car loads))))
          (save-match-data
            (while (and loads
                        (or (null (and (car load-elt) (stringp (car load-elt))))
                            (not (string-match file-regexp (car load-elt)))))
              (setq loads (cdr loads)
                    load-elt (and loads (car loads)))))
          load-elt))
 --8<---------------cut here---------------end--------------->8---

The function above could be modified for removing the stringp
validation. And every time load-history-filename-element is called when
an error happens that function show me the file on the history to which the spurious
symbol belongs to?

What Do You think?

AR





  reply	other threads:[~2020-02-17 17:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01 22:47 bug#14120: invalid load-history in emacsen that CANNOT_DUMP BT Templeton
2013-04-03 18:29 ` Stefan Monnier
2019-09-06  0:09   ` Glenn Morris
2020-02-17 13:34   ` Andrés Ramírez
2020-02-17 15:09     ` Stefan Monnier
2020-02-17 17:14       ` andrés ramírez [this message]
2020-02-17 17:46         ` Stefan Monnier
2020-02-18  1:01           ` andrés ramírez
2020-02-18  1:34             ` andrés ramírez
2020-02-18 13:40               ` Stefan Monnier
2020-02-18 13:50                 ` andrés ramírez
2020-02-16 20:55 ` bug#14120: [Robert Weiner] Emacs history selection non-string arguments causing failures for a long time Stefan Monnier
2020-02-17  1:52   ` Stefan Monnier
2020-02-17  2:22     ` Robert Weiner
2020-02-17  3:18     ` Glenn Morris

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

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

  git send-email \
    --in-reply-to=86zhdhi19t.fsf@gmail.com \
    --to=rrandresf@gmail.com \
    --cc=14120@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.