unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42827: 27.1; ~/Emacs file not read at init
@ 2020-08-12 12:05 Tomasz Kowalski
  2020-08-12 13:08 ` Robert Pluim
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Tomasz Kowalski @ 2020-08-12 12:05 UTC (permalink / raw)
  To: 42827

Hi there,

Emacs ignores ~/Emacs file at startup. Below are the relevant lines 
from strace:
--------------------------------------------
openat(AT_FDCWD, "/home/tomaszen_AU.utf8/Emacs", O_RDONLY) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/home/tomaszEmacs", O_RDONLY) = -1 ENOENT (No such
file or directory)
uname({sysname="Linux", nodename="schooner", ...}) = 0
--------------------------------------------
"/home/tomaszEmacs" should clearly be "/home/tomasz/Emacs" and
"/home/tomaszen_AU.utf8/Emacs" should
be "/home/tomasz/en_AU.utf8/Emacs"

Forgotten / somewhere? 

Best regards,

Tomasz
-- 
Associate Professor, Dept. of Mathematics & Statistics, 
La Trobe University, Melbourne, VIC3086, Australia. 
Phone: (+61) 3 9479 2595,
Web (personal): tomasz-kowalski.github.io




^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 12:05 bug#42827: 27.1; ~/Emacs file not read at init Tomasz Kowalski
@ 2020-08-12 13:08 ` Robert Pluim
  2020-08-12 13:21   ` Robert Pluim
  2020-08-12 13:16 ` Lars Ingebrigtsen
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2020-08-12 13:08 UTC (permalink / raw)
  To: Tomasz Kowalski; +Cc: 42827

>>>>> On Wed, 12 Aug 2020 12:05:02 +0000, Tomasz Kowalski <T.Kowalski@latrobe.edu.au> said:

    Tomasz> Hi there,
    Tomasz> Emacs ignores ~/Emacs file at startup. Below are the relevant lines 
    Tomasz> from strace:
    Tomasz> --------------------------------------------
    Tomasz> openat(AT_FDCWD, "/home/tomaszen_AU.utf8/Emacs", O_RDONLY) = -1 ENOENT
    Tomasz> (No such file or directory)
    Tomasz> openat(AT_FDCWD, "/home/tomaszEmacs", O_RDONLY) = -1 ENOENT (No such
    Tomasz> file or directory)
    Tomasz> uname({sysname="Linux", nodename="schooner", ...}) = 0
    Tomasz> --------------------------------------------
    Tomasz> "/home/tomaszEmacs" should clearly be "/home/tomasz/Emacs" and
    Tomasz> "/home/tomaszen_AU.utf8/Emacs" should
    Tomasz> be "/home/tomasz/en_AU.utf8/Emacs"

    Tomasz> Forgotten / somewhere? 

Hmm. Any chance of catching that in gdb so we can see where itʼs being
called from?

Robert





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 12:05 bug#42827: 27.1; ~/Emacs file not read at init Tomasz Kowalski
  2020-08-12 13:08 ` Robert Pluim
@ 2020-08-12 13:16 ` Lars Ingebrigtsen
       [not found] ` <mailman.1695.1597235644.2739.bug-gnu-emacs@gnu.org>
  2020-08-17  4:45 ` Paul Eggert
  3 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-12 13:16 UTC (permalink / raw)
  To: Tomasz Kowalski; +Cc: 42827

Tomasz Kowalski <T.Kowalski@latrobe.edu.au> writes:

> openat(AT_FDCWD, "/home/tomaszen_AU.utf8/Emacs", O_RDONLY) = -1 ENOENT
> (No such file or directory)

I can confirm:

[pid 2320398] openat(AT_FDCWD, "/home/larsien_US.UTF-8/Emacs", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 2320398] openat(AT_FDCWD, "/home/larsiEmacs", O_RDONLY) = -1 ENOENT (No such file or directory)

(This is on Debian sid.)

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 13:08 ` Robert Pluim
@ 2020-08-12 13:21   ` Robert Pluim
  2020-08-12 14:38     ` Andreas Schwab
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2020-08-12 13:21 UTC (permalink / raw)
  To: Tomasz Kowalski; +Cc: 42827


    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");
     }
 
   return db;





^ permalink raw reply related	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
       [not found] ` <mailman.1695.1597235644.2739.bug-gnu-emacs@gnu.org>
@ 2020-08-12 14:26   ` Alan Mackenzie
  2020-08-12 16:06     ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Mackenzie @ 2020-08-12 14:26 UTC (permalink / raw)
  To: Tomasz Kowalski; +Cc: acm, 42827

In article <mailman.1695.1597235644.2739.bug-gnu-emacs@gnu.org> you wrote:
> Hi there,

> Emacs ignores ~/Emacs file at startup. Below are the relevant lines 
> from strace:
> --------------------------------------------
> openat(AT_FDCWD, "/home/tomaszen_AU.utf8/Emacs", O_RDONLY) = -1 ENOENT
> (No such file or directory)
> openat(AT_FDCWD, "/home/tomaszEmacs", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> uname({sysname="Linux", nodename="schooner", ...}) = 0
> --------------------------------------------
> "/home/tomaszEmacs" should clearly be "/home/tomasz/Emacs" and
> "/home/tomaszen_AU.utf8/Emacs" should
> be "/home/tomasz/en_AU.utf8/Emacs"

> Forgotten / somewhere? 

I'm not certain, but I think the problem might well be your upper case
"E" at the beginning of the file name.  I think you also want a ".",
giving a name like

    /homt/tomasz/.emacs

.  Hope that helps!

> Best regards,

> Tomasz
> -- 
> Associate Professor, Dept. of Mathematics & Statistics, 
> La Trobe University, Melbourne, VIC3086, Australia. 
> Phone: (+61) 3 9479 2595,
> Web (personal): tomasz-kowalski.github.io

-- 
Alan Mackenzie (Nuremberg, Germany).






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 13:21   ` Robert Pluim
@ 2020-08-12 14:38     ` Andreas Schwab
  2020-08-12 16:08       ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2020-08-12 14:38 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Tomasz Kowalski, 42827

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");
>      }

Looks like the bug was added in commit 900276502f.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 14:26   ` Alan Mackenzie
@ 2020-08-12 16:06     ` Robert Pluim
  0 siblings, 0 replies; 10+ messages in thread
From: Robert Pluim @ 2020-08-12 16:06 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: Tomasz Kowalski, 42827

>>>>> On 12 Aug 2020 14:26:57 -0000, Alan Mackenzie <acm@muc.de> said:

    Alan> In article <mailman.1695.1597235644.2739.bug-gnu-emacs@gnu.org> you wrote:
    >> Hi there,

    >> Emacs ignores ~/Emacs file at startup. Below are the relevant lines 
    >> from strace:
    >> --------------------------------------------
    >> openat(AT_FDCWD, "/home/tomaszen_AU.utf8/Emacs", O_RDONLY) = -1 ENOENT
    >> (No such file or directory)
    >> openat(AT_FDCWD, "/home/tomaszEmacs", O_RDONLY) = -1 ENOENT (No such
    >> file or directory)
    >> uname({sysname="Linux", nodename="schooner", ...}) = 0
    >> --------------------------------------------
    >> "/home/tomaszEmacs" should clearly be "/home/tomasz/Emacs" and
    >> "/home/tomaszen_AU.utf8/Emacs" should
    >> be "/home/tomasz/en_AU.utf8/Emacs"

    >> Forgotten / somewhere? 

    Alan> I'm not certain, but I think the problem might well be your upper case
    Alan> "E" at the beginning of the file name.  I think you also want a ".",
    Alan> giving a name like

    Alan>     /homt/tomasz/.emacs

This is the Emacs application file under X, not the configuration
file. Iʼd be worried if we looked for .emacs by trying to append a
locale string to $HOME :-)

Robert





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 14:38     ` Andreas Schwab
@ 2020-08-12 16:08       ` Robert Pluim
  2020-08-12 16:25         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2020-08-12 16:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Tomasz Kowalski, 42827

>>>>> On Wed, 12 Aug 2020 16:38:18 +0200, Andreas Schwab <schwab@linux-m68k.org> 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





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 16:08       ` Robert Pluim
@ 2020-08-12 16:25         ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2020-08-12 16:25 UTC (permalink / raw)
  To: Robert Pluim; +Cc: T.Kowalski, schwab, 42827

> From: Robert Pluim <rpluim@gmail.com>
> Date: Wed, 12 Aug 2020 18:08:16 +0200
> Cc: Tomasz Kowalski <T.Kowalski@latrobe.edu.au>, 42827@debbugs.gnu.org
> 
> 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).

If the fix is confirmed, please install on emacs-27.

Thanks.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#42827: 27.1; ~/Emacs file not read at init
  2020-08-12 12:05 bug#42827: 27.1; ~/Emacs file not read at init Tomasz Kowalski
                   ` (2 preceding siblings ...)
       [not found] ` <mailman.1695.1597235644.2739.bug-gnu-emacs@gnu.org>
@ 2020-08-17  4:45 ` Paul Eggert
  3 siblings, 0 replies; 10+ messages in thread
From: Paul Eggert @ 2020-08-17  4:45 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Tomasz Kowalski, Andreas Schwab, 42827-done

> If someone can confirm that this fixes it

I confirmed that your patch fixes the bug that I unfortunately introduced, and I 
installed your patch to emacs-27 in your name. Thanks for the patch, and thank 
you too Tomasz and Andreas for the report and diagnosis.





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-17  4:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-12 12:05 bug#42827: 27.1; ~/Emacs file not read at init Tomasz Kowalski
2020-08-12 13:08 ` Robert Pluim
2020-08-12 13:21   ` Robert Pluim
2020-08-12 14:38     ` Andreas Schwab
2020-08-12 16:08       ` Robert Pluim
2020-08-12 16:25         ` Eli Zaretskii
2020-08-12 13:16 ` Lars Ingebrigtsen
     [not found] ` <mailman.1695.1597235644.2739.bug-gnu-emacs@gnu.org>
2020-08-12 14:26   ` Alan Mackenzie
2020-08-12 16:06     ` Robert Pluim
2020-08-17  4:45 ` Paul Eggert

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).