Fork me on GitHub
#spacemacs
<
2020-07-02
>
jumar06:07:18

Sharing here - maybe someone has a good tip how to make this faster: https://clojurians.slack.com/archives/C0617A8PQ/p1593590912213400

jumar06:07:40

jumar  [3:05 PM] My problem is that Emacs/Cider is just really slow in this case - in terminal it’s fine but Emacs will freeze for up to a minute while waiting for the output to be written to the repl buffer; the process that generates this output only takes several seconds

practicalli-john06:07:19

If the log messages have long lines (which is common) then Emacs is going to be slow. Disabling font locking (if enabled) may make it not quite so slow, e.g by putting a buffer into fundamental-mode. Although I doubt much difference will be noticed. My only advice is to log to a rotating file or send logs as objects directly to a proper logging tool like Elastic search/Kibana. If that's not possible, avoid using the REPL buffer directly.

jumar06:07:41

The log messages are NOT usually very long but there are quite a few of them (TRACE logging) and I have font locking disabled. I tried to set the REPL buffer mode to fundamental-mode but it just broke. In general, I should probably write to a separate log file but it's just much more convenient (and the default production setup anyway) to log to STDOUT; also in this case I was debugging an issue which only happened with TRACE logging enabled and written to stdout. What do you mean "avoid using the REPL buffer directly"?

jumar06:07:44

(Btw. another time when it gets noticably slower is when a larger data structure (such as ring request) is printed into the REPL - and it can be quite convenient to be able to copy this structure and use it for experiments; although I understand that in many cases I can just use def or perhaps dump it to an edn file too)

practicalli-john06:07:33

From a quick internet search, I found this minor mode that may be worth a try (I haven't tried it). If it works it would be better than switch ING to fundamental-mode https://github.com/rakete/too-long-lines-mode

jumar06:07:41

Thanks I'll have a look at it.

dev4openid09:07:20

When I open spacemacs I receive this message: Skipping check for new version (reason: dotfile) custom-initialize-reset: Creating directory: Permission denied, /path

dev4openid09:07:14

How can I diagnose this?

practicalli-john09:07:05

I suggest looking at the docs for that function, SPC h d f custom-initialize-reset to see what it does. If it's from a Spacemacs layer, then check if the documentation mentions it

practicalli-john09:07:33

I think Spacemacs only creates files / directories in elpa (for packages) .cache and private (both under .emacs.d). I assume you have checked read write permission on .emacs.d directory.

practicalli-john09:07:35

Most likely it's some package that is trying to write somewhere. The docs should say which file it's in.

dev4openid09:07:56

the help does not list SPC h d f custom-initialize-reset

practicalli-john09:07:04

SPC / with a file open from inside .emacs.d ?? If nothing found, did you add something to .spacemacs

dev4openid09:07:20

I looked at .emacs.d I have group permissions under my name XXX as R&W however the access is granted none. If I grant access R&W it must be recursive?

dev4openid09:07:07

Well I changed permissions and now the SPC h d f custom-initialize-reset provides data

dev4openid09:07:10

From the help, the custome.el. link led to custom.el.gz file

(defun custom-initialize-reset (symbol exp)
  "Initialize SYMBOL based on EXP.
Set the symbol, using its `:set' function (or `set-default' if it has none).
The value is either the symbol's current value
 (as obtained using the `:get' function), if any,
or the value in the symbol's `saved-value' property if any,
or (last of all) the value of EXP."
  (funcall (or (get symbol 'custom-set) #'set-default-toplevel-value)
           symbol
           (condition-case nil
               (let ((def (default-toplevel-value symbol))
                     (getter (get symbol 'custom-get)))
                 (if getter (funcall getter symbol) def))
             (error

dev4openid09:07:53

Now I do not have custome-init...... in my .spacemacs file

practicalli-john09:07:03

No need to paste in the function source, it looks like a function that comes with Emacs.

dev4openid09:07:54

Yes, but it has no reference in .spacemacs and this messgae is persistent

practicalli-john09:07:55

It seems its just a permissions issue with your .emacs.d directory, make sure you can read/write and create files and dirs recursively

practicalli-john09:07:33

Oh, so you rebooted after updating the .emacs.d file permissions? If so, you have really broken something badly

dev4openid09:07:04

Bi I did not reboot

dev4openid09:07:26

I have permissions to create files etc in .emacs.d

dev4openid09:07:42

emacs generally works fine however I have this darn message

dev4openid09:07:28

I updated the emacs version and updated all packages - seems fine but same error message

practicalli-john09:07:10

Unless you know what you changed before getting this message, I would wipe .emacs.d and .spacemacs and start again. I cant help if I dont know what has been changed. Alterntatively, raise an issue on Spacemacs github repository with SPC h I , that will provide info about your system and layers used.

dev4openid09:07:27

I can add/create recursively files in emacs.d I have/can update packages without problems. I have updated with git pull --rebase the emacs I can emacs edit files and run cider BUT I cant resolve this message for some reason. I am not sure as to how it is even referred to

dev4openid09:07:08

OK start again 😰

practicalli-john10:07:10

As the error message is from a built in Emacs function, then it seems likely that something is calling that function incorrectly. As the error message doesnt show where that call is from or give any clues as to the path its trying to write, then isolating the issue is going to be tricky.