0

I was using this init file on a NixOS machine.

It is important to note that parts of the file were written with use-package and other parts were a legacy from the classic imperative installation of packages: M-x, package-install, and tweaks on hooks and variables.

This weekend I started a new set-up in a new Macbook Air M1 for professional reasons. I must highlight that I am new to Mac.

As I was trying to make myself at home with Emacs in MacOS, I started to copy small snippets of my old config file and slightly migrate them to mac. As the process was going, I decided to use the opportunity to "code review" my own init file - especially to make it more declarative via use-package. The expectation was to make it more reproducible for future occasions.

Sometimes, especially after creating a declaration of a package not yet installed, there was a weird thing happening. I would receive the following messages on the mini-buffer area:

enter image description here

enter image description here

The funniest point was that after quitting (C-x C-c) and re-starting Emacs, things worked fine (as expected) and the error message would disappear!

And this problem/phenomenon happened multiple times. This is the new config file. See the diff.

Why did this happen? Is the problem related to some specific code snippet? Maybe a reference to a path? Is it related to MacOS?

Now that things work fine and the message is gone, is it possible to reproduce it without installing something new?

1 Answer 1

1

Due to security concern, Apple re-designed the file system beginning with High-Sierra version - see this or a little bit more detailed here - so in your settings you have an absolute path starting with the forbidden System.... and you must replace it with the permitted Users/yourname/.emacs.d or whatever you need.

As for errors in warnings window you see - just do package-refresh-contentsand try again to install the package you need.

2
  • Thanks, how exactly can I replace it? Could you give more instructions? Or a recommended material? Aug 4 at 14:47
  • Your locate-user-emacs-file should be "/Users/pedro/.emacs.d/custom-vars.el" - if it works for you in another hidden folder .dotfiles then ok, although Emacs recommend some special paths - see/search C-h I and choose the node Emacs and search for initialisation files/paths (not easy to write exactly where it is).
    – Ian
    Aug 5 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.