From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oJ+kNMbjZ2YW6wAA62LTzQ:P1 (envelope-from ) for ; Tue, 11 Jun 2024 05:42:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oJ+kNMbjZ2YW6wAA62LTzQ (envelope-from ) for ; Tue, 11 Jun 2024 07:42:30 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=XlViOHms; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718084550; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NLt0T/C8mjT6D1boOOG+ezzMVjGKZcfTwnsPNOYh2ws=; b=lrJKludWjnUOtlT1Vvz1W6nIN5t4e8aCH2a1ekZPuWSjGyWDa0Usgtg3XpdwTN/bSs0NN+ s3YLGUs2cu+i91l0x6g+6xeeeqLMABnlaeISh3x4EIrmcv/FDmNFSCZJXRfZ5CRss5x1iR Vr+TG16e+t+al+7YsUQ0On6kHol9fdcgnU2seX4NiSSw6gZetxxWbXjroCL7dsZIx1v+g3 q45ulA+SJ0vgUwsGLF509gegq7p5GQRnpH0AJwSr+1c3KRIn6YAdmL0NdOe4+b/kzWrsSN lYGQq5J4sLmu00E5+987PtK3DW3HgIq2+v4fvomZLYEleshcVQilS+OHfs2onA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718084550; a=rsa-sha256; cv=none; b=MlI5xgz4VGJmmjuJD7P1v28AD1ks4Hb+KeJ9XUbRqwVLLGgN6icJdwB/ZclLUFMyduBZJE KUV304ykMj5SdJnj4kD2PP4l/0qa9Sxc9oxBhAIgyPpzNewynCDwU5LBxC/rST89sospsL oT3oOpA7Dqt8MtE9H0wyd3goQwLD5XqWnDfp4I4FU/bx6+oqeDyjGHUrTwGAdg0C4gNHTB LgwTnFEBu/ZKww1eEcvejA6e/qGSgEezz0cVlHQ5MDmpL0rPQqSiaJMI9FVpmX2t6vl4W9 QmsR9yTSVU0dzM7GkGgUhvjrFi/JSjPPntwyWKVACKJbtXEFLNo8FZei7lWW1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=XlViOHms; dmarc=pass (policy=none) header.from=gmail.com; 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" 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 6E9FAA229 for ; Tue, 11 Jun 2024 07:42:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGuG4-0006NQ-Oi; Tue, 11 Jun 2024 01:41:24 -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 1sGuG2-0006N5-OU for emacs-orgmode@gnu.org; Tue, 11 Jun 2024 01:41:22 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGuG0-00058i-H4 for emacs-orgmode@gnu.org; Tue, 11 Jun 2024 01:41:22 -0400 Received: by mail-pf1-x441.google.com with SMTP id d2e1a72fcca58-7041f4553ccso3052930b3a.1 for ; Mon, 10 Jun 2024 22:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718084479; x=1718689279; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NLt0T/C8mjT6D1boOOG+ezzMVjGKZcfTwnsPNOYh2ws=; b=XlViOHmsRagpAihxBw4VP6TvOXc7r3mo1VBmRWTV8/uNNn6XSqbDa4qVCf6GFUQFhs rse8bnqyXGa3z1ii1YPaYwXW+kctGCOKWtcYx3PlXj9nrY1OLFM5V5zyzMbRg2C1aP6q u/3kl51LA9JRVQ0cug/v+a4PRCpR4PZJsCUxSeWYfIFK81HqLm5L6IyoN5BRM4qctuYa e7RLrR6ZysJRpHhtnUVeRs3qexbFr27MPcC08oVytiVHVoD0RCq5iPTO/gT+XzddwGzB VYCRQV89H+arsriAv3ipnWFcSMybvKT9ZZQK0mEIoaTxHOy4DOtKDxHOn+M9hTSmw/Su yjOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718084479; x=1718689279; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NLt0T/C8mjT6D1boOOG+ezzMVjGKZcfTwnsPNOYh2ws=; b=fN1kQ9ojasV5dSPgxI7nphvCDowwvsg3JuArwEiJlhXL54SANRHvFpqxwVFkL2qeVh GlmyvZNB889QK5nmERSqhxRptZ41qfeUox7VRWVfS8fL2yY22mu4TF4u0foZ+2i5BSrd LZ5n+hPLzYhMlGM9mtI9VcgajmjO5NindR/xhmCrZCmTOP2NLPm6Zt42iANv4C5hwiRE YfJgsY8RNWmQBoLxJpGqgFaMXQ5TTPfmqTayOtM5qekdtPoxs5cxGHd5IZ3hqX8W18dI q7gWcjjY0w92E6j6VazXnoxYTudQd58rmMOa8hG5pQzMRaxW7XUPHq7/loDOEtKe9WeZ 6TBA== X-Gm-Message-State: AOJu0Yxrev2TDT33clsLbU3gHGcV1RErQaEX/Lf4mPjXAKY7ob0Rpvfi hRUzoEzmL0+cJyRmwYlDmal9fsvf7NIyqmj/c7kbRpDDSThNMgZu X-Google-Smtp-Source: AGHT+IGOj/LNg5xSqlZNsOgVwCHe8IFrMFacqMhHb7X9OGqb6h/oftMkss45vUElz/26Uuq0AZo7kg== X-Received: by 2002:a05:6a00:8b11:b0:704:1ed3:5a19 with SMTP id d2e1a72fcca58-7041ed35e99mr7670882b3a.32.1718084478937; Mon, 10 Jun 2024 22:41:18 -0700 (PDT) Received: from localhost ([103.232.241.147]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-703fde38722sm7558698b3a.215.2024.06.10.22.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 22:41:18 -0700 (PDT) From: Visuwesh To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-plot: Unable to use text xtics with type:2d (+ more) [9.7-pre (N/A @ /home/viz/lib/emacs/straight/build/org/)] In-Reply-To: <8734q7jfes.fsf@gmail.com> (Visuwesh's message of "Fri, 24 May 2024 22:49:55 +0530") References: <87cypbjw50.fsf@gmail.com> <871q5rv1qy.fsf@localhost> <8734q7jfes.fsf@gmail.com> Date: Tue, 11 Jun 2024 11:11:16 +0530 Message-ID: <87cyoo594z.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=visuweshm@gmail.com; helo=mail-pf1-x441.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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-Spam-Score: -4.87 X-Spam-Score: -4.87 X-Migadu-Queue-Id: 6E9FAA229 X-Migadu-Scanner: mx11.migadu.com X-TUID: zyZpJFk0KZ4f Ping. Can you answer my questions, Ihor, so that I may prepare a patch accordingly? [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=AE=E0=AF=87 = 24, 2024] Visuwesh wrote: > [=E0=AE=B5=E0=AF=86=E0=AE=B3=E0=AF=8D=E0=AE=B3=E0=AE=BF =E0=AE=AE=E0=AF= =87 24, 2024] Ihor Radchenko wrote: > >> Visuwesh writes: >> >>> Unless I misunderstood the code, the line >>> >>> ;; Check type of ind column (timestamp? text?) >>> (when (plist-get params :check-ind-type) >>> >>> should be >>> >>> ;; Check type of ind column (timestamp? text?) >>> (when (plist-get (cdr type) :check-ind-type) >>> >>> because (1) org-plot/collect-options only adds a select number of >>> keywords to the plist and :check-ind-type is not a part of the select >>> members, and (2) org-plot/gnuplot is never called with a non-nil value >>> for the optional argument PARAMS in tree. >> >> I do not think that it is right. >> AFAIU, the idea is that `org-plot/preset-plot-types' provides some >> default options, but the user can overwrite these defaults in the #+PLOT >> line. What you propose will disregard the values of >> >> :set :line :map :title :file :ind :timeind :timefmt :textind >> :deps :labels :xlabels :ylabels :xmin :xmax :ymin :ymax :ticks >> >> if they are customized by user in `org-plot/preset-plot-types'. > > I don't follow your conclusion since this change will only affect the > value of :check-ind-type so how would it affect the rest of the > settings? > >> I believe that the right way to address the problem will be >> `org-combine-plists' on the (1) org-plot/preset-plot-types; (2) >> org-plot/gnuplot-default-options; (3) #+PLOT lines in the buffer. > > Looking at the definition of org-plot/add-options-to-plist and the Info > manual, I am not sure if :check-ind-type is supposed to be customised by > the PLOT line. It seems to be more of an internal setting. If you > agree to this, I can change the check to > > (when (or (plist-get type :check-ind-type) (plist-get params :check-i= nd-type)) > > to heed the value of :check-ind-type in org-plot/gnuplot-default-options > (since PARAMS has the default values included earlier in the defun). > >>> [...] >>> The other code smell I see is that the function checks for the PLOT line >>> twice. Once near the beginning of the function, and once just after the >>> cleaning up of hline. Is this simply an oversight? >> >> It is kinda intentional, but broken. >> >> Historically, users can put #+PLOT lines _after_ the table. >> However, after refactoring org-table.el, this is no longer working. >> See https://list.orgmode.org/orgmode/87o7a0p9ba.fsf@localhost/ > > OK, I will leave the check in then. > >>> Coming to the grid example, the doc-string of org-plot/preset-plot-types >>> options says: >>> >>> - :data-dump - Function to dump the table to a datafile for ease of >>> use. >>> >>> Accepts lambda function. Default lambda body: >>> (org-plot/gnuplot-to-data table data-file params) >>> >>> but in fact, org-plot/gnuplot passes one more argument to the :data-dump >>> function: >>> >>> ;; Dump table to datafile >>> (let ((dump-func (plist-get type :data-dump))) >>> (if dump-func >>> (funcall dump-func table data-file num-cols params) >>> (org-plot/gnuplot-to-data table data-file params))) >>> >>> but here's the catch: the :data-dump function in the grid option expects >>> the order >>> >>> (lambda (table data-file params _num-cols) >>> >>> which breaks things down the line. What should be the actual order >>> here? I looked at the history of those lines briefly using C-x v h but >>> I don't have the time to look into it properly to decide on the actual >>> argument order. >> >> The best order is de-facto calling convention in the code: >> >> (funcall dump-func table data-file num-cols params) >> >> The docstring and the default value should be fixed accordingly. > > OK, will do this in a future patch.