From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +BZOOfp91l6ydAAA0tVLHw (envelope-from ) for ; Tue, 02 Jun 2020 16:27:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qM4SNfp91l4TFgAAbx9fmQ (envelope-from ) for ; Tue, 02 Jun 2020 16:27:38 +0000 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 3EE19940058 for ; Tue, 2 Jun 2020 16:27:38 +0000 (UTC) Received: from localhost ([::1]:55944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9lH-0000t4-H9 for larch@yhetil.org; Tue, 02 Jun 2020 12:27:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg9k8-0000rM-QT for emacs-orgmode@gnu.org; Tue, 02 Jun 2020 12:26:24 -0400 Received: from confino.investici.org ([212.103.72.250]:53697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg9k1-0008Kg-2A for emacs-orgmode@gnu.org; Tue, 02 Jun 2020 12:26:24 -0400 Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 2C8CA20FCB; Tue, 2 Jun 2020 16:26:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anche.no; s=stigmate; t=1591115173; bh=TeyM9Jsvf8SDIYRQ8xnb7TyAr/DJxhrNgmdylMjYPlE=; h=To:From:Subject:Date:From; b=lN+77Tu2IRuZ1mTelGxxqKPpzYEVNejfkP0SEbkoIa4evAbte1eGCt3eRQIRf/f/T n/0c6mhFJkSgY8SlMSVBqbWUfc4wbdT4ffjzHjUCDEpZw9TW7Iz+OYjCTNMqmfAhcN uvG8UwC5O+7GBAdaIqdcz1dGBtDrOl6MlSMjgu7U= Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: mariotomo@inventati.org) by localhost (Postfix) with ESMTPSA id C12C720FA6; Tue, 2 Jun 2020 16:26:11 +0000 (UTC) To: emacs-orgmode@gnu.org From: Mario Frasca Subject: [PATCH] docstrings to match the code, and minor cosmetics. Message-ID: Date: Tue, 2 Jun 2020 11:25:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=212.103.72.250; envelope-from=mario@anche.no; helo=confino.investici.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/02 12:26:13 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=anche.no header.s=stigmate header.b=lN+77Tu2; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: S9tDxFDqKGen From 43cc6264deb89fcc665d123b06c7c2aebb35ab3a Mon Sep 17 00:00:00 2001 From: Mario Frasca Date: Tue, 2 Jun 2020 16:22:07 +0000 Subject: [PATCH] docstrings to match the code, and minor cosmetics. ---  lisp/org-plot.el | 21 ++++++++++++++-------  1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lisp/org-plot.el b/lisp/org-plot.el index a23195d2a..3a95c72d6 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -85,14 +85,18 @@ Returns the resulting property list."    p)  (defun org-plot/goto-nearest-table () -  "Move the point forward to the beginning of nearest table. -Return value is the point at the beginning of the table." -  (interactive) (move-beginning-of-line 1) +  "Move the point to the beginning of table. +Moves back if the point is inside a table, otherwise looks for next table. +If there is no table to be found, moves to end of buffer. +Return value is the point." +  (interactive) +  (move-beginning-of-line 1)    (while (not (or (org-at-table-p) (< 0 (forward-line 1)))))    (goto-char (org-table-begin)))  (defun org-plot/collect-options (&optional params)    "Collect options from an org-plot `#+Plot:' line. +Examines the line at point.  Accepts an optional property list PARAMS, to which the options  will be added.  Returns the resulting property list."    (interactive) @@ -143,7 +147,8 @@ and dependent variables."       (counter 0)       row-vals)      (when (>= ind 0) ;; collect values of ind col -      (setf row-vals (mapcar (lambda (row) (setf counter (+ 1 counter)) +      (setf row-vals (mapcar (lambda (row) +                   (setf counter (+ 1 counter))                     (cons counter (nth ind row)))                   table)))      (when (or deps (>= ind 0)) ;; remove non-plotting columns @@ -156,7 +161,8 @@ and dependent variables."                table)))      ;; write table to gnuplot grid datafile format      (with-temp-file data-file -      (let ((num-rows (length table)) (num-cols (length (nth 0 table))) +      (let ((num-rows (length table)) +        (num-cols (length (nth 0 table)))          (gnuplot-row (lambda (col row value)                 (setf col (+ 1 col)) (setf row (+ 1 row))                 (format "%f  %f  %f\n%f  %f  %f\n" @@ -180,7 +186,8 @@ and dependent variables."      row-vals))  (defun org-plot/gnuplot-script (data-file num-cols params &optional preface) -  "Write a gnuplot script to DATA-FILE respecting the options set in PARAMS. +  "Return gnuplot script respecting the options set in PARAMS. +DATA-FILE is the name of the data containing file.  NUM-COLS controls the number of columns plotted in a 2-d plot.  Optional argument PREFACE returns only option parameters in a  manner suitable for prepending to a user-specified script." @@ -274,7 +281,7 @@ manner suitable for prepending to a user-specified script."  (defun org-plot/gnuplot (&optional params)    "Plot table using gnuplot.  Gnuplot options can be specified with PARAMS.  If not given options will be taken from the +PLOT -line directly before or after the table." +line(s) directly before the table."    (interactive)    (require 'gnuplot)    (save-window-excursion -- 2.20.1