Ich bin neu zu Emacs verwenden und es anpassen.ediprolog auf Emacs seltsames Verhalten
Meine .emacs
-Datei zu installieren versuche ist:
custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(global-set-key [f10] 'ediprolog-dwim)
(setq load-path (cons "/home/sam/Documents/emacs/prolog" load-path))
(autoload 'run-prolog "prolog" "Start a Prolog sub-process." t)
(autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t)
(autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t)
(setq prolog-system 'swi)
(setq auto-mode-alist (append '(("\\.pl\\'" . prolog-mode)
("\\.m\\'" . mercury-mode))
auto-mode-alist))
I ediprolog mit M-x package-install RET ediprolog RET
installiert Ich habe eine Testdatei mit %?- member(X,[a,b,c]).
erstellt Wenn ich F10
und space space space
drücken, wenn Bei dieser Abfrage bekomme ich folgende Ausgabe:
%?- member(X,[a,b,c]).
%@ member(X,[a,b,c]^H^H^H^H^H^H^H[a,b,c])^H^H^H^H^H^H^H^H^H^H^H(X,[a,b,c]).^M
%@ X = a ;^M
%@ X = b ;^M
%@ X = c.^M
%@^M
Dies ist eindeutig nicht korrekt, da ich all diese zusätzlichen ^H
und ^M
Zeichen habe.
Auch wenn ich die Zeile (require 'ediprolog)
meine .emacs
wie angewiesen ich folgende Fehlermeldung beim Starten Emacs erhalten:
Warning (initialization): An error occurred while loading `/home/sam/.emacs':
File error: Cannot open load file, no such file or directory, ediprolog
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
Ich habe auch die Hinweise auf https://bruda.ca/emacs/prolog-mode_installation_guide folgte den Prolog-Modus zu installieren, wenn diese relevant ist .
Side question: Warum verwenden Sie '/ home/sam/Documents/emacs/prolog' anstatt sich auf den Prolog-Modus zu verlassen, der mit Emacs integriert ist? – Stefan
Vielleicht möchten Sie mit 'M-x report-emacs-bug RET' nach ediprolog fragen, um mit den neuen Escape-Sequenzen umzugehen, die in den letzten Versionen von SWI-Prolog verwendet wurden. – Stefan
Ich folgte den Anweisungen hier: http://www.swi-prolog.org/FAQ/GnuEmacs.html, die empfohlen, diese Version zu verwenden. – user27815