Generic Projects Auto Detection Fix
Edward Steere <[email protected]> Sat, 27 Feb 2016 22:54:20 +0200
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_408BCA59-84BE-4EEF-9B1D-12E9FF8F7A78 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi All, My name is Edward and I=E2=80=99m an avid Emacs user. I enjoy using CEDET and I=E2=80=99ve decided to take the plunge and see = if I can be helpful re. bug fixes and the like. Please find attached a patch for generic projects detection. This feature outright didn=E2=80=99t work on any of my machines until I = made these changes (see attached backtrace). If I=E2=80=99ve missed something (e.g. I should have turned on a feature = to make this work) then please let me know and I=E2=80=99d be happy to = test it and report back. Kind regards, Ed --Apple-Mail=_408BCA59-84BE-4EEF-9B1D-12E9FF8F7A78 Content-Disposition: attachment; filename=Generic-Project-Detection-Fix.patch Content-Type: application/octet-stream; name="Generic-Project-Detection-Fix.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e7bba7c66dc44098cc7f9b1a9bccc81209c2cbc5=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Edward=20Steere=20<[email protected]>=0A= Date:=20Sat,=2027=20Feb=202016=2022:11:32=20+0200=0ASubject:=20[PATCH]=20= Generic=20project=20detection=20bug=20fix.=0A=0AIt=20appears=20that=20= the=20predicate=20function=20to=20stop=20searching=20didn't=20handle=0A= two=20important=20boundary=20conditions:=0A=20-=20~/=0A=20-=20/=0A=0A= This=20fix=20should=20account=20for=20these=20and=20any=20others=20in=20= which=20the=20directory=0Awhich=20is=20logically=20"one=20up"=20results=20= in=20nil.=0A---=0A=20lisp/cedet/ede/auto.el=20=20=20|=202=20+-=0A=20= lisp/cedet/ede/detect.el=20|=203=20++-=0A=202=20files=20changed,=203=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/cedet/ede/auto.el=20b/lisp/cedet/ede/auto.el=0Aindex=20= 103fc30..1e24059=20100644=0A---=20a/lisp/cedet/ede/auto.el=0A+++=20= b/lisp/cedet/ede/auto.el=0A@@=20-271,7=20+271,7=20@@=20added.=20=20= Possible=20values=20are:=0A=20=09=20(pf=20(oref=20this=20proj-file))=0A=20= =09=20(f=20(when=20(stringp=20pf)=20(expand-file-name=20pf=20d))))=0A=20=20= =20=20=20(if=20f=0A-=09(and=20f=20(file-exists-p=20f))=0A+=09= (file-exists-p=20f)=0A=20=20=20=20=20=20=20(let=20((dirmatch=20(oref=20= this=20proj-root-dirmatch)))=0A=20=09(cond=20=0A=20=09=20((stringp=20= dirmatch)=0Adiff=20--git=20a/lisp/cedet/ede/detect.el=20= b/lisp/cedet/ede/detect.el=0Aindex=20cc3e05e..38a9039=20100644=0A---=20= a/lisp/cedet/ede/detect.el=0A+++=20b/lisp/cedet/ede/detect.el=0A@@=20= -136,7=20+136,8=20@@=20Return=20a=20cons=20cell:=0A=20=09=20=20=20=20;;=20= If=20it=20didn't=20change,=20then=20obviously=20this=20must=20be=20the=20= top.=0A=20=09=20=20=20=20t=0A=20=09=20=20;;=20If=20it=20is=20different,=20= check=20updir=20for=20the=20file.=0A-=09=20=20(not=20= (ede-auto-detect-in-dir=20ede--detect-nomatch-auto=20updir))))))=0A+=09=20= =20(or=20(null=20updir)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (not=20(ede-auto-detect-in-dir=20ede--detect-nomatch-auto=20updir)))))))=0A= =20=0A=20(defun=20ede--detect-scan-directory-for-project-root=20= (directory=20auto)=0A=20=20=20"If=20DIRECTORY=20has=20already=20been=20= detected=20with=20AUTO,=20find=20the=20root.=0A--=20=0A2.5.4=20(Apple=20= Git-61)=0A=0A= --Apple-Mail=_408BCA59-84BE-4EEF-9B1D-12E9FF8F7A78 Content-Disposition: attachment; filename=backtrace.txt Content-Type: text/plain; name="backtrace.txt" Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (wrong-type-argument stringp nil) file-name-as-directory(nil) #[(this dir) "\306=08!=19\307\n\310\"\211=1B;\205=12=00\311=0B = \"\211=1C\203!=00\f\205D=00\312\f!\202D=00\307\n\313\"\211=1D;\203/=00\314= \202C=00\315 !\205C=00 \205C=00\316 !\205C=00\317 =08\")+\207" [dir d this pf f dirmatch file-name-as-directory eieio-oref = proj-file expand-file-name file-exists-p proj-root-dirmatch nil = ede-project-autoload-dirmatch-p ede-dirmatch-installed ede-do-dirmatch] = 4 "Return non-nil if THIS project autoload is found in DIR."]([object = ede-project-autoload "generic-git" "Generic Git" ede/generic ".git" nil = nil unbound nil ede-generic-load ede-generic-vc-project t nil t] nil) apply(#[(this dir) "\306=08!=19\307\n\310\"\211=1B;\205=12=00\311=0B = \"\211=1C\203!=00\f\205D=00\312\f!\202D=00\307\n\313\"\211=1D;\203/=00\314= \202C=00\315 !\205C=00 \205C=00\316 !\205C=00\317 =08\")+\207" [dir d this pf f dirmatch file-name-as-directory eieio-oref = proj-file expand-file-name file-exists-p proj-root-dirmatch nil = ede-project-autoload-dirmatch-p ede-dirmatch-installed ede-do-dirmatch] = 4 "Return non-nil if THIS project autoload is found in DIR."] ([object = ede-project-autoload "generic-git" "Generic Git" ede/generic ".git" nil = nil unbound nil ede-generic-load ede-generic-vc-project t nil t] nil)) ede-auto-detect-in-dir([object ede-project-autoload "generic-git" = "Generic Git" ede/generic ".git" nil nil unbound nil ede-generic-load = ede-generic-vc-project t nil t] nil) ede--detect-ldf-root-predicate("~/") cedet-locate-dominating-file("~/" ede--detect-ldf-root-predicate) ede--detect-scan-directory-for-project-root("~/" [object = ede-project-autoload "generic-git" "Generic Git" ede/generic ".git" nil = nil unbound nil ede-generic-load ede-generic-vc-project t nil t]) ede-detect-directory-for-project("/Users/user/.emacs.d/") ede-directory-project-cons("/Users/user/.emacs.d/") ede-initialize-state-current-buffer() ede-minor-mode(1) ede-turn-on-hook() run-hooks(find-file-hook) after-find-file(nil nil t nil nil) revert-buffer--default(t nil) revert-buffer(t) #<subr call-interactively>(revert-buffer record nil) ad-Advice-call-interactively(#<subr call-interactively> revert-buffer = record nil) apply(ad-Advice-call-interactively #<subr call-interactively> = (revert-buffer record nil)) call-interactively(revert-buffer record nil) command-execute(revert-buffer record) execute-extended-command(nil "revert-buffer") smex-read-and-run(("toggle-debug-on-error" "darkroom-mode" "compile" = "eww" "cedet-gnu-global-create/update-database" "ede-find-file" = "revert-buffer" "flyspell-buffer" "vimgolf-browse" = "quiescent-projectile-open-java-files" = "quiescent-precision-to-floating-two-digits" "list-packages" "eshell" = "org-agenda" "quiescent-precision-to-two-digits" "align-regexp" = "smartscan-mode" "projectile-grep" "customize-variable" "magit-blame" = "display-time" "typing-of-emacs" "ede-enable-generic-projects" "calc" = "gnus" "flyspell-mode" "whitespace-cleanup" "doc-view-mode" = "elp-instrument-package" "vc-diff" "org-mode" "elp-results" = "count-matches" "customize-group" "vc-resolve-conflicts" = "delete-duplicate-lines" "projectile-regenerate-tags" "term" "vimgolf" = "org-todo" "untabify" "sort-lines" "delete-file" "rename-file" = "cedet-version" "org-time-stamp" "read-only-mode" "insert-kbd-macro" = "name-last-kbd-macro" "occur" ...)) smex() #<subr call-interactively>(smex nil nil) ad-Advice-call-interactively(#<subr call-interactively> smex nil nil) apply(ad-Advice-call-interactively #<subr call-interactively> (smex = nil nil)) call-interactively(smex nil nil) command-execute(smex) --Apple-Mail=_408BCA59-84BE-4EEF-9B1D-12E9FF8F7A78 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 --Apple-Mail=_408BCA59-84BE-4EEF-9B1D-12E9FF8F7A78 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Cedet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-devel --Apple-Mail=_408BCA59-84BE-4EEF-9B1D-12E9FF8F7A78--