On this page:
launch-with-found-emacs-lisp-files
9.2

9 Enigma API: Launch Subcommand🔗

 (require enigma/subcommands/launch) package: enigma-app

procedure

(launch-with-found-emacs-lisp-files start-path 
  extra-emacs-flags) 
  
exact-integer? (listof hash?)
  start-path : path-string?
  extra-emacs-flags : (listof string?)
Launch GNU Emacs with load-paths under start-path Pass extra-emacs-flags as extra launch flags.

Returns the values that indicate: exact-integer? total launch success and a list of objects that describe properties of used files.

The source code of this module:

#lang racket/base
 
(require racket/contract/base)
 
(require "../emacs/file/context.rkt")
(require "../emacs/path/load-path.rkt")
(require "../emacs/system/run-emacs.rkt")
 
(provide
 (contract-out
  [launch-with-found-emacs-lisp-files
   (-> path-string? (listof string?)
       (values exact-integer? (listof hash?)))]))
 
(define (launch-with-found-emacs-lisp-files start-path extra-emacs-flags)
  (define-values (emacs-lisp-files load-path)
    (find-emacs-lisp-context start-path))
  (define cmdline-args (make-emacs-cmdline-args load-path extra-emacs-flags))
  (eprintf " Launching from: ~a\n" start-path)
  (define exit-code (run-emacs cmdline-args))
  (define result-hash
    (for/list ([emacs-lisp-file emacs-lisp-files])
      (hash 'file-path (path->string emacs-lisp-file))))
  (values exit-code result-hash))