From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mPi7IblW52RncgEASxT56A (envelope-from ) for ; Thu, 24 Aug 2023 15:10:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GMRmIblW52RGtwAAauVa8A (envelope-from ) for ; Thu, 24 Aug 2023 15:10:17 +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 0B8805A9C7 for ; Thu, 24 Aug 2023 15:10:17 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=ZoCW6yQq; 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=1692882617; 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=KgFgjO2LWk84vWUGY+I1sZn7v4A1Nkf+oaFfKOAVD+k=; b=sVUQFPCpus1o2iJNWnRSIi0A98zSZAeDIkYznkCS/pmmF0FZ7m8cqR4f/hyyJ4Jqis8SEu oeN1pOo+m2s55MzO9kiq6oWoPYMOKIKfdn//jn+r/H9hv7sN2SPyzfLuxy63jc+qjHYI3v VadCagY8w3/+GqwWMXBP90IAo1OO/TiEl6FD81wEKyiguvG+y/ojCUNaHow3OMCrl4mnXX I1+y3ET3SeCarL7uoIfrb94hiyIsCDiEvmIZJ8tn0MTuB1fVINfQWWchPXNXYaRmMI/xdv E4v8Y6badrCRZ7IVRcIh9Q3DPS3zkELuKU3GCyi28u73UOCLILisURWo2nsrFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=ZoCW6yQq; 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=1692882617; a=rsa-sha256; cv=none; b=gcGUDyUqyz2kNJigJ6dja+F1jRfUP0/fZmmUl/U2Ynd43pxNI3457MBRDJe6Kyhmce2I4Q Yd+F5RE+KuJiXlGStZXKjATINeboSDOrqDSMBLNrEELjtGt34BJGpxRIUlWTaAbY2cOeXu qOjC2SDnqyeFu0EIZUgusUHZH2N+MfIlboEq73SXOyPzDEk5mGjdStY4tw5uzuz09Gbf5G zKbMEoWnGggZ67mzMpq3WDaiKS/MK62f/l6C8gMu/6LbAdm0jmr+D4oCcty9UH9GqMCbN0 lvDryn8HlwisE55xRB92fC1exF5Ui9mG1hbXvJVf7r5AtB9QsV8ZR4rStI7TcQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZA5j-0006aw-VB; Thu, 24 Aug 2023 09:09:39 -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 1qZA5e-0006YQ-QR for emacs-orgmode@gnu.org; Thu, 24 Aug 2023 09:09:35 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZA5b-00013T-6F for emacs-orgmode@gnu.org; Thu, 24 Aug 2023 09:09:33 -0400 Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-76d9023c942so419392585a.0 for ; Thu, 24 Aug 2023 06:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692882570; x=1693487370; 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=KgFgjO2LWk84vWUGY+I1sZn7v4A1Nkf+oaFfKOAVD+k=; b=ZoCW6yQqoivEWco0Ss/pw3Vooj6YLpFVfxggmh72VUaFzSikAGiH6J0QB1y2DeZDdZ fjqt2vJlxMfjgiW+d1PgwZKw+3I3JVtTYEJUSeIU5rNulm3MOTvB+LH6lF4tTyuNmzos 3D4Y4vbFHA8OsxaRyBw4pjloTj84Hk7ha8eKUn/l+oa6IJOF86teIVcYh7ziPheTm5tJ 1z7JEcgGH8vdjZr4hP+bNWv0qTraWu0nrPUev9kYt5X0Wd9r7c0dkMSjOBlBH6pULrb3 SR9Hgpa5GOLJ90kVb5xLs7zrEpnniBAd67i8m1L8D88tHnNI0ugEyDN3we9aPvGxsvk1 zKQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692882570; x=1693487370; 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=KgFgjO2LWk84vWUGY+I1sZn7v4A1Nkf+oaFfKOAVD+k=; b=WaqZ7Pp1lUWUY3IDtWoUvmeL5ij1thZpby03Nq3/UzVC0Rd8ptTtmUKVvFewcR75ZP ouRbnN6Psy4d7viH4iy3kf9sCIVxWOR3iJKmifMAws4vzMvi2Ptgs92XFCFrR/Q4iaEu lXps9iFMReunWI5uQhZibvunoYNfMGftrn7xh8ZJV/1yk3tutHTwj1auvCQKyyp33nm2 ovXvaYYIRQ6d83oyc4RKD9m1Kq4MAeoIVM6cLE6dRH2uexKUyT1HPWgA1+zDcLvJZD7O 2cQRRzUvmmBXil+Q/dzzX95ah4y+lM7a+FnYZiLlWF41kjATTEttyh97C6cttFkxLDLM ZU9g== X-Gm-Message-State: AOJu0YwVI60m0o4fPEons0ISu9IUHjUgAidSdVnqMXeUinLauvEKayby brN6jcTYxvVZBVB6H7v4OL3+ryfsXlU= X-Google-Smtp-Source: AGHT+IGkjPcWASl9br2P560v/JgFoPNVnf3x2e6BxxAVfAQEXAjfZPhvUXLWmIsbytZ85GEhJeZ8aQ== X-Received: by 2002:a0c:df05:0:b0:641:8878:29a5 with SMTP id g5-20020a0cdf05000000b00641887829a5mr20024798qvl.61.1692882569665; Thu, 24 Aug 2023 06:09:29 -0700 (PDT) Received: from laptop ([2601:84:847f:c697:2d4:9eff:feb6:970c]) by smtp.gmail.com with ESMTPSA id k4-20020a0cf284000000b0064f46422ddasm2780332qvl.145.2023.08.24.06.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 06:09:28 -0700 (PDT) References: <87sf881v3z.fsf@gmail.com> <87lee0k3tq.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]: fix ob-lilypond docstrings Date: Thu, 24 Aug 2023 08:56:54 -0400 In-reply-to: <87lee0k3tq.fsf@localhost> Message-ID: <87o7iw1t9a.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::72b; envelope-from=iarchivedmywholelife@gmail.com; helo=mail-qk1-x72b.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -6.58 X-Spam-Score: -6.58 X-Migadu-Queue-Id: 0B8805A9C7 X-TUID: s1k6KUOo8E8w --=-=-= Content-Type: text/plain; format=flowed Ihor Radchenko writes: > No Wayman writes: > >> The attached patch satisfies all but two checkdoc warnings. >> I left those two for someone more familiar with the package. > > Thanks! > >> Subject: [PATCH] * lisp/ob-lilypond.el: satisfy checkdoc > > _S_atisfy. > >> (org-babel-lilypond-compile-post-tangle): fix docstring >> (org-babel-lilypond-display-pdf-post-tangle): fix docstring >> (org-babel-lilypond-play-midi-post-tangle): fix docstring >> (org-babel-execute:lilypond): fix docstring >> (org-babel-lilypond-tangle): fix docstring >> (org-babel-lilypond-process-basic): fix docstring >> (org-babel-lilypond-parse-line-num): fix docstring >> (org-babel-lilypond-set-header-args): fix docstring > > It is enough to say "Fix docstring" just for the last line and > leave all > other : ... empty. Fixed in attached patch. >> (defun org-babel-lilypond-set-header-args (mode) >> - "Set org-babel-default-header-args:lilypond >> -dependent on ORG-BABEL-LILYPOND-ARRANGE-MODE." >> + "Set lilypond babel header args from >> ORG-BABEL-LILYPOND-ARRANGE-MODE." > > What is ORG-BABEL-LILYPOND-ARRANGE-MODE? Looks like it's a variable that would be better served by a minor-mode. #+begin_src emacs-lisp (defvar org-babel-lilypond-arrange-mode nil "Non-nil turns Arrange mode on. In Arrange mode the following settings are altered from default: :tangle yes, :noweb yes :results silent :comments yes. In addition lilypond block execution causes tangling of all lilypond blocks.") #+end_src A minor mode would also obviate the need for `org-babel-lilypond-toggle-arrange-mode'. Let's do that in a separate patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-lisp-ob-lilypond.el-Satisfy-checkdoc.patch >From 2acc8e219011040d76e0faa0a6f642ace480f2df Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 24 Aug 2023 08:20:22 -0400 Subject: [PATCH] * lisp/ob-lilypond.el: Satisfy checkdoc (org-babel-lilypond-compile-post-tangle): (org-babel-lilypond-display-pdf-post-tangle): (org-babel-lilypond-play-midi-post-tangle): (org-babel-execute:lilypond): (org-babel-lilypond-tangle): (org-babel-lilypond-process-basic): (org-babel-lilypond-parse-line-num): (org-babel-lilypond-set-header-args): Fix docstring --- lisp/ob-lilypond.el | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index 8b2bd231f..b6ee91f58 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -58,23 +58,13 @@ ob-lilypond-header-args See `org-babel-lilypond-set-header-args'.") (defvar org-babel-lilypond-compile-post-tangle t - "Following the org-babel-tangle (C-c C-v t) command, -org-babel-lilypond-compile-post-tangle determines whether ob-lilypond should -automatically attempt to compile the resultant tangled file. -If the value is nil, no automated compilation takes place. -Default value is t.") + "When non-nil, compile tangled file after `org-babel-tangle'.") (defvar org-babel-lilypond-display-pdf-post-tangle t - "Following a successful LilyPond compilation -org-babel-lilypond-display-pdf-post-tangle determines whether to automate the -drawing / redrawing of the resultant pdf. If the value is nil, -the pdf is not automatically redrawn. Default value is t.") + "When non-nil, display pdf after successful LilyPond compilation.") (defvar org-babel-lilypond-play-midi-post-tangle t - "Following a successful LilyPond compilation -org-babel-lilypond-play-midi-post-tangle determines whether to automate the -playing of the resultant midi file. If the value is nil, -the midi file is not automatically played. Default value is t") + "When non-nil, play midi file after successful LilyPond compilation.") (defvar org-babel-lilypond-ly-command "" "Command to execute lilypond on your system. @@ -155,20 +145,17 @@ org-babel-expand-body:lilypond body)) (defun org-babel-execute:lilypond (body params) - "This function is called by `org-babel-execute-src-block'. -Depending on whether we are in arrange mode either: -1. Attempt to execute lilypond block according to header settings - (This is the default basic mode) -2. Tangle all lilypond blocks and process the result (arrange mode)" + "Execute lilypond src blcok according to arragne mode. +See `org-babel-execute-src-block' for BODY and PARAMS. +When in arrange mode, tangle all blocks and process the result. +Otherwise, execute block according to header settings." (org-babel-lilypond-set-header-args org-babel-lilypond-arrange-mode) (if org-babel-lilypond-arrange-mode (org-babel-lilypond-tangle) (org-babel-lilypond-process-basic body params))) (defun org-babel-lilypond-tangle () - "ob-lilypond specific tangle, attempts to invoke -=ly-execute-tangled-ly= if tangle is successful. Also passes -specific arguments to =org-babel-tangle=." + "Tangle lilypond blocks, then `org-babel-liypond-execute-tangled-ly'." (interactive) (if (org-babel-tangle nil "yes" "lilypond") (org-babel-lilypond-execute-tangled-ly) nil)) @@ -190,7 +177,8 @@ org-babel-lilypond-paper-settings They are needed for mixing music and text in basic-mode.") (defun org-babel-lilypond-process-basic (body params) - "Execute a lilypond block in basic mode." + "Execute a lilypond block in basic mode. +See `org-babel-execute-src-block' for BODY and PARAMS." (let* ((out-file (cdr (assq :file params))) (file-type (file-name-extension out-file)) (cmdline (or (cdr (assq :cmdline params)) @@ -308,7 +296,7 @@ org-babel-lilypond-mark-error-line (goto-char temp)))) (defun org-babel-lilypond-parse-line-num (&optional buffer) - "Extract error line number." + "Extract error line number in BUFFER or `current-buffer'." (when buffer (set-buffer buffer)) (let ((start (and (search-backward ":" nil t) @@ -441,8 +429,7 @@ org-babel-lilypond-get-header-args ob-lilypond-header-args))) (defun org-babel-lilypond-set-header-args (mode) - "Set org-babel-default-header-args:lilypond -dependent on ORG-BABEL-LILYPOND-ARRANGE-MODE." + "Set lilypond babel header according to MODE." (setq org-babel-default-header-args:lilypond (org-babel-lilypond-get-header-args mode))) -- 2.41.0 --=-=-=--