GNU bug report logs - #38495
Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname

Previous Next

Package: emacs;

Reported by: Andrea Cardaci <cyrus.and <at> gmail.com>

Date: Wed, 4 Dec 2019 22:32:01 UTC

Severity: normal

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38495 in the body.
You can then email your comments to 38495 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Wed, 04 Dec 2019 22:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrea Cardaci <cyrus.and <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 04 Dec 2019 22:32:02 GMT) Full text and rfc822 format available.

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

From: Andrea Cardaci <cyrus.and <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
Date: Wed, 4 Dec 2019 23:31:09 +0100
Hi,

I'm trying the master version
(0e774d4f355b4f12a625da5ca9602d1ba876bcc1) and these two files are now
ignored by Emacs, it used to work in version 26.1, well it used to
load the .Xdefaults-hostname file but even that version ignored
.Xdefaults while this page says otherwise:

https://www.gnu.org/software/emacs/manual/html_node/efaq/Emacs-ignores-X-resources.html

In any case the master version now ignores both files. But, according
to strace, it opens that file:

> $ strace -f /opt/emacs/bin/emacs |& grep Xdefaults
> [pid 11310] openat(AT_FDCWD, "/home/cyrus/.Xdefaults-hostname", O_RDONLY) = 6

Instead (discovered via strace) Emacs uses the ~/.Xdefaults/hostname
file, this actually works but it's undocumented and doesn't work in
Emacs 26.1.


Best,
Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Thu, 05 Dec 2019 07:53:02 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Andrea Cardaci <cyrus.and <at> gmail.com>
Cc: , 38495 <at> debbugs.gnu.org
Subject: Re: bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
Date: Thu, 05 Dec 2019 07:51:52 +0000
>>>>> Andrea Cardaci <cyrus.and <at> gmail.com> writes:

    > Hi, I'm trying the master version
    > (0e774d4f355b4f12a625da5ca9602d1ba876bcc1) and these two files are
    > now ignored by Emacs, it used to work in version 26.1, well it
    > used to load the .Xdefaults-hostname file but even that version
    > ignored .Xdefaults while this page says otherwise:

    > https://www.gnu.org/software/emacs/manual/html_node/efaq/Emacs-ignores-X-resources.html

    > In any case the master version now ignores both files. But,
    > according to strace, it opens that file:

    >> $ strace -f /opt/emacs/bin/emacs |& grep Xdefaults [pid 11310]
    >> openat(AT_FDCWD, "/home/cyrus/.Xdefaults-hostname", O_RDONLY) = 6

    > Instead (discovered via strace) Emacs uses the
    > ~/.Xdefaults/hostname file, this actually works but it's
    > undocumented and doesn't work in Emacs 26.1.


Today's pull from master reads my ~/.Xdefaults satisfactorily.


-- 
Colin Baxter
www.Colin-Baxter.com




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Thu, 05 Dec 2019 11:40:01 GMT) Full text and rfc822 format available.

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

From: Andrea Cardaci <cyrus.and <at> gmail.com>
To: Colin Baxter <m43cap <at> yandex.com>
Cc: 38495 <at> debbugs.gnu.org
Subject: Re: bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
Date: Thu, 5 Dec 2019 12:39:34 +0100
On Thu, 5 Dec 2019 at 08:51, Colin Baxter <m43cap <at> yandex.com> wrote:
> Today's pull from master reads my ~/.Xdefaults satisfactorily.

Hi Colin,

The only way here is to put my file in ~/.Xdefaults/hostname.
According to strace, the .Xdefault file (no -hostname suffix) is never
read. Could you try with strace too?

I suspect that you have loaded that file with xrdb -load so Emacs uses
the database and not the actual file.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Thu, 05 Dec 2019 12:12:01 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Andrea Cardaci <cyrus.and <at> gmail.com>
Cc: , 38495 <at> debbugs.gnu.org
Subject: Re: bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
Date: Thu, 05 Dec 2019 12:11:23 +0000
Dear Andrea,
>>>>> Andrea Cardaci <cyrus.and <at> gmail.com> writes:

    > On Thu, 5 Dec 2019 at 08:51, Colin Baxter <m43cap <at> yandex.com> wrote:
    >> Today's pull from master reads my ~/.Xdefaults satisfactorily.

    > Hi Colin,

    > The only way here is to put my file in ~/.Xdefaults/hostname.
    > According to strace, the .Xdefault file (no -hostname suffix) is
    > never read. Could you try with strace too?

    > I suspect that you have loaded that file with xrdb -load so Emacs
    > uses the database and not the actual file.

I've done Ctl-Alt <f1> to log in on a new tty, with a different window
manager (stumpwm). The output of strace is what I'd expect - I've redacted
my user and host names:

[pid  7771] open("/home/username/.Xdefaults", O_RDONLY) = 10
[pid  7771] open("/home/username/.Xdefaults-host", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  7771] open("/home/username/.Xdefaults", O_RDONLY) = 10
[pid  7771] open("/home/username/.Xdefaults/host", O_RDONLY) = -1 ENOTDIR (Not a directory)

I only have ~/.Xdefaults and no ~/.Xdefaults/host or ~/.Xdefaults/host
files.

Hope this helps.

Best wishes,




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Thu, 05 Dec 2019 12:29:02 GMT) Full text and rfc822 format available.

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

From: Andrea Cardaci <cyrus.and <at> gmail.com>
To: Colin Baxter <m43cap <at> yandex.com>
Cc: 38495 <at> debbugs.gnu.org
Subject: Re: bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
Date: Thu, 5 Dec 2019 13:28:34 +0100
Hi Colin,

Thanks for trying it out.

On Thu, 5 Dec 2019 at 13:11, Colin Baxter <m43cap <at> yandex.com> wrote:
> [pid  7771] open("/home/username/.Xdefaults", O_RDONLY) = 10
> [pid  7771] open("/home/username/.Xdefaults-host", O_RDONLY) = -1 ENOENT (No such file or directory)
> [pid  7771] open("/home/username/.Xdefaults", O_RDONLY) = 10
> [pid  7771] open("/home/username/.Xdefaults/host", O_RDONLY) = -1 ENOTDIR (Not a directory)

Well, this is super weird, if I only place a .Xdefault file in my home
and run Emacs via strace I see:

> $ strace -f emacs |& grep Xdefaults
> [pid 31920] openat(AT_FDCWD, "/home/cyrus/.Xdefaults-hostname", O_RDONLY) = -1 ENOENT (No such file or directory)
> [pid 31920] openat(AT_FDCWD, "/home/cyrus/.Xdefaults/hostname", O_RDONLY) = -1 ENOTDIR (Not a directory)

Also marginally weird that we're seeing different syscalls (open vs openat).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Thu, 05 Dec 2019 12:49:01 GMT) Full text and rfc822 format available.

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

From: Colin Baxter <m43cap <at> yandex.com>
To: Andrea Cardaci <cyrus.and <at> gmail.com>
Cc: , 38495 <at> debbugs.gnu.org
Subject: Re: bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
Date: Thu, 05 Dec 2019 12:48:17 +0000
Dear Andrea,
>>>>> Andrea Cardaci <cyrus.and <at> gmail.com> writes:

    > Hi Colin, Thanks for trying it out.

    > On Thu, 5 Dec 2019 at 13:11, Colin Baxter <m43cap <at> yandex.com> wrote:
    >> [pid 7771] open("/home/username/.Xdefaults", O_RDONLY) = 10 [pid
    >> 7771] open("/home/username/.Xdefaults-host", O_RDONLY) = -1
    >> ENOENT (No such file or directory) [pid 7771]
    >> open("/home/username/.Xdefaults", O_RDONLY) = 10 [pid 7771]
    >> open("/home/username/.Xdefaults/host", O_RDONLY) = -1 ENOTDIR
    >> (Not a directory)

    > Well, this is super weird, if I only place a .Xdefault file in my
    > home and run Emacs via strace I see:

    >> $ strace -f emacs |& grep Xdefaults [pid 31920] openat(AT_FDCWD,
    >> "/home/cyrus/.Xdefaults-hostname", O_RDONLY) = -1 ENOENT (No such
    >> file or directory) [pid 31920] openat(AT_FDCWD,
    >> "/home/cyrus/.Xdefaults/hostname", O_RDONLY) = -1 ENOTDIR (Not a
    >> directory)

    > Also marginally weird that we're seeing different syscalls (open
    > vs openat).

Good luck on finding a solution. I've reached the end of my sys
abilities.

Best wishes,




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Tue, 21 Sep 2021 18:43:01 GMT) Full text and rfc822 format available.

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

From: Łukasz Stelmach <steelman <at> post.pl>
To: 38495 <at> debbugs.gnu.org. 
Subject: Fixed
Date: Tue, 21 Sep 2021 20:41:52 +0200
[Message part 1 (text/plain, inline)]
Hi,

Apparently this was fixed since in

    https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4b118bdca1d8aa130fb67eadb16e08e87e698aa4
-- 
Miłego dnia,
Łukasz Stelmach
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38495; Package emacs. (Tue, 21 Sep 2021 18:53:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Łukasz Stelmach <steelman <at> post.pl>
Cc: 38495 <at> debbugs.gnu.org
Subject: Re: bug#38495: Fixed
Date: Tue, 21 Sep 2021 20:52:23 +0200
Łukasz Stelmach <steelman <at> post.pl> writes:

> Apparently this was fixed since in
>
>     https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4b118bdca1d8aa130fb67eadb16e08e87e698aa4

OK; I'm closing this bug report, then.  (If there's still issues in this
area, please respond to the debbugs address and we'll reopen.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 38495 <at> debbugs.gnu.org and Andrea Cardaci <cyrus.and <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 21 Sep 2021 18:53:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Oct 2021 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 188 days ago.

Previous Next


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