GNU bug report logs - #36877
25.3; uniquify renaway uniquify-managed list

Previous Next

Package: emacs;

Reported by: David Biesack <David.Biesack <at> Apiture.com>

Date: Wed, 31 Jul 2019 16:08:04 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.3

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 36877 <at> debbugs.gnu.org (full text, mbox):

From: David Biesack <David.Biesack <at> Apiture.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: "36877 <at> debbugs.gnu.org" <36877 <at> debbugs.gnu.org>
Subject: Re: bug#36877: 25.3; uniquify renaway uniquify-managed list
Date: Fri, 16 Aug 2019 14:36:25 +0000
I'll restart Emacs and when I get a backtrace again I'll attach it as file.

David Biesack | Vice President, API Platforms
David.Biesack <at> apiture.com | @davidbiesack <https://twitter.com/davidbiesack>





On 8/15/19, 1:20 PM, "Noam Postavsky" <npostavs <at> gmail.com> wrote:

    David Biesack <David.Biesack <at> Apiture.com> writes:

    >   uniquify-rationalize-file-buffer-names("index.html" "/Users/david.biesack/dev/developer.apiture.com/_site/docs/apis/workflow/v0.13.0/" #<buffer index.html>)
    >   uniquify--create-file-buffer-advice(#[257 "\301!\211\302\230\203\f

    Ah right, Emacs 25 still has that thing where it cuts off nthe pasted
    text after NUL bytes.  For next time, saving the backtrace to a file and
    attaching it should work better.

    Looking at the fix-list in the backtrace, we have:

      [cl-struct-uniquify-item "index.html" "/Users/david.biesack/dev/developer.apiture.com/_site/docs/apis/workflow/v0.13.0" #<buffer index.html> nil]
      { ;; repeated 5 times...
      [cl-struct-uniquify-item "index.html" "/Users/david.biesack/dev/developer.apiture.com/_site/docs/apis/sample" #<buffer index.html<docs/apis/sample>> "index.html<docs/apis/sample>"]
      [cl-struct-uniquify-item "index.html" "/Users/david.biesack/dev/developer.apiture.com/_site/doc/apis/sample" #<buffer index.html<doc/apis/sample>> "index.html<doc/apis/sample>"]
      [cl-struct-uniquify-item "index.html" "/Users/david.biesack/dev/developer.apiture.com/_site/docs/apis/sample/sample" #<buffer index.html<sample/sample>> "index.html<sample/sample>"]
      [cl-struct-uniquify-item "index.html" "/Users/david.biesack/dev/developer.apiture.com" #<buffer index.html<developer.apiture.com>> "index.html<developer.apiture.com>"]
      [cl-struct-uniquify-item "index.html" "/Users/david.biesack/dev/developer.apiture.com/_site/docs/concepts" #<buffer index.html<concepts>> "index.html<concepts>"]
      }

    I think that means the (dolist (buffer (buffer-list))...) somehow went
    over #<buffer index.html<docs/apis/sample>> 5 times, or else that buffer
    already had duplicates in its uniquify-managed list (i.e., this
    backtrace triggerred "too late").

    Did you add the advice in an ongoing session?  If yes, then it you
    should clear out existing duplicates first, so we can catch a "fresh"
    instance.  Evaluating the below should do:

        (let ((htable (make-hash-table :test 'equal)))
          (save-current-buffer
            (dolist (buf (buffer-list))
              (set-buffer buf)
              (when (cdr uniquify-managed)
                (clrhash htable)
                (dolist (item (cdr uniquify-managed))
                  (puthash item t htable))
                (let ((managed nil))
                  (maphash (lambda (k _v)
                             (push k managed))
                           htable)
                  (push (car uniquify-managed) managed)
                  (setq uniquify-managed managed))))))

    If that backtrace was actually from a new session (that is, the advice
    was added at the beginning of the session), then it means the problem is
    coming from some other unexpected spot.



Disclaimer: The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify Apiture immediately by replying to this message and deleting it from your computer.

This bug report was last modified 4 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.