From 14fb761d78bcc8ee5f58ec5e06279bf6dd8f10d5 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Mon, 27 Sep 2021 21:30:43 +0800 Subject: [PATCH 1/2] Do not use mark-whole-buffer noninteractively * lisp/org.el (org-fill-element): `mark-whole-buffer' introduced in 7b85a64da is only for interactive use and causes compiler warning. Replace it using noninteractive commands. --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index d063fa6bc..cfa5f6c04 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19365,7 +19365,9 @@ a footnote definition, try to fill the first paragraph within." (cl-case (org-element-type element) ;; Use major mode filling function is source blocks. (src-block (org-babel-do-in-edit-buffer - (mark-whole-buffer) + (push-mark (point-min)) + (goto-char (point-max)) + (setq mark-active t) (funcall-interactively #'fill-paragraph justify 'region))) ;; Align Org tables, leave table.el tables as-is. (table-row (org-table-align) t) From e4c0281d23b6fdca33dda255eef412066779e34d Mon Sep 17 00:00:00 2001 From: Jonathan Gregory Date: Mon, 30 Aug 2021 13:49:48 -0300 Subject: [PATCH 2/2] Set the MIDI file extension conditionally * lisp/ob-lilypond.el (org-babel-lilypond-attempt-to-play-midi): By default, LilyPond outputs .mid files for Windows and .midi for everything else. See: TINYCHANGE --- lisp/ob-lilypond.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index fbdd905a5..e0557eb05 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -328,7 +328,9 @@ If TEST is non-nil, the shell command is returned and is not run." FILE-NAME is full path to lilypond file. If TEST is non-nil, the shell command is returned and is not run." (when org-babel-lilypond-play-midi-post-tangle - (let ((midi-file (org-babel-lilypond-switch-extension file-name ".midi"))) + (let* ((ext (if (eq system-type 'windows-nt) + ".mid" ".midi")) + (midi-file (org-babel-lilypond-switch-extension file-name ext))) (if (file-exists-p midi-file) (let ((cmd-string (concat org-babel-lilypond-midi-command " " midi-file)))