Comments (5)
Yes, this seems to fix it. Thanks!
from el-patch.
I solved this with a patch, which protects el-patch-validate
with condition-case
--- el-patch/el-patch.el
+++ el-patch/el-patch.el
@@ -13,7 +13,10 @@
(let ((patch-hash (gethash name el-patch--patches)))
(dolist (type (hash-table-keys patch-hash))
(setq patch-count (1+ patch-count))
- (unless (el-patch-validate name type 'nomsg)
+ (unless (condition-case err
+ (el-patch-validate name type 'nomsg)
+ (error (message "%s -> %s" name (error-message-string err))
+ nil))
(setq warning-count (1+ warning-count))))))
(cond
((zerop patch-count)
from el-patch.
I think it would be better to make el-patch-validate
signal a warning and return nil, as in other error cases. Can you give me a simple way to reproduce the error, though, so that I can verify the fix works?
from el-patch.
The error happens when I patch a function that does not exist, for example
(el-patch-defun my-non-existent-function ()
(message "Hello work"))
More typically, I patch a function that exists but is loaded from a compiled lisp file (elc
) and the original source file .el
does not exists. In my case, my OS (Ubutnu) did not install el
files by default for emacs standard packages, only elc
files.
from el-patch.
Let me know if this commit fixes it for you.
from el-patch.
Related Issues (20)
- Autoloading a patch HOT 4
- el-patch-validate-all fails with "apply: Cannot open load file: No such file or directory" HOT 3
- Automatically validate patch after evaluating them HOT 1
- Patch function without providing complete source in patch HOT 6
- How to patch vector literal given with backticks HOT 2
- Finding source after compiling patch HOT 2
- Patch function in a compiled init.el HOT 10
- el-patch validates against macro-expanded version of function HOT 3
- void-function: el-patch-fontify-as-defun HOT 6
- New release HOT 2
- Trying to patch long function without copying the old one HOT 5
- Suggestion: Use advice system for patching functions HOT 3
- Renaming default branch from 'master' to 'main'
- Patches get silently overridden on package update / native compilation HOT 2
- Can I use this to verify a function I'd like to advise? HOT 1
- Overriding concat definition HOT 1
- Enhancement: add ability to patch variables defined in C code HOT 2
- Enhancement: add ability to unpatch evaled templates HOT 2
- Bug: templates that don't contain `...` and don't deal with their original form completely are incorrectly considered valid HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from el-patch.