From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mJqaN9E6cmGzygAAgWs5BA (envelope-from ) for ; Fri, 22 Oct 2021 06:15:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iSQKM9E6cmEPRQAAbx9fmQ (envelope-from ) for ; Fri, 22 Oct 2021 04:15:13 +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 5E73616695 for ; Fri, 22 Oct 2021 06:15:13 +0200 (CEST) Received: from localhost ([::1]:40646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdlxX-0008RT-2A for larch@yhetil.org; Fri, 22 Oct 2021 00:15:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdlwx-0008RL-Pd for emacs-orgmode@gnu.org; Fri, 22 Oct 2021 00:14:35 -0400 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:36854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdlwv-0006bv-Vl for emacs-orgmode@gnu.org; Fri, 22 Oct 2021 00:14:35 -0400 Received: by mail-qt1-x829.google.com with SMTP id b12so2505380qtq.3 for ; Thu, 21 Oct 2021 21:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=jP6wtuWmiV01q9PHUQu2GwEtBdEsYbEj39IIGqo82Eo=; b=UkqpU3pXlEdOByjkR+RYwNgtZBbue6go3lPqqGauGRwbhW60VfbHp9oWoeq4zYv8fE t3qI5k1zapD0RpQ0ZeGxBHCnqm5C4Ru/ujhtbEuRrL5MRP9mJ5Ir4u5VGZY0d/8RhsLd SjTui0hL0Ud44jo1Xb+RiYfHeEyG4hT6hjHqwUz7zPNI6WOI+CDMs8LFC2LpjVcWgXnb 9CGxonylpwyN7oUlR5+AAU2rr8JilyY4YftRLWBcIBzE2zMII4EMNYNoya3BGZNiti4Y QnY8KbRe9QLerx25Q9oyWppxV91fosE9FXypg3cnziMPE3V8/LOe9vb/WFJOiMALekax Mfow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=jP6wtuWmiV01q9PHUQu2GwEtBdEsYbEj39IIGqo82Eo=; b=aLVBEH07PX4XftraDYGshqGAURYQe/s0D2xtgCwYDb4fFwnZTcVmyMFLWiVATu1plg j7VblLUiXpdIIfQeZYeYjxx6TZWWIG51ulEMlU5YjNhqgs7jAk9awyooVhbB9pONkewF RakHFnUGvsNhJcfnwFhZL9cL2dw99FziNNK/L4Mg2A4tVl+Z9VTPKECNjfmEWGHyXz92 1PDIxH8mYlm74Nsz0vJg3raruJA/6YxACbchGLRylaKbO3Zl04niRNEp/ox/2K3YJXwO md3xtAj9xnlsTO+4LuEvnyj/A4vVyxL5WJb7EH8JvbqVSoH74uQQVfyxvcazMJCVbae0 FZZg== X-Gm-Message-State: AOAM531ln/dymge5UIoBB76rFOoLupdpXyygBesjb2F34IYVM5htyCM5 WTngHeIl77vEDmH2+zj1H/Qx4ZWakU0z7w== X-Google-Smtp-Source: ABdhPJwQcPpy6qpQY7Qbaw6JmOA2Zz5AVlXJlyMGzOS0TckaOoOw7DWutrisBe4kLuK/A0xVWWjJ9g== X-Received: by 2002:a05:622a:13c6:: with SMTP id p6mr10969133qtk.165.1634876072802; Thu, 21 Oct 2021 21:14:32 -0700 (PDT) Received: from Carloss-MacBook-Pro.local ([186.136.138.53]) by smtp.gmail.com with ESMTPSA id g5sm3488537qkm.112.2021.10.21.21.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Oct 2021 21:14:32 -0700 (PDT) From: Carlos Pita To: Ihor Radchenko Subject: Re: [BUG] "args out of range" on link heading completion [9.5 (9.5-gd361c7 @ /Users/carlos/.emacs.d/straight/build/org/)] References: <913858.1634788206@apollo2.minshall.org> <87r1cfvvd0.fsf@localhost> Date: Fri, 22 Oct 2021 01:14:26 -0300 In-Reply-To: <87r1cfvvd0.fsf@localhost> (Ihor Radchenko's message of "Thu, 21 Oct 2021 12:45:47 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (darwin) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::829; envelope-from=carlosjosepita2@gmail.com; helo=mail-qt1-x829.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, 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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Minshall , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634876113; 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=jP6wtuWmiV01q9PHUQu2GwEtBdEsYbEj39IIGqo82Eo=; b=BzrHWdqxr/lz1p8zShQnDMxbKaChtg0nWASIS6FJcGBEwQJnUsvr6PRHxZEBzNimFId2YS fBy7zGBlL62v/aIZxgfSO3WGCyL64gC+TLWT/FNayIkqlA9FzyVlsVMAIF3jQGHeOj39wM 5JGlA1npbnom9/b/7pM6nKzJWHRXkRDeykcSoW6w8s/Gv3MjydLh8cy8pi/ZHUEueES1yV 6MXLU4rGr8acQYvHTtlvcHFDqnH28HXwRf2QihPR0L6uA5ALkUH8Vk/R1pJj4pwP5pHjAF fljP3Qo6u+HX7NHYKJZ1PUsVvzw/btfIB/PlGC1R6MH8w8uNEl7OxXzt/hWvEw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634876113; a=rsa-sha256; cv=none; b=aa5DooxDaKLY2AYGtmNzvH+O3vCjwWe/IdrDy7x9NE115vOPIFRnFBSeK6kckSYAuTlOO8 oy0bViHnqn1VspQhHSjHmhew/83/v3nIPbKl7pbIWI72oD3m7s7WjbjkPXAR44OhcPtNFD vIwMS9Dr0z2C/EJkSXr9IKCm1GyNdVKbq0YH0n9syWpfA5P5yeiOfgC9dtD0HcLleVNKrg ChDm99wUbZs+iI0VZpKJz5HHVLGXesC7aY0+t0Hv4HHs//7QnXBcYsUQ//yjgSHCXUQPHo DO18Z5zGNIX2tuGJHjWTyIlQUGmFyyfjRNXCRA/ev3B3XxhIk4tVui/JU0p3zQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UkqpU3pX; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Spam-Score: -3.13 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=UkqpU3pX; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: 5E73616695 X-Spam-Score: -3.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: W7MEG8O+IhHu Hi Igor, I believe the problem is in: (defun pcomplete/org-mode/searchhead () ... ;; When completing a bracketed link, i.e., "[[*", argument ;; starts at the star, so remove this character. (substring pcomplete-stub 1)))) <-- trailing ]] not removed! Changing the last line to (substring pcomplete-stub 1 -2) fixes it in my example. I don't know if one is supposed to do [[*prefix]] or [[*prefix as is implied by the code, but better to support both, specially considering electric pairs, don't you think? Best regards, Carlos