GithubHelp home page GithubHelp logo

Comments (9)

protesilaos avatar protesilaos commented on September 14, 2024

What happens if you (require 'subr)?

from denote.

hpgisler avatar hpgisler commented on September 14, 2024

(require 'subr)

enters debugger:

Debugger entered--Lisp error: (error "Loading file /usr/share/emacs/28.1/lisp/subr.elc f...")
  require(subr)
  (progn (require 'subr))
  eval((progn (require 'subr)) t)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Messages buffers says:

progn: Loading file /usr/share/emacs/28.1/lisp/subr.elc failed to provide feature ‘subr’

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Okay, the problem is that on Emacs 28 this was (require 'subr-x).

EDIT: I thus plan to make this change, if you confirm it works:

 denote.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 2152c69..00e264b 100644
--- a/denote.el
+++ b/denote.el
@@ -96,7 +96,9 @@ ;;; Commentary:
 ;;; Code:
 
 (require 'seq)
-(eval-when-compile (require 'cl-lib))
+(eval-when-compile
+  (require 'cl-lib)
+  (require 'subr-x))
 
 (defgroup denote ()
   "Simple notes with an efficient file-naming scheme."

from denote.

hpgisler avatar hpgisler commented on September 14, 2024

Hmm, still the exact same error...

What I've done:

  • I've modified denote.el according to your diff above
  • I've deleted the compiled version, i.e. denote.elc from my filesystem
  • I've restarted emacs

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

I found it by testing these two on emacs -Q with Emacs 28:

;; this has an error
(when-let* ((name (buffer-name)))
  (message "%s" name))

Screenshot from 2022-07-24 17-56-09

;; this works
(when-let ((name (buffer-name)))
  (message "%s" name))

image

The when-let* is legacy code anyway, as we only have one form and don't need the asterisk.

Pushed the change in commit 61e672f

from denote.

hpgisler avatar hpgisler commented on September 14, 2024

Great, it now works!

Thank you, Prot!

from denote.

hpgisler avatar hpgisler commented on September 14, 2024

Note:

There seem to be a couple of other when-let* in other files.
They should also be changed, shouldn't they?

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Great, it now works!

Very well!

Thank you, Prot!

You are welcome!

There seem to be a couple of other when-let* in other files. They should also be changed, shouldn't they?

I checked them. The asterisk they have is correctly used in those cases. I will still need to require subr-x the way I mentioned before.

from denote.

protesilaos avatar protesilaos commented on September 14, 2024

Closing this as it is continued in issue 74.

from denote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.