From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AJusIXpn+WXQiAAA62LTzQ:P1 (envelope-from ) for ; Tue, 19 Mar 2024 11:22:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AJusIXpn+WXQiAAA62LTzQ (envelope-from ) for ; Tue, 19 Mar 2024 11:22:50 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=d9aZb87l; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710843770; 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=Kd0S/nBNk0M+LqUDU/mqig5fST/fj7VmplXs/XJDNmk=; b=FKsn6yooswvKsRLO99Xt57tqSGvBwbIoGugs5M17TbEL4ha0bAqc9td8d8Jiz04zww+tWv rkkFppmAlLs/S2schT6HTI2mO7N1UejbFHpupu7zlOki9jciBWSdhHb0Qktov5CStIP+aG 0DUFlbP+Fue9bwHjPPq3KvwBHUpj85eT0M6VuurBtx8ZUmDz793YxqzUVBgOMJnF69jdXY 274DkrMzIlQEjN7heJ4UXUQuqDJqRcyjd2WvuG4hvlzK7qSORBcRFYHHWRLfS0/LhzgCMG wrAVMqTt6mVQbFkN8ZLHta/8CRk32lF+PgNcIN2RljVc+FluZ9/GaP30uUuYYw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=d9aZb87l; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710843770; a=rsa-sha256; cv=none; b=sl8S/Db+IjFsqCiermFAO6jlWpeaq9EGK2+myJOSVO8ZFCYejLfONQLeHU+s3z7u6KLS9Z 2//7pFOHTo97rTvIa21bBHlEUT4oqWr9aqzlLqA4Z9JxLC8PoZABLejSUbrHn+H02tr7Ee fBoAveb3UMtfY51O9SECdCYRPvSIkA08a8Qh3qPVwTnVvdYGFGmvGMLq9Rf9BAyGfv2hOS LxXeEGQIWVlh0Lp+MKv8O3ULInwjHYharcU/NAaiJvGH22sPicBRpjjyiINnXtfhkEU1eO a3bwVW4Xf/Zq0QGtulBa7OIdoTYqm45gmoU1uWcdZQtaZCdy4zl10dzCfweOCQ== 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 3E8B71071B for ; Tue, 19 Mar 2024 11:22:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmWbW-0006KJ-M2; Tue, 19 Mar 2024 06:21:58 -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 1rmWbV-0006Jv-27 for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 06:21:57 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmWbT-000761-5w for emacs-orgmode@gnu.org; Tue, 19 Mar 2024 06:21:56 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-513cfc93f4eso6049979e87.3 for ; Tue, 19 Mar 2024 03:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710843713; x=1711448513; darn=gnu.org; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=Kd0S/nBNk0M+LqUDU/mqig5fST/fj7VmplXs/XJDNmk=; b=d9aZb87lzLboU1vJVpc0hNBXPsVc8QD34a3O1OyQ3xFlIDHVQt3WktN2U7rNscStXo p2CzgAb326lNRaObDsUYIw2gGhpNZ8+YuRVvGki0LPKjnWs1kanzWYLvBxewf+CZ4NFO dhdV/O/eY0BsOW8QWYcqkyQTRsqJnb8Rs1tU4XbW9eENz7sLVfUbTgJ5c0Ja/znhuICS e0UX0rkuhqu/7JEXz0TZMQsGgxBV1M7FGSfRsDWNXOnbrsqHTFtzd+yFtFyw/KLE6Gwx 7/bg5/x1O4NTCGU+HsiG/Fav52l8NmDojMzXeKawKJMxj4oW0AQ50l/9fWR5/5U8x+ws 9gyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710843713; x=1711448513; h=content-transfer-encoding:in-reply-to:mail-followup-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Kd0S/nBNk0M+LqUDU/mqig5fST/fj7VmplXs/XJDNmk=; b=PKt9NipjJ5zMpjhBwgJs6Rwc5vCHTaXlRvNdyX0PBW0OizXXnQ/GXPOwa21bGsaPGS 6NpAQyjoVfYePN6MUqtRfB2DobEaTGoihlwBl/BGBLy7CZYqoVI9PKV6Jfw3Sj9/fYGg /UoTGY8jsdtskqVMLYwwwzy443uLatvwJZTZHVzCKA2x5MfbS8BwiuMMn+YpLkjwm4mU aiRTA6hJjNdkZYphRteAw1ahRqyS7tOMjI+CQYWg5dSCeC9yM2Z6KOwAQo1ddrbXpKRg 5Nsf1YySQnM9NGj0j2Xzl8YtPhtBEe7pVxeCN0EpfS/juzZFtCLArvmYFsh9r48rpWHj x0oA== X-Forwarded-Encrypted: i=1; AJvYcCUdkVGS83XCntbmRAkRzrkYytXTJH2Bg7lFaO+bxpsaBXYdgDkLTYP7dTbtatCHMviPucYOyWoUmBKN/vuHnD2qSQxXDyw= X-Gm-Message-State: AOJu0Yw6v/3Z7HHpFJQ7vJRb8aFmOCAR/6P566bQgHqKQ67ZMzOCk4XP ZEHGo6SnWYamQn8HAssbJ4IZ8Y9+2K2IrRz5Z/kCXqiEzS4zgYdy+vz4Ceuc X-Google-Smtp-Source: AGHT+IFGp1zNnsvQvYVwgHOoRoSS3KCP6e7UZom+gJnJdK5ZPmNnPpnfjJ+tdKPBH8lfR+E/TgfK5w== X-Received: by 2002:a19:9118:0:b0:513:d71e:eeb4 with SMTP id t24-20020a199118000000b00513d71eeeb4mr8507219lfd.18.1710843712705; Tue, 19 Mar 2024 03:21:52 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id be12-20020a056512250c00b005130ece9099sm1139133lfb.277.2024.03.19.03.21.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Mar 2024 03:21:52 -0700 (PDT) Message-ID: <7b676235-5e0d-4b7e-b9bf-5eef0908577c@gmail.com> Date: Tue, 19 Mar 2024 17:21:51 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] `org-ctags-create-tags` creates empty TAGS file [9.6.15 (release_9.6.15 @ /home/martin/Projects/emacs/lisp/org/)] Content-Language: en-US, ru-RU To: Morgan Willcock Cc: Martin Marshall , emacs-orgmode@gnu.org References: <874jegqts6.fsf@localhost> <86y1bsowio.fsf@ice9.digital> From: Max Nikulin Mail-Followup-To: Morgan Willcock , Martin Marshall , emacs-orgmode@gnu.org In-Reply-To: <86y1bsowio.fsf@ice9.digital> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=manikulin@gmail.com; helo=mail-lf1-x132.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, T_SCC_BODY_TEXT_LINE=-0.01 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: mx12.migadu.com X-Migadu-Spam-Score: 2.82 X-Spam-Score: 2.82 X-Migadu-Queue-Id: 3E8B71071B X-TUID: 9Q8uKzULtFu3 On 11/02/2024 04:10, Morgan Willcock wrote: > > The shell expansion should work if the asterisk is outside of the > quotes. I've attached an (untested) patch to explain what I mean. Never try to quote arbitrary strings by double or single quotes in shell. There are enough fancy characters that may be interpreted in a special way. The safest approach is to use `process-file' instead of `shell-command', but in the case of a remote file shell is unavoidable and would require additional round trip for `file-expand-wildcards'. The committed change is anyway incomplete. > +++ b/lisp/org-ctags.el > @@ -484,11 +484,11 @@ defun org-ctags-create-tags > (setq exitcode > (shell-command > (format (concat "%s --langdef=orgmode --langmap=orgmode:.org " > - "--regex-orgmode=\"%s\" -f \"%s\" -e -R %s") > + "--regex-orgmode=\"%s\" -f \"%s\" -e -R \"%s\"*") -----------------------------------------------------------^^^^^^ These quote characters should be removed as well > org-ctags-path-to-ctags > org-ctags-tag-regexp > (expand-file-name (concat dir-name "/TAGS")) It requires `shell-quote-argument' as well > - (expand-file-name (concat dir-name "/*"))))) > + (expand-file-name (concat dir-name "/"))))) > (cond > ((eql 0 exitcode) > (setq-local org-ctags-tag-list