From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OA1ODXEbCGfn4wAAqHPOHw:P1 (envelope-from ) for ; Thu, 10 Oct 2024 18:22:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OA1ODXEbCGfn4wAAqHPOHw (envelope-from ) for ; Thu, 10 Oct 2024 20:22:41 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=i41i7pcF; 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-Seal: i=1; s=key1; d=yhetil.org; t=1728584561; a=rsa-sha256; cv=none; b=W9tuZWr8tz2PCQRZ/lw1rMCWFqHejfnld3KIpgvHusb/oR/cg2QMFRU7pC4GAfZoJSH9eZ dm3J2l6Nhkqndbu3CnVkTA9qkz6oWeyRqTfkugbMQUsDIyX14vnDtNkQ5A/bDnggi3XnSc li0cnUPJUJMlojjvHdSk7YQ8grOEesnIEOncybEHuezLlAhqrL4rHTneUTZHliXGWSiKQq RQm1lii44EsDySn/W7P+//xCgP7SoxAqvVjHeBhJK0hKLjYBAPyJ7JhaOzSgVi0DSJfo6M i+wCJ860CEVzSydXfuYmK/LctCbu+UOSSfLJ0wCiYcG6kVJNFwHmquCBzYzlow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=i41i7pcF; 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=1728584561; 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=Xmzpx/hlmO+QBz3LWTPQXIMCUqdsC/xBdpWnNyjr19k=; b=hiTsRTeBDzzlh2nlKOe6IITJxJSNXV1p1HgIn1vEkYCNC2/bF6VlRcD6gGxy2kXQa5gE9y Bq8rXjJjOFTcT8NpwLp28VfskttvkWyp7Ae5ro9GNNSbaUgAkrF06gtd+OtS4A2aU6JM4y 3jFE5Mfpc+mJcTNWOaNIU/afs1vJ1sWU+iHpjCwnFkM3R7qRsCP3Fh0WaoYCJu3KQJIHtq uveRlTBTTDHxkaWBnbuQBOmkm00C02HZD7VRohrvQJRpebQaW9sRemg/+iWA8wr96z5plo u59c7kSBT3l9FaCqh7pzT/sP+qDTY7UuGfVf1cyyYhpFEL9RkNv38oDjrIKPwA== 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 C715D872E7 for ; Thu, 10 Oct 2024 20:22:40 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syxnK-0006mi-01; Thu, 10 Oct 2024 14:21:50 -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 1syxnF-0006mK-7U for emacs-orgmode@gnu.org; Thu, 10 Oct 2024 14:21:45 -0400 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syxnD-0000Xo-LD for emacs-orgmode@gnu.org; Thu, 10 Oct 2024 14:21:44 -0400 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-45effbc3348so10850341cf.2 for ; Thu, 10 Oct 2024 11:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728584502; x=1729189302; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Xmzpx/hlmO+QBz3LWTPQXIMCUqdsC/xBdpWnNyjr19k=; b=i41i7pcFBj+J2ubwgHldJtmkxs21VxpzSxJN7J+J5mb9CQoH5IIk/orqNSaWTXvXzb QxcD8X+5ItpFxzzM6e4yE4tZptM83XJJ2ZoJhwghVNb86YkYeSd50+8Vfli5zql/xFUa OUNscNgiHffr6A3RM78didkkyWy/kuw38sUsYjMh52ozmAnYh5hB9KwpvtXEt00mWvXI n4RIFiUP9GjtPuq1dX8F/xq0pYypMTmVZQ+X3S/4atgvuoTEWxKqp+/d1SUPoSSdOWlg RRj5Gf1CnxGjLpoet+ZwDzyxKdKaMnMp6WMiT7rbzbx+tKkShL/ahjFMo2krIk1kBodR 5LRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728584502; x=1729189302; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xmzpx/hlmO+QBz3LWTPQXIMCUqdsC/xBdpWnNyjr19k=; b=lo2sJ93EuT3JdfdxLxg0HiKVpEQmv+hek75S/OgLy/+ONLqlIdh117MKTy3P7mm9rM eNXh/Y2VxVKeZ6QK95dRGZf+XRkDLprW67jq3qX3YggwkPiGmPBc5O3E3fN27FOiMIkd /03ssBYR/eh3/JvMtiN4oOydLvMU/uFStru+jd/SL+EmkN84YwIvchVxy06I7NTjslwY 6abkI9Wa0PTthDyAJCttMhhxUASlHDFgBjKzeNFAN5OCb35bpvIWlHKp54MSCyvv7hju 45gFE46rfcyO6RwNLpBXs+OCekKpJQqkiECHElAMjN26o4OrNCt+Mftsq03BaoTvo/fj 9zYQ== X-Gm-Message-State: AOJu0YwiYwQhyabxDyo8LN8R/Jq4lZXOzuLWHO0J28vuPNY5qSjnIdIx QpcQFVVbc+1Y0enJuGtryDod51TosYgHvwLOrNslXR8kmqmW7GEN X-Google-Smtp-Source: AGHT+IFQvYPY3f0I1JQsXdoNBIxdutVkD0Oq9yXGVdjokitDX4ID2PDJ2FEY7Fp/vGNuWv392uQOgg== X-Received: by 2002:a05:622a:2a18:b0:458:4e9e:634e with SMTP id d75a77b69052e-45f9d36ec1amr109070381cf.11.1728584501802; Thu, 10 Oct 2024 11:21:41 -0700 (PDT) Received: from [192.168.0.14] ([70.22.187.146]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-460428013bfsm7736831cf.39.2024.10.10.11.21.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Oct 2024 11:21:41 -0700 (PDT) Message-ID: Date: Thu, 10 Oct 2024 14:21:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [BUG] org-babel-header-arg-expand is rather cavalier about "appropriate context" [9.8-pre (release_9.7.10-127-g07dd3b @ /usr/local/share/emacs/site-lisp/org/)] To: Ihor Radchenko Cc: emacs-orgmode@gnu.org References: <87zfnrb2nu.fsf@pierrot.dokosmarshall.org> <87iktzkfrt.fsf@localhost> Content-Language: en-US From: Nick Dokos In-Reply-To: <87iktzkfrt.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=ndokos@gmail.com; helo=mail-qt1-x82b.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-Spam-Score: -5.75 X-Spam-Score: -5.75 X-Migadu-Queue-Id: C715D872E7 X-Migadu-Scanner: mx10.migadu.com X-TUID: jJqO08V/GLgQ On 10/10/24 1:51 PM, Ihor Radchenko wrote: > Nick Dokos writes: > >> This was reported by user @Addlai on Emacs SE. See >> https://emacs.stackexchange.com/questions/82276/stop-org-cycle-from-prompting-for-header-args >> >> `org-babel-header-arg-expand' is added to the hook >> `org-cycle-tab-first-hook' so when a TAB is pressed, the function is >> called to check whether the context is approrpiate to call >> `org-babel-enter-header-arg-w-completion'. >> >> But the only thing it checks is whether the preceding character is a >> colon and whether we are in a source block (by calling >> `org-babel-where-is src-block-head'), so if one presses TAB inside a >> python source block after a colon, the context is deemed "appropriate" >> and you are asked for a header arg. > Confirmed. > >> It should probably check that it's *on* the header line of the source >> block, not just that it is *inside* the header block. > Agree. > We need to compare the return value of > `org-babel-where-is-src-block-head' with point. > > Would you be interested to submit a patch that fixes the issue? Sure - it'll take me a few days, but I should be able to get one togother by early next week. Thanks! -- Nick >