* bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
@ 2019-12-04 22:31 Andrea Cardaci
2019-12-05 7:51 ` Colin Baxter
2021-09-21 18:41 ` bug#38495: Fixed Łukasz Stelmach
0 siblings, 2 replies; 8+ messages in thread
From: Andrea Cardaci @ 2019-12-04 22:31 UTC (permalink / raw)
To: 38495
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
2019-12-04 22:31 bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname Andrea Cardaci
@ 2019-12-05 7:51 ` Colin Baxter
2019-12-05 11:39 ` Andrea Cardaci
2021-09-21 18:41 ` bug#38495: Fixed Łukasz Stelmach
1 sibling, 1 reply; 8+ messages in thread
From: Colin Baxter @ 2019-12-05 7:51 UTC (permalink / raw)
To: Andrea Cardaci; +Cc: 38495
>>>>> Andrea Cardaci <cyrus.and@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
2019-12-05 7:51 ` Colin Baxter
@ 2019-12-05 11:39 ` Andrea Cardaci
2019-12-05 12:11 ` Colin Baxter
0 siblings, 1 reply; 8+ messages in thread
From: Andrea Cardaci @ 2019-12-05 11:39 UTC (permalink / raw)
To: Colin Baxter; +Cc: 38495
On Thu, 5 Dec 2019 at 08:51, Colin Baxter <m43cap@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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
2019-12-05 11:39 ` Andrea Cardaci
@ 2019-12-05 12:11 ` Colin Baxter
2019-12-05 12:28 ` Andrea Cardaci
0 siblings, 1 reply; 8+ messages in thread
From: Colin Baxter @ 2019-12-05 12:11 UTC (permalink / raw)
To: Andrea Cardaci; +Cc: 38495
Dear Andrea,
>>>>> Andrea Cardaci <cyrus.and@gmail.com> writes:
> On Thu, 5 Dec 2019 at 08:51, Colin Baxter <m43cap@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,
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
2019-12-05 12:11 ` Colin Baxter
@ 2019-12-05 12:28 ` Andrea Cardaci
2019-12-05 12:48 ` Colin Baxter
0 siblings, 1 reply; 8+ messages in thread
From: Andrea Cardaci @ 2019-12-05 12:28 UTC (permalink / raw)
To: Colin Baxter; +Cc: 38495
Hi Colin,
Thanks for trying it out.
On Thu, 5 Dec 2019 at 13:11, Colin Baxter <m43cap@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).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname
2019-12-05 12:28 ` Andrea Cardaci
@ 2019-12-05 12:48 ` Colin Baxter
0 siblings, 0 replies; 8+ messages in thread
From: Colin Baxter @ 2019-12-05 12:48 UTC (permalink / raw)
To: Andrea Cardaci; +Cc: 38495
Dear Andrea,
>>>>> Andrea Cardaci <cyrus.and@gmail.com> writes:
> Hi Colin, Thanks for trying it out.
> On Thu, 5 Dec 2019 at 13:11, Colin Baxter <m43cap@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,
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#38495: Fixed
2019-12-04 22:31 bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname Andrea Cardaci
2019-12-05 7:51 ` Colin Baxter
@ 2021-09-21 18:41 ` Łukasz Stelmach
2021-09-21 18:52 ` Lars Ingebrigtsen
1 sibling, 1 reply; 8+ messages in thread
From: Łukasz Stelmach @ 2021-09-21 18:41 UTC (permalink / raw)
To: 38495
[-- Attachment #1: Type: text/plain, Size: 184 bytes --]
Hi,
Apparently this was fixed since in
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4b118bdca1d8aa130fb67eadb16e08e87e698aa4
--
Miłego dnia,
Łukasz Stelmach
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 617 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-09-21 18:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04 22:31 bug#38495: Emacs ignores ~/.Xdefaults and ~/.Xdefaults-hostname Andrea Cardaci
2019-12-05 7:51 ` Colin Baxter
2019-12-05 11:39 ` Andrea Cardaci
2019-12-05 12:11 ` Colin Baxter
2019-12-05 12:28 ` Andrea Cardaci
2019-12-05 12:48 ` Colin Baxter
2021-09-21 18:41 ` bug#38495: Fixed Łukasz Stelmach
2021-09-21 18:52 ` Lars Ingebrigtsen
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).