<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Take a look into -d<div><br></div><div><blockquote type="cite"><dt><b>-d</b>, <b>--home</b> <i>HOME_DIR</i></dt><dd>The user's new login directory.<p>If the <b>-m</b> option is given, the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist.</p></dd></blockquote><div><br></div><div>Also, seeing in <a href="https://unix.stackexchange.com/a/259797">https://unix.stackexchange.com/a/259797</a> </div><div><br></div><div><blockquote type="cite"><p>You need to edit the <code>/etc/passwd</code> file to change home directory of users that are currently logged in.</p><p>Edit the <code>/etc/passwd</code> with <code>sudo vipw</code> and change home directory of the user.</p></blockquote>AFAIK emacs read from the HOME env variable to guess its .emacs.d location, so I’m assuming there’s something fishy there. If you start emacs graphically from a desktop environment, it won’t read any `export HOME=` you might have in any .bashrc or similar file. Btw if you’re using, launching emacs from a DE you can use `~/.xprofile` to alters env variables, similarly to ~/.bashrc</div><div><br><blockquote type="cite"><div>On 24. Jan 2023, at 16:30, Asalle <asalle.kim@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Hi all!</div><div><br></div><div>I changed my username via `usermod -l newname oldname` and I also changed my home folder name accordingly. However, now when I start emacs, it says `/home/oldname/.emacs.d does not exist. Create it?`. I removed the whole `/home/newname/.emacs.d/.cache` folder. And I tried to find any env vars that contain `/home/oldname` via `apropos-value` - couldn't find anything that stands out.</div><div><br></div><div>How do I make it work with my new username without removing the whole `/home/newname/.emacs.d`?<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards,</div><div>Asa</div></div></div></div></div>
_______________________________________________<br>emacs-berlin mailing list<br>emacs-berlin@emacs-berlin.org<br>https://mailb.org/mailman/listinfo/emacs-berlin<br></div></blockquote></div><br></div></body></html>