Giter Club home page Giter Club logo

Comments (5)

haji-ali avatar haji-ali commented on May 29, 2024 1

Yes, this seems to fix it. Thanks!

from el-patch.

haji-ali avatar haji-ali commented on May 29, 2024

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.

raxod502 avatar raxod502 commented on May 29, 2024

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.

haji-ali avatar haji-ali commented on May 29, 2024

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.

raxod502 avatar raxod502 commented on May 29, 2024

Let me know if this commit fixes it for you.

from el-patch.

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.