eschulte / jump.el Goto Github PK
View Code? Open in Web Editor NEWelisp utility for defining functions which contextually jump between files
elisp utility for defining functions which contextually jump between files
On Emacs 24.4.1. When I execute this:
(defjump
'foo-jump
'(("app/models//\\1.rb" . "spec/factories/\\1.rb"))
"/tmp")
I receive:
Debugger entered--Lisp error: (wrong-type-argument listp quote)
car(quote)
(stringp (car spec))
(if (stringp (car spec)) (if nil (cons (replace-regexp-in-string "\\\\[0-9]+" "\\\\(.*?\\\\)" (car spec)) (cdr spec)) (cons (replace-regexp-in-string "\\\\[[:digit:]]+" "\\\\(.*?\\\\)" (car spec)) (cdr spec))) spec)
(lambda (spec) (if (stringp (car spec)) (if nil (cons (replace-regexp-in-string "\\\\[0-9]+" "\\\\(.*?\\\\)" (car spec)) (cdr spec)) (cons (replace-regexp-in-string "\\\\[[:digit:]]+" "\\\\(.*?\\\\)" (car spec)) (cdr spec))) spec))(quote)
mapcar((lambda (spec) (if (stringp (car spec)) (if nil (cons (replace-regexp-in-string "\\\\[0-9]+" "\\\\(.*?\\\\)" (car spec)) (cdr spec)) (cons (replace-regexp-in-string "\\\\[[:digit:]]+" "\\\\(.*?\\\\)" (car spec)) (cdr spec))) spec)) (quote (("app/models//\\1.rb" . "spec/factories/\\1.rb"))))
(list (quote quote) (mapcar (function (lambda (spec) (if (stringp (car spec)) (if nil (cons (replace-regexp-in-string "\\\\[0-9]+" "\\\\(.*?\\\\)" ...) (cdr spec)) (cons (replace-regexp-in-string "\\\\[[:digit:]]+" "\\\\(.*?\\\\)" ...) (cdr spec))) spec))) specs))
(list (quote loop) (quote for) (quote spec) (quote in) (list (quote quote) (mapcar (function (lambda (spec) (if (stringp (car spec)) (if nil (cons ... ...) (cons ... ...)) spec))) specs)) (quote until) (list (quote and) (quote (setf matches (jump-from (car spec)))) (list (quote cond) (list (quote (equal t matches)) (list (quote jump-to) (quote (cdr spec)) nil (list (quote when) (quote create) make))) (list (quote (consp matches)) (list (quote jump-to) (quote (cdr spec)) (quote matches) (list (quote when) (quote create) make))))))
(list (quote let) (cons (list (quote root) (if (functionp root) (list root) root)) (cons (list (quote method-command) (or method-command (quote which-function))) (quote (matches)))) (list (quote loop) (quote for) (quote spec) (quote in) (list (quote quote) (mapcar (function (lambda (spec) (if (stringp ...) (if nil ... ...) spec))) specs)) (quote until) (list (quote and) (quote (setf matches (jump-from (car spec)))) (list (quote cond) (list (quote (equal t matches)) (list (quote jump-to) (quote (cdr spec)) nil (list (quote when) (quote create) make))) (list (quote (consp matches)) (list (quote jump-to) (quote (cdr spec)) (quote matches) (list (quote when) (quote create) make)))))))
(list (quote defun) name (quote (&optional create)) (concat doc "\n\nautomatically created by `defjump'") (quote (interactive "P")) (list (quote let) (cons (list (quote root) (if (functionp root) (list root) root)) (cons (list (quote method-command) (or method-command (quote which-function))) (quote (matches)))) (list (quote loop) (quote for) (quote spec) (quote in) (list (quote quote) (mapcar (function (lambda (spec) (if ... ... spec))) specs)) (quote until) (list (quote and) (quote (setf matches (jump-from (car spec)))) (list (quote cond) (list (quote (equal t matches)) (list (quote jump-to) (quote ...) nil (list ... ... make))) (list (quote (consp matches)) (list (quote jump-to) (quote ...) (quote matches) (list ... ... make))))))))
(lambda (name specs root &optional doc make method-command) "Define NAME as a function with behavior determined by SPECS.\nSPECS should be a list of cons cells of the form\n\n (jump-from-spec . jump-to-spec)\n\nNAME will then try subsequent jump-from-specs until one succeeds,\nat which point any resulting match information, along with the\nrelated jump-to-spec will be used to jump to the intended buffer.\nSee `jump-to' and `jump-from' for information on spec\nconstruction.\n\nROOT should specify the root of the project in which all jumps\ntake place, it can be either a string directory path, or a\nfunction returning\n\nOptional argument DOC specifies the documentation of the\nresulting function.\n\nOptional argument MAKE can be used to specify that missing files\nshould be created. If MAKE is a function then it will be called\nwith the file path as it's only argument. After possibly calling\nMAKE `find-file' will be used to open the path.\n\nOptional argument METHOD-COMMAND overrides the function used to\nfind the current method which defaults to `which-function'." (list (quote defun) name (quote (&optional create)) (concat doc "\n\nautomatically created by `defjump'") (quote (interactive "P")) (list (quote let) (cons (list (quote root) (if (functionp root) (list root) root)) (cons (list (quote method-command) (or method-command (quote which-function))) (quote (matches)))) (list (quote loop) (quote for) (quote spec) (quote in) (list (quote quote) (mapcar (function (lambda ... ...)) specs)) (quote until) (list (quote and) (quote (setf matches (jump-from ...))) (list (quote cond) (list (quote ...) (list ... ... nil ...)) (list (quote ...) (list ... ... ... ...))))))))((quote foo-jump) (quote (("app/models//\\1.rb" . "spec/factories/\\1.rb"))) "/tmp")
macroexpand((defjump (quote foo-jump) (quote (("app/models//\\1.rb" . "spec/factories/\\1.rb"))) "/tmp") nil)
macroexp--expand-all((defjump (quote foo-jump) (quote (("app/models//\\1.rb" . "spec/factories/\\1.rb"))) "/tmp"))
macroexpand-all((defjump (quote foo-jump) (quote (("app/models//\\1.rb" . "spec/factories/\\1.rb"))) "/tmp"))
eval-sexp-add-defvars((defjump (quote foo-jump) (quote (("app/models//\\1.rb" . "spec/factories/\\1.rb"))) "/tmp"))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
Can you please push your changes to elpa?
Thanks.
;; Package-Requires: ((findr "0.7")
;; (inflections "1.0"))
should become
;; Package-Requires: ((findr "0.7") (inflections "1.0"))
so that it can be read properly by package.el
jump is mirrored on the Emacsmirror, which is a large up-to-date collection of Emacs packages.
As the maintainer of the mirror I am trying to resolve feature conflicts that result from one package bundling libraries from another package. I suspect in most cases these libraries were included so that users would not have to find, download and install each dependency manually.
Unfortunately bundling also has negative side-effects: if the bundled libraries are also installed separately, then it is undefined which version actually gets loaded when the respective feature is required.
Initially that isn't a big problem but in many cases upstream changes are not included or only after a long delay. This can be very confusing for users who are not aware that some of the installed packages bundle libraries which are also installed separately. In other cases bugs are fixed in the bundled versions but the fixes are never submitted to upstream.
Also now that Emacs contains the package.el package manager there is a better way to not require users to manually deal with dependencies: add the package (and when that hasn't been done yet the dependencies) to the Melpa package repository. If make
is required to install your make you might want to add it to the el-get (another popular package manager) package repository instead.
Alternatively if you want to keep bundling these libraries please move them to a directory only containing bundled libraries and add the file ".nosearch" to that directory. You can then load the library using something like this:
(or (require 'bundled nil t)
(let ((load-path
(cons (expand-file-name "fallback-libs"
(or load-file-name buffer-file-name)
load-path))))
(require 'bundled)))
Of course if your version differs from the upstream version this might not be enough in which case you should make an effort to get your changes merged upstream.
jump bundles at least the following libraries:
Best regards,
Jonas
The header line should use three dashes...
;;; findr.el -- Breadth-first file-finding facility for (X)Emacs
should be changed to
;;; findr.el --- Breadth-first file-finding facility for (X)Emacs
In emacs 28 (master branch), the "when" parameter are mandatory in functions make-obsolete, define-obsolete-function-alias, make-obsolete-variable and define-obsolete-variable-alias.
In inflections.el there are two line (153 and 167) where the "when" parameter are not defined:
(define-obsolete-function-alias 'singularize-string 'inflection-singularize-string)
(define-obsolete-function-alias 'pluralize-string 'inflection-pluralize-string)
this raise an error in clj-refactor: (wrong-number-of-arguments (3 . 4) 2)
It's announced in NEWS file in emacs master branch:
** The 'when' argument of `make-obsolete` and related functions is mandatory.
The use of those functions without a 'when' argument was marked
obsolete back in Emacs-23.1. The affected functions are:
make-obsolete, define-obsolete-function-alias, make-obsolete-variable,
define-obsolete-variable-alias.
Thank you
I am using release 2.5 which has a problem with a missing parameter to the define-obsolete-function-alias
which seems to be fixed a couple of years ago. A new release to include that fix would be appreciated.
Thanks!
could you change org-mode/.gitmodules to
1 [submodule "testing/jump"]
2 path = testing/jump
3 url = https://github.com/eschulte/jump.el.git
Since there are peoples behind http proxy.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.