nv-elisp

joined 2 years ago
[–] nv-elisp@alien.top 1 points 2 years ago

RGB lit crap wasn't the norm in the 90s. Especially keyboards.

[–] nv-elisp@alien.top 1 points 2 years ago (2 children)

RGB underglow... 90s vibe

Were you alive in the 90s?

[–] nv-elisp@alien.top 1 points 2 years ago

I'm sure the devs would accept a bug report or, better yet, a patch.

[–] nv-elisp@alien.top 1 points 2 years ago

Pointless. Not entertaining or informative.

[–] nv-elisp@alien.top 1 points 2 years ago (1 children)
(add-variable-watcher 'autosave-toggle
                      #'(lambda (_ value _ _)
                          (if value (autosave-setup) (autosave-teardown))))

Don't add an anonymous function. It will make it harder to remove. Better yet, implement this as a minor-mode.

(defvar autosave-delay-interval 1
  "The amount of time to wait before autosaving after a change has occurred.")
(defvar autosave-exclude-buffer-list
  '("COMMIT_EDITMSG" "treemacs-persist")
  "List of buffers to exclude from autosaving")
(defvar autosave-immediate-save-functions-list
  '(switch-to-buffer other-window windmove-up windmove-down windmove-left windmove-right next-buffer previous-buffer)
  "A list of functions which trigger an immediate save")
(defvar autosave-immediate-save-hooks-list
  '(mouse-leave-buffer-hook focus-out-hook)
  "A list of hooks which trigger an immediate save")

These should be user options defined via defcustom

(defmacro advice-add-list (advice-list how function)
  "Add list of advice to given function using the how parameter"
  `(dolist (advice ,advice-list)
     (advice-add advice ,how ,function)))
(defmacro advice-remove-list (advice-list function)
  "Remove list of advice from given function using the how parameter"
  `(dolist (advice ,advice-list)
     (advice-remove advice ,function)))
(defmacro add-hooks (hook-list function)
  "Add list of hooks to given function"
  `(dolist (hook ,hook-list)
    (add-hook hook ,function)))
(defmacro remove-hooks (hook-list function)
  "Remove list of hooks from given function"
  `(dolist (hook ,hook-list)
    (remove-hook hook ,function)))

These should be functions instead of macros. They should also be prefixed with your package's "namespace".

[–] nv-elisp@alien.top 1 points 2 years ago

You don't have anything to guard against a bad response from the server. e.g.

(unless (equal url-http-response-status 200)
  (error "Server responded with status: %S" url-http-response-status))

To position point at the end of the headers:

(goto-char url-http-end-of-headers)

This:

(setq result (cons (cons ...) result))

Is more clearly expressed as:

(push (cons ...) result)

Better yet, you could map over the elements you're interested in and accumulate the results via mapcar or cl-loop. That would obviate the need for the "results" variable.

You could probably shorten things by using the dom-elements function to directly search for the href's you're interested in in combination with dom-parent to get at the parent elements.

Overall your function gets a 65 out of 130 ERU (elisp rating units).

[–] nv-elisp@alien.top 1 points 2 years ago (1 children)

Customize display-buffer-alist to your liking. There is an Emacs manual section devoted to it as well as several online tutorials.

[–] nv-elisp@alien.top 1 points 2 years ago (2 children)

Auctex requires a :pre-build step which involves generating elisp files. If that step fails, certain parts will break. There are several ways to configure the build as well. See the various issues on the bug tracker for more info. e.g,

https://github.com/progfolio/elpaca/issues/191

[–] nv-elisp@alien.top 2 points 2 years ago (1 children)

Long story short, they're not being compiled. The message is just output every time. There is a thread on emacs-devel or emacs-bug archive which offers a more detailed explanation if you search there.

[–] nv-elisp@alien.top 1 points 2 years ago

So a newbie just popped out

New to Emacs doesn't mean "new to life".

[–] nv-elisp@alien.top 1 points 2 years ago (10 children)

Install all-the-packages. It installs all Emacs packages, so you don't have to research or make decisions (who has time for that?). Disk space is cheap nowadays, so a few TB's of data isn't anything to worry about (who has time for that?).

view more: ‹ prev next ›