Subject: bug#77727: [PATCH] Limit rust-ts-specific comment-start check to rust-ts (bug#77727)

From: Konstantin Kharlamov <[email-masked]>
Date: Thu, 17 Apr 2025 21:12:19 +0300

On Thu, 2025-04-17 at 16:12 +0300, Eli Zaretskii wrote:
> > From: Konstantin Kharlamov <[email-masked]>
> > Cc: [email-masked], [email-masked]
> > Date: Thu, 17 Apr 2025 14:09:54 +0300
> >
> > > Rebuilding Emacs produces a new .pdmp file, which the previous
> > > binary
> > > will not load (because it doesn't fit it).  When you rebuild
> > > Emacs,
> > > you need to invoke "make install" afterwards, to install the
> > > Emacs
> > > binary and the auxiliary files, including the new .pdmp file, in
> > > the
> > > place where Emacs expects to find it.  Did you run "make install"
> > > after rebuilding?
> >
> > Yes, it's being run as `make DESTDIR="$pkgdir/" install`
>
> What is the value of $pkgdir ?

It's /home/constantine/Projects/builds/emacs-git/pkg/emacs-git/

> > Okay, so I just tried doing a `find -type f -name "*.pdmp" -
> > delete`,
> > and then rebuilding Emacs (to make sure no pdmp files are stale),
> > then
> > assembled/installed package. I see the file ends up is at
> >
> > /usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu/emacs-
> > e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pd
> > mp
>
> When you build Emacs, it shows the fingerprint, like this:
>
>   Dumping under the name emacs.pdmp
>   Dumping fingerprint:
> 189095568e4fae77c858f1c5071e36beaf86dbf632e161df634a1099dc31f876
>   Dump complete
>
> Is the fingerprint in your case identical to the name of the .pdmp
> file (sans the extension)?

Yes. I just rebuilt while saving the output, and there are 3
fingerprints mentioning lines:

Dumping fingerprint: e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5
Dumping fingerprint: e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5
/usr/bin/install -c -m 644 src/emacs.pdmp "/home/constantine/Projects/builds/emacs-git/pkg/emacs-git//usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu"/emacs-`./src/emacs --fingerprint`.pdmp

It is the file that ends up installed: /usr/lib/emacs/31.0.50/x86_64-
pc-linux-gnu/emacs-
e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pdmp.

> If it is identical, are you sure you are invoking the correct 'emacs'
> executable?

I am invoking Emacs globally, i.e. just `emacs`. I install newly built
Emacs, then I try calling `emacs -Q`, I get the error, and then I
install the older Emacs build I was using previously and which works.

>   How many Emacs executables do you have in the $pkgdir/bin
> directory (from where you supposedly invoke Emacs), and what are
> their names?

    λ ls ./pkg/emacs-git/usr/bin/
    ebrowse  emacs  emacs-31.0.50  emacsclient  etags.emacs  nemacs
    λ pacman -Ql emacs-git | grep usr/bin/
    emacs-git /usr/bin/
    emacs-git /usr/bin/ebrowse
    emacs-git /usr/bin/emacs
    emacs-git /usr/bin/emacs-31.0.50
    emacs-git /usr/bin/emacsclient
    emacs-git /usr/bin/etags.emacs
    emacs-git /usr/bin/nemacs

Btw, since you asked, I also just of thought of trying to invoke
`./pkg/emacs-git/usr/bin/emacs -Q` rather than the global emacs. It ends up
printing same output.

> > This is same location as for the "working" Emacs build:
>
> What is the "working" Emacs build, and how is it different from the
> one that doesn't work?

They're just assembled from different commits, I looked at the files
list and it's the same, barring the difference in hash names in some
files.

Actually, it turns out that assembling from the older commit fails as
well now. I will try tomorrow to remove whole build directory
completely and re-clone everything from scratch.

> > > If you run Emacs from the src directory of the build tree, does
> > > it
> > > work?
> >
> > Yes, if I run it as `./build/src/emacs -Q`, it does work.
>
> Is the contents of the emacs.pdmp file in the source directory
> identical to the contents of
> /usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu/emacs-
> e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pdmp
> ?

Yes:

    λ md5sum ./pkg/emacs-git/usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu/emacs-e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pdmp /usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu/emacs-e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pdmp
    36511c7936b906a2f8719e9eea6401c2  ./pkg/emacs-git/usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu/emacs-e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pdmp
    36511c7936b906a2f8719e9eea6401c2  /usr/lib/emacs/31.0.50/x86_64-pc-linux-gnu/emacs-e58067db04d41ca123ffe4ddc2ed9d0ebdef685b08d89c87b01125fbfd437df5.pdmp