Subject: bug#42827: 27.1; ~/Emacs file not read at init

From: Robert Pluim <[email-masked]>
Date: Wed, 12 Aug 2020 18:08:16 +0200

>>>>> On Wed, 12 Aug 2020 16:38:18 +0200, Andreas Schwab <[email-masked]> said:

    Andreas> On Aug 12 2020, Robert Pluim wrote:
    Tomasz> Forgotten / somewhere? 
    Robert> Hmm. Any chance of catching that in gdb so we can see where itʼs being
    Robert> called from?
    >> 
    >> Completely WAG:
    >> 
    >> diff --git a/src/xrdb.c b/src/xrdb.c
    >> index e3a1fcb15a..3d7f715c88 100644
    >> --- a/src/xrdb.c
    >> +++ b/src/xrdb.c
    >> @@ -289,9 +289,9 @@ get_user_app (const char *class)
    >> /* Check in the home directory.  This is a bit of a hack; let's
    >> hope one's home directory doesn't contain ':' or '%'.  */
    >> char const *home = get_homedir ();
    >> -      db = search_magic_path (home, class, "%L/%N");
    >> +      db = search_magic_path (home, class, "/%L/%N");
    >> if (! db)
    >> -	db = search_magic_path (home, class, "%N");
    >> +	db = search_magic_path (home, class, "/%N");
    >> }

    Andreas> Looks like the bug was added in commit 900276502f.

Yes, get_homedir doesnʼt stick a '/' on the end, and gethomedir did.

If someone can confirm that this fixes it, I can push to master or to
emacs-27, whichever is preferred (personally I donʼt think itʼs a
major bug, but it is a regression).

Robert