nix-archive-1(type directoryentry(nameetcnode(type directoryentry(name common-lispnode(type directoryentry(nameasdf-output-translations.conf.dnode(type directoryentry(name50-magic-ed.confnode(typeregularcontents(("/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/share/common-lisp/ecl/magic-ed" :**/ :*.*.*) ("/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/lib/common-lisp/ecl/magic-ed" :**/ :*.*.*)) ))))entry(namesource-registry.conf.dnode(type directoryentry(name50-magic-ed.confnode(typeregularcontentsq(:tree "/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/share/common-lisp/ecl/magic-ed") ))))))))entry(namelibnode(type directoryentry(name common-lispnode(type directoryentry(nameeclnode(type directoryentry(namemagic-ednode(type directoryentry(namesrcnode(type directoryentry(name magic-ed.fasnode(typeregular executablecontents5ELF414 (d d   X.X>X>(8.>>  l)l)l)((Stdl)l)l)((Ptd%%%DDQtdRtdX.X>X>%  !$"  #"("$TLy|-%M c , Ci1-< F"v @Uh __gmon_start___ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalizeinit_fas_CODEecl_make_codeblock_eclMj5hglL3_T3NXI971ecl_init_moduleecl_process_envcl_open_ecl_frs_pushcl_symbols_setjmpecl_stack_push_valuescl_closeecl_stack_pop_valuesecl_stack_frame_opencl_file_lengthcl_make_stringcl_read_sequenceecl_stack_frame_push_valuesecl_stack_frame_pop_valuesecl_stack_frame_closeecl_cs_overflowFEstack_advanceecl_unwindcl_parse_keycl_load_ecl_va_spcl_errorsi_ecase_errorecl_make_constant_base_stringecl_function_dispatchsi_select_packageecl_cmp_defunlibecl.so.24.5libgmp.so.10libgc.so.1libffi.so.8libm.so.6libgcc_s.so.1libc.so.6_endGLIBC_2.1.3GLIBC_2.0/gnu/store/gzji9nhzkpgwg2d83vs10qn0ylrfil8h-ecl-24.5.10/lib/:/gnu/store/0hr9jpczkcgpgqkhf4q4868xd57h5a62-glibc-2.35/lib:/gnu/store/v268li21yk9l6vqiq2mrw6vvpx2bnm5c-gcc-11.3.0-lib/lib:/gnu/store/gzji9nhzkpgwg2d83vs10qn0ylrfil8h-ecl-24.5.10/lib:/gnu/store/82bynxabzp0drav81l70azszayp8wm11-gmp-6.2.1/lib:/gnu/store/5zydbv97cly5mijfmnc6vrk2148qxd1n-libgc-8.2.2/lib:/gnu/store/fjfmffrarqi08fgm69swp4biff17yji4-libffi-3.4.4/lib:/gnu/store/v268li21yk9l6vqiq2mrw6vvpx2bnm5c-gcc-11.3.0-lib/lib/gcc/i686-unknown-linux-gnu/11.3.0/../../..si ii X>\>`>x>>>|@??"?? ?? @@@@@ @$@ (@ ,@ 0@ 4@8@<@@@D@H@L@P@T@X@\@`@d@h@l@p@t@x@!S/tЃ[ hhhhh h($h0(h8p,h@`0hHP4hP@8hX0<h` @hhDhpHhxLhPhThXh\h`hdhhhplh`phPth@xh0f$ffffff-9ttUQЃÍt&Í&«-US)ȉtt PQ҃]Í&fUSWW-u't |5ƃ]Í&f[$fffWVSD$,t@[^_Í&fG<x Pp [^_ffffW,UWVSÃLD$D$$D$9tD$`Pj\$|$D$0+D$4<$D$|$`$|$$D$$\D$ $ TP\$dƋD$ t#\$T$ H QPRjfVt$ \$D$4 4$L$9$BL[^_]ÍvjD$4Pl$ U\$D$8|$8D$0$ZYPj ƋD$$PVjxuE<$ED$D$ tD$ Pj\$ W\$HL$AD$8$t&\$&v\$GPPt$t$ \$tt&UWVS77*<|$PuƍD$9tD$T|$D$?nD$~l$D$P(T$jjD$0P(PjD$0P9 |$(|$,|$ D$$D$ @9t9x 6(T$UjP tTtOuGMw;T$@9t}9x  U<[^_]Í&vF<[^_]ÐB D$ Vt&|$,@3B @D$ B&|$ tYUj렍&f jl$,D$(P(T$t&CFFQQpjRRpWh&UWVS(t$0tV`F FF0F F,jPF4[^_]Í&vNjP pHrW$jjvjjjvjjj6j Ѓ46eXZD$ PWYvv QL$$2jЃt$ WqZv}j1L$Q2jЋp}YXp W,vU2jЃt$ WZv vL$ QrjЃt$ WYv$jt$rjЋp$XZp Wv(UrjЃ [^_]Ë$S''&[@EcLtAg_fas:init_fas_CODE@/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/share/common-lisp/ecl/magic-ed/src/magic-ed.lisp@EcLtAg:_eclMj5hglL3_T3NXI971@magic-ed::slurp-file magic-ed::magic-ed (:file :string) :string 0 "Received bad output type. For now only ':file' and ':string' are supported" si::dodefpackage 0 si::set-documentation 0 :output :eval #1="MAGIC-ED" ("CL") (#1#) (defun magic-ed::slurp-file) (#2=#P"/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/share/common-lisp/ecl/magic-ed/src/magic-ed.lisp" . 170) (magic-ed::path) "Slurp file from given path." (defun magic-ed::magic-ed) (#2# . 3586) (&optional magic-ed::file &key (magic-ed::output :file) (eval t)) "Call editor from REPL and depending on options, return to REPL or evaluate the file content in REPL. This function will try to use implmentation specific (ed) function, which will in turn invoke editor set in EDITOR environment variable. Some Common Lisp implementations uses different strategy for setting external editor, so if unsure what they are, make sure to consult your implementation documentation first. If called without file, this function will invoke editor without file argument. Supported options are: :eval (t or nil) - if :eval was set to nil, saved content will not be evaluated :output (:file or :string) - by default, content will be saved to file; if you want the content to be returned as escaped string, set ':output :string'.";@T\$4HzR|  F J tx?;*2$"@DThAA Aa  AAJ WKA ND AALKA AAE`mhAlBp\`ilKpL`bdAhAlBpH`ChAlDpP`s AA AAD CdBhElEp^lAhAlBpHdGhAlBpZ`_hAlBpL`ClAp_`ldAhDlDpTXAA AANPVXB\B`EdJhBlEpHPJXK\B`FP~\A`HPC AA AAK J AA AAB JXA\B`HPN\B`QP| TAXC\B`E ATAXC\A`<AA AAN0Q8i p' 8Q`mx  X>\>toT  @  ho oo o>6FVfv&6FVfv|@GCC: (GNU) 11.3.0.shstrtab.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.plt.got.text.fini.rodata.eh_frame_hdr.eh_frame.note.gnu.property.init_array.fini_array.data.rel.ro.dynamic.got.plt.data.bss.commenttt oTT, P%o J2o 0A   hJ B S N  Ybhn2 v%%D&&\l)l)(X>X.\>\.`>`.X >. ]?/@0||@|0@0000))entry(name magic-ed.onode(typeregularcontentsELF4(  UWVSÃLD$D$$D$9tD$`Pj\$|$D$0+D$4<$D$|$`$|$$D$$\D$ $ TP\$ƋD$ t#\$T$ H QPRjVt$ \$D$4 4$L$9$BL[^_]ÍvjD$4Pl$ U\$D$8|$8D$0$ZYPj ƋD$$PVjuE<$ED$D$ tD$ Pj\$ W\$L$AD$8$t&\$&v\$PPt$t$ \$t&UWVS<|$PƍD$9tD$T|$D$?nD$~l$D$P(T$jjD$0P(PjD$0P |$(|$,|$ D$$D$ @9t9x 6(T$UjP tTtOuGMw;T$@9t}9x  U<[^_]Í&vF<[^_]ÐB D$ Vt&|$,@3B @D$ B&|$ tYUj렍&f jl$,D$(P(T$t&CFFQQpjRRpW&UWVSt$0tVF F F0F F,jPF4[^_]Í&vNjP pHrW$jjvjjjvjjj6j Ѓ46XZD$ PWYvv QL$$2jЃt$ WZv}j1L$Q2jЋpYXp WvU2jЃt$ WZv vL$ QrjЃt$ WYv$jt$rjЋp$XZp Wv(UrjЃ [^_]/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/share/common-lisp/ecl/magic-ed/src/magic-ed.lisp@EcLtAg:_eclMj5hglL3_T3NXI971@magic-ed::slurp-file magic-ed::magic-ed (:file :string) :string 0 "Received bad output type. For now only ':file' and ':string' are supported" si::dodefpackage 0 si::set-documentation 0 :output :eval #1="MAGIC-ED" ("CL") (#1#) (defun magic-ed::slurp-file) (#2=#P"/gnu/store/03z4nrbfd1k1y9w8fsbjkscxf2glbc73-ecl-magic-ed-0.2-1.30bb278/share/common-lisp/ecl/magic-ed/src/magic-ed.lisp" . 170) (magic-ed::path) "Slurp file from given path." (defun magic-ed::magic-ed) (#2# . 3586) (&optional magic-ed::file &key (magic-ed::output :file) (eval t)) "Call editor from REPL and depending on options, return to REPL or evaluate the file content in REPL. This function will try to use implmentation specific (ed) function, which will in turn invoke editor set in EDITOR environment variable. Some Common Lisp implementations uses different strategy for setting external editor, so if unsure what they are, make sure to consult your implementation documentation first. If called without file, this function will invoke editor without file argument. Supported options are: :eval (t or nil) - if :eval was set to nil, saved content will not be evaluated :output (:file or :string) - by default, content will be saved to file; if you want the content to be returned as escaped string, set ':output :string'."'P 8$Ë$GCC: (GNU) 11.3.0GNUzR| LKA AAE`mhAlBp\`ilKpL`bdAhAlBpH`ChAlDpP`s AA AAD CdBhElEp^lAhAlBpHdGhAlBpZ`_hAlBpL`ClAp_`ldAhDlDpPAA AANPVXB\B`EdJhBlEpHPJXK\B`FP~\A`HPC AA AAK J AA AAB JXA\B`HPN\B`QP| TAXC\B`E ATAXC\A`<pAA AAN0Q8i' support (defun known-editor (e) (member e '("vim" "emacs" "emacsclient") :test 'string=)) (when thing (typecase thing (pathname (sb-ext:native-namestring (translate-logical-pathname thing) :as-file t)) (string thing) (t (let* ((source (sb-introspect:find-definition-source (fdefinition thing))) (pathname (sb-introspect:definition-source-pathname source)) (offset (or (sb-introspect:definition-source-character-offset source) 0))) (unless pathname (error "Don't know where the definition of ~S is, sorry." thing)) (if (known-editor editor) (format nil "+~A ~A" offset (namestring-for-editor editor pathname)) (format nil "~A" (namestring-for-editor editor pathname)) )))))) #+sbcl (unless sb-ext:*ed-functions* (defun ed-editor (thing) ;; simple FFI for system() call (define-alien-routine system int (command c-string)) (let* ((editor (sb-ext:posix-getenv "EDITOR")) (editor (or editor "vi"))) (system (format nil "~A~@[ ~A~]" editor (namestring-for-editor editor thing))))) ;; save it (push 'ed-editor sb-ext:*ed-functions*)) #+ccl (unless ccl:*resident-editor-hook* (defun ed-editor (thing) (let* ((editor (ccl:getenv "EDITOR")) (editor (or editor "vi"))) (ccl::os-command (format nil "~A ~A" editor thing)))) ;; set it (setf ccl:*resident-editor-hook* 'ed-editor)) ;; TODO: check if Hemlock was set #+(or cmu scl) (when t (defun ed-editor (&optional thing) (let* ((editor (cdr (assoc :EDITOR ext:*environment-list*))) (editor (or editor "vi")) ;; shamelessly stolen from ASDF (split-string (lambda (string &key (item #\space) (test #'char=)) ;; Splits the string into substrings at spaces. (let ((len (length string)) (index 0) result) (dotimes (i len (progn (unless (= index len) (push (subseq string index) result)) (reverse result))) (when (funcall test (char string i) item) (unless (= index i) ;; two spaces in a row (push (subseq string index i) result)) (setf index (1+ i))))))) ;; CMUCL (run-program) is a bit sensitive and if running program has spaces ;; it will fail. We then must split the string, pick up the program name and ;; move everything else as arguments. (parts (funcall split-string editor)) (editor (first parts)) (args (append (rest parts) (when thing (list thing))))) (extensions:run-program editor args :input t :output t))) ;; overwrite (ed) with our definition (setf (symbol-function 'cl:ed) (symbol-function 'magic-ed:ed-editor))) (defun magic-ed (&optional file &key (output :file) (eval t)) "Call editor from REPL and depending on options, return to REPL or evaluate the file content in REPL. This function will try to use implmentation specific (ed) function, which will in turn invoke editor set in EDITOR environment variable. Some Common Lisp implementations uses different strategy for setting external editor, so if unsure what they are, make sure to consult your implementation documentation first. If called without file, this function will invoke editor without file argument. Supported options are: :eval (t or nil) - if :eval was set to nil, saved content will not be evaluated :output (:file or :string) - by default, content will be saved to file; if you want the content to be returned as escaped string, set ':output :string'." ;; first assure we have valid parameters if we got them (unless (member output '(:file :string)) (error "Received bad output type. For now only ':file' and ':string' are supported")) (let ((status (ed file))) (if (and file status (stringp file)) (ecase output (:file ;; if user does not want to evaluate file (if eval (load file))) (:string (slurp-file file))) ;; invoked plain (ed), return it's status status))) ))))))))))entry(namedocnode(type directoryentry(nameecl-magic-ed-0.2-1.30bb278node(type directoryentry(nameLICENSEnode(typeregularcontents<MIT License Copyright (c) 2020 Sanel Zukan, Alex Ponomarev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. )))))))))