![]() (setq proc (get-buffer-process (current-buffer))) (and (null (equal nextCmd TeX-command-Show)) (setq TeX-texify-count-same-command (1+ TeX-texify-count-same-command)) Don't want to do it anymore." TeX-texify-last-command TeX-texify-count-same-command) (message "TeX-texify: Did %S already %d times. (if (>= TeX-texify-count-same-command TeX-texify-max-runs-same-command) (mapc 'make-local-variable '(TeX-texify-sentinel TeX-texify-count-same-command TeX-texify-last-command)) (null (equal nextCmd TeX-texify-last-command))) (null (boundp 'TeX-texify-count-same-command)) (message "TeX-texify: Nothing to be done.")) (let ((nextCmd (TeX-command-default (TeX-master-file))) ![]() (unless (plist-get TeX-error-report-switches (intern (TeX-master-file))) (when (string-match "\\(finished\\|exited\\)" sentinel) (funcall TeX-texify-sentinel proc sentinel) If there is still something left do do start the next latex-command." "Non-interactive! Call the standard-sentinel of the current LaTeX-process. (defun TeX-texify-sentinel (&optional proc sentinel) ![]() (defcustom TeX-texify-max-runs-same-command 5 "Maximal run number of the same command" :type 'integer :group 'TeX-command) (defcustom TeX-texify-Show t "Start view-command at end of TeX-texify?" :type 'boolean :group 'TeX-command) We should check for bst files here as well. ((and (memq major-mode '(doctex-mode latex-mode)) (TeX-check-files (concat name "." (TeX-output-extension)) (cond ((if (string-equal name TeX-region) Most of the code is stolen from `TeX-command-query'." This snippet of code was copied from under the TEX-texify section. The only thing I would add is that if you solely use Aquamacs it is better to edit the file Preference.el located in ~/Library/Preferences/Aquamacs\ Emacs/ Once you add the code below in the file the command sequence C-c C-a will run the default compiler and then send the output to preview. The post from Sean Allred helped me find the answer I was looking for. I am using Aquamacs and had the same question. (full-expr (concat "(ps 'gm " score ")")) (full-expr (concat "(ps 'gm (list :treble " score "))")) Emacs lisp code: put into your Emacs init file, e.g., ~/.emacs (specifically, the version below only works for the scores with instruments from the ps set gm, while my own code is more flexible, but then again depends on other custom definitions). Holler in case this is not working for you, as the code on my machine is a bit different, and I did not test the code below. Below is an update that instead uses only builtin Opusmodus functions. I just noted that the code I shared above depends on other definitions in my library (e.g., the function preview-score). slime-eval-and-preview-opmo-snippet-before-point)) slime-eval-and-preview-opmo-score-before-point)) Creating a menu item, under the menu by the id “” (cons "Opusmodus" (make-sparse-keymap "hoot hoot")) This new menu is only shown when in lisp-mode Creating a new "Opusmodus" menu in the menu bar to the right of "Lisp" menu. (local-set-key (kbd "") #'slime-stop-opmo-playback) (local-set-key (kbd "") #'slime-opmo-midi-playback) (local-set-key (kbd "") #'slime-eval-and-preview-opmo-snippet-before-point) (slime-interactive-eval "(display-midi *last-score* :display :window)")) "(Re-)play the last Opusmodus score with a separate MIDI playback window." (slime-interactive-eval "(sequencer:sequencer-stop *audition-sequencer*)")) ![]() "Stop the currently playing Openmusic sound playback." (full-expr (concat "(preview-score " score ")"))) "Evaluate the score (an expression in the tot score format) preceding point and preview that score (notation and playback)." (defun slime-eval-and-preview-opmo-score-before-point () (full-expr (concat "(preview-score (list :snippet " score "))"))) wrap call to preview-score around the score before point "Evaluate the Openmusic snippet (an expression) preceding point and preview that snippet." (defun slime-eval-and-preview-opmo-snippet-before-point () Custom function for previewing Openmusic snippets etc It is all a bit hacky, but works for me and perhaps also for others It should also be easy to add menu items and keyboard shortcuts for any other commands (like plotting) that work from Lisp. together with shortcuts shown in the menu. The code below adds to Emacs buffers in Lisp mode an Opusmodus menu with some standard commands like for previewing a snippet, stopping the playback etc. Try copying the Emacs Lisp code below into your Emacs initialisation file (e.g., ~/.emacs), start Aquamacs again and open a Lisp file. I cannot answer for the builtin Opusmodus Slime functionality, but I developed something similar some time ago on my own, which works in Aquamacs for me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |