-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unregistered definition type ‘defalias’ #30
Comments
This works if I evaluate it in Are you perhaps byte-compiling your code without having |
looks like you are correct. I can eval in the scratch buffer and it works. I missed your clear instructions about this in the README 😟 |
I have this same problem. I'm patching
I can evaluate the This is the patch: (eval-after-load "org-attach"
'(progn
(el-patch-defun org-attach-annex-get-maybe (path)
"Call git annex get PATH (via shell) if using git annex.
Signals an error if the file content is not available and it was not retrieved."
(let* ((default-directory (expand-file-name org-attach-directory))
(path-relative (file-relative-name path)))
(when (and (org-attach-use-annex)
(not
(string-equal
(el-patch-swap "found" "\nfound")
(shell-command-to-string
(format "git annex find --format=found --in=here %s"
(shell-quote-argument path-relative))))))
(let ((should-get
(if (eq org-attach-annex-auto-get 'ask)
(y-or-n-p (format "Run git annex get %s? " path-relative))
org-attach-annex-auto-get)))
(if should-get
(progn (message "Running git annex get \"%s\"." path-relative)
(call-process "git" nil nil nil "annex" "get" path-relative))
(error "File %s stored in git annex but it is not available, and was not retrieved"
path)))))))) |
Previously, you could get an error: Unregistered definition type ‘defalias’ if you tried to evaluate an `el-patch-defun' form or similar inside of an `eval-after-load' or similar, without having previously loaded `el-patch'. This was due to an autoloading bug, which this commit fixes. In retrospect, the documentation I added when originally addressing this problem was wrong -- it should not be necessary to explicitly load a package in order to use its macros, at least in this context (it is sometimes necessary in other cases, most notably when a macro from package X is used inside an `eval-after-load' form for package Y which is evaluated before package X is loaded, and the macro from package X is autoloaded, and it does not evaluate all of its arguments, and one of its arguments can be mistaken for an invocation of some other macro from package Z).
You can work around the problem by adding |
I should really switch to straight.el... trying upstream branches out with the combination of package.el, cask and git submodules is so painful (yes my config is a mess). Anyhow, your fix works! Thanks! |
Really enjoying el-patch by the way. It's such an obvious idea once you think about it... but that someone actually implemented it just blows my mind :) Keep it up! |
I am trying to advise the
ielm
function and I am getting the following fatal error.Unregistered definition type ‘defalias’
. Here is my codeHere is the stack trace
The text was updated successfully, but these errors were encountered: