0

I'm trying to install this package manually, adding the org-bullets.el file to my emacs directory.

As suggested, I enabled it adding

(load-file "~/.emacs.d/org-bullets.el")

(require 'org-bullets)

(add-hook 'org-mode-hook #'org-bullets-mode)

to my init.el

The program works but now when I start Emacs the mini buffer always shows this message:

Loading /home/user/.emacs.d/org-bullets.el (source)...done

How can I get rid of it?

I'm running Emacs 27.2

0

You can crib the load-file function and replace it with a silent version.

The load-file function looks like this (just do C-h f load-file and then click on the link of the file that contains it (files.el) to see the definition of the function):

(defun load-file (file)
  "Load the Lisp file named FILE."
  ;; This is a case where .elc and .so/.dll make a lot of sense.
  (interactive (list (let ((completion-ignored-extensions
                            (remove module-file-suffix
                                    (remove ".elc"
                                            completion-ignored-extensions))))
               (read-file-name "Load file: " nil nil 'lambda))))
  (load (expand-file-name file) nil nil t))

As you can see, it calls load. If you examine the doc string of load it says:

(load FILE &optional NOERROR NOMESSAGE NOSUFFIX MUST-SUFFIX)

...

Print messages at start and end of loading unless optional third arg NOMESSAGE is non-nil (but ‘force-load-messages’ overrides that).

force-load-messages is nil by default (but check your configuration with C-h v force-load-messages to make sure). Assuming that's the case, all you need to do is define your own load-file function early in your init file (before you use it to load org-bullets), but when your function calls load, change it so that the nomessage parameter is t instead of nil:

(defun load-file (file)
  "Load the Lisp file named FILE."
  ;; This is a case where .elc and .so/.dll make a lot of sense.
  (interactive (list (let ((completion-ignored-extensions
                            (remove module-file-suffix
                                    (remove ".elc"
                                            completion-ignored-extensions))))
               (read-file-name "Load file: " nil nil 'lambda))))
  (load (expand-file-name file) nil t t))
1
  • Thanks!!! The message now is gone.
    – user34354
    Jun 27 at 12:56

Your Answer

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