From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cOqQMpzg9GSWnQAAG6o9tA:P1 (envelope-from ) for ; Sun, 03 Sep 2023 21:38:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cOqQMpzg9GSWnQAAG6o9tA (envelope-from ) for ; Sun, 03 Sep 2023 21:38:04 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1B6E763FE4 for ; Sun, 3 Sep 2023 21:38:04 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="Xw5h/Ot2"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693769884; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Sj4SPhirAK5lzSM64SYaIzQF/6svrWrxOw5akGMrPh0=; b=R6O4wJvvfRz0GM3op0LZ0dud4cZX1RTWSFqmhPWPHlrZ/ffi9slttrKhoJ2kNg3h/zRs3T d3PmylsCX/xmUoPTNcCO9+xZZ9oYo7lTuAt/MWUEmWc0hnc+EjohyXSqZ3FYbb1kWmYquQ DDTNniPcUlc7mtkiig3bjyOcZCV4ETMOhR+chf7VS/NEzFay49q2h2VcTMasoer+9tApqJ iC30Vt7Q3dVWms814lDFpeOtbuBwCeEejUvV2QFlbOSBMVV/n4NHwKGEgVUyOMUSQgZUwK 3MpoMTA7bQ4dp9RZcMT5gmw2QJJY6KAWluTQg8dfkdKup3hPCn5lmbsDHBIZnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b="Xw5h/Ot2"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693769884; a=rsa-sha256; cv=none; b=TtwrvJbRQ8JapmDzL4HP7nucwJ9PrKGv+tyBYYNln9gw8I+MuIz/QuWe5snH33GX38/PR1 SssS1POytR6nsOON51mF9el/8fLDI+wpzm/Bdox+zRZ0x/6SPDhIQ+eBqmOdYgBBT0qRwe 9525bGX8JT7FXMu4LrM0do39IjhifLS6tWdE7mkA0TTFv77wfZuXczuiOTX93/4vY1cFKx VYA4ofwz3pWL1fpB7ck0D5JWgUfglcZRVH80Qz6Q958H5SBm8O38VxqbsyLTnE7fsHTv7+ pApTLR7eqPCKgeMJYUcQfU9hJPHYhL/slX+AZyMOkfyROmBHol6LJ3xzcXWkMQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcsuD-0004pD-MU; Sun, 03 Sep 2023 15:37:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcsu3-0004n7-E9 for emacs-orgmode@gnu.org; Sun, 03 Sep 2023 15:37:02 -0400 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qcstz-00028M-Tu for emacs-orgmode@gnu.org; Sun, 03 Sep 2023 15:36:58 -0400 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-649edb3a3d6so2743976d6.0 for ; Sun, 03 Sep 2023 12:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693769813; x=1694374613; darn=gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=Sj4SPhirAK5lzSM64SYaIzQF/6svrWrxOw5akGMrPh0=; b=Xw5h/Ot20SUI6FiFR5OTRgzR6ab7HyjsAT40Q9ruMX0SCQ/bpO1det4qD9zqCNXdFH amsAGhKU26Rzit/EBNIbuLeQy/DXd0X5+srTl3d/PIkZI77ZdOh3Igm4tEa045SmQniW jjpdJWFYrzAJy8l/17E0BEfWmlmeq53/bPPmqodjd1hlBb3ssAFMR/KQfog1pA0bweQN kev0xudw9wILXu1gj8mAKyi8ZThyICkE/3otrrXG3hXwdVrTPW+TvTF/UIa/XPw3VZHC Eil/VrU13ja9l8vYt07tnMyr4c28I3Ql0BkQmW7T/Sy7cZuClgSTtoW7cMKLVQHxhQSu VJ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693769813; x=1694374613; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Sj4SPhirAK5lzSM64SYaIzQF/6svrWrxOw5akGMrPh0=; b=E8Q/oOgMa4knXn2DzSimUNn5OBD0GZHXxUmzwsqrpvoCq3tMwCGJtXI59NYTJeMsgp EGUVQS967Wp5uBTIeYf8Su0EyTnd1imhI3KmzS+RAwndEKtzAA2gkrbAUVdFOXs2sMEo Uv5SxciD1r+3RhmrxxaQCu+6M6AdWXuZ4icLQRfhAylbHn2DJ7irDzeMpbpi9y67yEPv XjV0DmogxDDsqQSKd+5a80CmHmMkUp5gZ/AexcgwTwZH9+o/YotnTaX81jF9isWN2Qae QCZImKFZkMNJpNjhyNhgHIygGCtM5sgr3Rfp6lZQV2wFaQJ+JnrNdm6A7/awWZphsRgX cFRQ== X-Gm-Message-State: AOJu0Yw89kvfvZHLMAyy/bvcLRmDjnJunnzWbsSlWXm39KRCsR/0wJGM Q2pC636wISRfJtX2oyvMmc3+EUoHT0M= X-Google-Smtp-Source: AGHT+IFQSPgfOczXbRNWjRQBKpcAHgj/L8my5Dmc1N8dkOAoXi95Jnludt+vneAJ8hkga25+hZcyDA== X-Received: by 2002:a05:6214:224b:b0:63c:913f:2b18 with SMTP id c11-20020a056214224b00b0063c913f2b18mr16396651qvc.2.1693769812551; Sun, 03 Sep 2023 12:36:52 -0700 (PDT) Received: from laptop ([2601:84:847f:c697:2d4:9eff:feb6:970c]) by smtp.gmail.com with ESMTPSA id k17-20020a0cf591000000b0063d4c39b3dbsm3066939qvm.112.2023.09.03.12.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Sep 2023 12:36:51 -0700 (PDT) References: <87jztk1rdc.fsf@gmail.com> <878r9zim0z.fsf@localhost> User-agent: mu4e 1.11.15; emacs 30.0.50 From: No Wayman To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Org mode version 9.7-pre (9.7-pre-n/a-g63e8ca @ /home/n/.emacs.d/elpaca/builds/org/); [PATCH] refactor org-babel-lilypond-compile-lilyfile Date: Sun, 03 Sep 2023 15:35:35 -0400 In-reply-to: <878r9zim0z.fsf@localhost> Message-ID: <87pm2zgiac.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2f; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qv1-xf2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 1B6E763FE4 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -9.59 X-Spam-Score: -9.59 X-TUID: 2Zg/Kuvx9iKC --=-=-= Content-Type: text/plain; format=flowed Ihor Radchenko writes: >> - Removes the optional TEST parameter, which is unused and >> better >> served through debugging tools. > > This is technically a breaking change. So, we (1) need to > mention it in > ORG-NEWS; (2) may consider (file-name &optional _) function > definition > to be 100% sure that no existing code will be broken. I've added the NEWS entry and updated the signature to ignore the second, optional parameter. See attached. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ob-lilypond.el-refactor-org-babel-lilypond-comp.patch Content-Description: revised-patch >From ace59bb72e8fdd6f01033d327de221cfdd9090fe Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 24 Aug 2023 09:32:27 -0400 Subject: [PATCH] lisp/ob-lilypond.el: refactor org-babel-lilypond-compile-lilyfile * ob-lilypond.el (org-babel-lilypond-compile-lilyfile): Correct compilation message. Remove superfluous local variables. Remove unused ad-hoc debugging TEST parameter. --- etc/ORG-NEWS | 3 +++ lisp/ob-lilypond.el | 35 ++++++++++++++--------------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 842d3fe4d..c40e1be82 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -304,6 +304,9 @@ setting the ~STYLE~ property for each sub-task. The change is breaking when ~org-use-property-inheritance~ is set to ~t~. +*** ~org-babel-lilypond-compile-lilyfile~ ignores optional second argument + +The =TEST= parameter is better served by Emacs debugging tools. ** New and changed options *** ~org-export-smart-quotes-alist~ is now a custom option diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index 8b2bd231f..c2dba36aa 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -247,27 +247,20 @@ org-babel-lilypond-execute-tangled-ly (org-babel-lilypond-attempt-to-open-pdf org-babel-lilypond-temp-file) (org-babel-lilypond-attempt-to-play-midi org-babel-lilypond-temp-file))))) -(defun org-babel-lilypond-compile-lilyfile (file-name &optional test) - "Compile lilypond file and check for compile errors. -FILE-NAME is full path to lilypond (.ly) file." - (message "Compiling LilyPond...") - (let ((arg-1 org-babel-lilypond-ly-command) ;program - ;; (arg-2 nil) ;infile - (arg-3 "*lilypond*") ;buffer - (arg-4 t) ;display - (arg-5 (if org-babel-lilypond-gen-png "--png" "")) ;&rest... - (arg-6 (if org-babel-lilypond-gen-html "--html" "")) - (arg-7 (if org-babel-lilypond-gen-pdf "--pdf" "")) - (arg-8 (if org-babel-lilypond-use-eps "-dbackend=eps" "")) - (arg-9 (if org-babel-lilypond-gen-svg "-dbackend=svg" "")) - (arg-10 (concat "--output=" (file-name-sans-extension file-name))) - (arg-11 file-name)) - (if test - `(,arg-1 ,nil ,arg-3 ,arg-4 ,arg-5 ,arg-6 ;; arg-2 - ,arg-7 ,arg-8 ,arg-9 ,arg-10 ,arg-11) - (call-process - arg-1 nil arg-3 arg-4 arg-5 arg-6 ;; arg-2 - arg-7 arg-8 arg-9 arg-10 arg-11)))) +;;Ignoring second arg for pre Org 9.7 compatibility +(defun org-babel-lilypond-compile-lilyfile (filename &optional _) + "Compile Lilypond FILENAME and check for compile errors." + (message "Compiling %s..." filename) + (let ((args (delq nil (list + (and org-babel-lilypond-gen-png "--png") + (and org-babel-lilypond-gen-html "--html") + (and org-babel-lilypond-gen-pdf "--pdf") + (and org-babel-lilypond-use-eps "-dbackend=eps") + (and org-babel-lilypond-gen-svg "-dbackend=svg") + (concat "--output=" (file-name-sans-extension filename)) + filename)))) + (apply #'call-process org-babel-lilypond-ly-command nil + "*lilypond*" 'display args))) (defun org-babel-lilypond-check-for-compile-error (file-name &optional test) "Check for compile error. -- 2.42.0 --=-=-=--