From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wOVmB8naP2NEAAEAbAwnHQ (envelope-from ) for ; Fri, 07 Oct 2022 09:52:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KEZiB8naP2N5PQEAauVa8A (envelope-from ) for ; Fri, 07 Oct 2022 09:52:41 +0200 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 D759612B31 for ; Fri, 7 Oct 2022 09:52:39 +0200 (CEST) Received: from localhost ([::1]:49324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogi9u-0001Gy-Io for larch@yhetil.org; Fri, 07 Oct 2022 03:52:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogi8i-0001DH-1r for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 03:51:25 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:43624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogi8f-00038W-JC for emacs-orgmode@gnu.org; Fri, 07 Oct 2022 03:51:22 -0400 Received: by mail-pf1-x434.google.com with SMTP id 204so4226800pfx.10 for ; Fri, 07 Oct 2022 00:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=KjziE5vUmOTGl9up6iJ4dg/hBGW3oMk+ALd4wvPrv6Q=; b=mwUo+uDTc3aPakPujuA4rpE1f2fjw4yHKH/rYYSVr0KdLIjtFGH5U1C4oN5ABois+u bBJ1MxQWn/r0cyL0XQJ+65CPoDUi5k+xNXVMY5WO0DU7ZlvWxiopTQmVE4kPMbcyfD1p mkyuJOHAM3L6nvI5WowqafkAWTSpVtm/PBBUPsqN0NtwB79QiZOidrXhIowYtGdgP3SO GYuyWiXgIWjHp5K4H0v800IvI8/OxRnocNT85OJ7OC29DuqrCoT/PlI2fwxXPgS2PnWr Ewlk45ZhRdXDR9aoQ9hNPx2ijAGEP0M1tr77TlR9+Yq1rJVMjUIlYXlg153UFWdB2v3g MS0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=KjziE5vUmOTGl9up6iJ4dg/hBGW3oMk+ALd4wvPrv6Q=; b=jwtUAOGoIODObdvpcRbzduh0PqHUDGHBEuS5Vhjue1Q+8aTwTZDQTksN69s/RAGrAC 5IYcPXM8Q38a9K5NbgowkGGr/2Vdwk3ekq/UfrSZKZQ3n/o+oK29dmBAwbwzYxNgTlhp oU9ouKhqOEzDKDh/1m074V5gKCjUDj7uNhTKycuWaylV7XsiwAB+SLgI1Jem2uozAS9h XFHKmKt2oTXe2zr4wdW9cz7XPEAbcADU9MycQPnQrPk42YCRxa9IGEQXHax1UCGs08dO Fn+HuB26Z7sT5aiqFAr1UkPbQhSr/OujlTN3+s1mAGVVT8HS8mPhg+yuDqln9JE0irJ2 UV9A== X-Gm-Message-State: ACrzQf1eowPmxUzp2N6oM4D3/fBgyYePWvkNInKpQ1bMJLgz54eGG2Oe IZNJmW0XPvU8M/4HpjDaxYQ= X-Google-Smtp-Source: AMsMyM6kyhBiihfpj9XdrOfUq0uP0yUFwJjGY02nauz8W91RA1zxHGpB0cRCXwHjsouYF3kwHXvODA== X-Received: by 2002:aa7:951c:0:b0:562:ca32:3d3f with SMTP id b28-20020aa7951c000000b00562ca323d3fmr739303pfp.33.1665129080039; Fri, 07 Oct 2022 00:51:20 -0700 (PDT) Received: from localhost ([2409:8970:af2:32f:6c23:3ad5:f37d:541b]) by smtp.gmail.com with ESMTPSA id z10-20020a630a4a000000b004388ba7e5a9sm1023988pgk.49.2022.10.07.00.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 00:51:19 -0700 (PDT) From: Ihor Radchenko To: Carlos Pita Cc: Greg Minshall , emacs-orgmode@gnu.org Subject: Re: [BUG] "args out of range" on link heading completion [9.5 (9.5-gd361c7 @ /Users/carlos/.emacs.d/straight/build/org/)] In-Reply-To: References: <913858.1634788206@apollo2.minshall.org> <87r1cfvvd0.fsf@localhost> Date: Fri, 07 Oct 2022 15:52:05 +0800 Message-ID: <87edvkkr4q.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=yantar92@gmail.com; helo=mail-pf1-x434.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.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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665129159; 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=KjziE5vUmOTGl9up6iJ4dg/hBGW3oMk+ALd4wvPrv6Q=; b=RpG1bNxvhn4MpC0bV7vgcHJT8o2zZUBZyxkjsVC+15J1NUAXJEWY7dQ44/OYEgtedt3q8+ ehTvVySSoqRwC7j1MsP4mz0AEe3qZQNH6+ghKt1A57bXDsONHg41pIAf8aRo4znOGEunYv 7RS4MeNCuFiU+XAb2CMXB+gl09wsQwaSSWyZkqPKBcJk5ac+8zxWqYOKdWC5q2GRiPHmQC sKji4HK9fXkcIBe7WVJXnnmey/WT3XHz43UjyaIeKlRg4mP7+/eiJzArtRASe/tzXsa+t8 uYURpT65kBF5PeNLjh0EfLPNhS8tX4JTGxBSnmKVu5jqw/hPd8Oleq10plCCRA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665129159; a=rsa-sha256; cv=none; b=JNAybwS4WhYz0+0yHUjGufU/e1PlhQaNOMv7QeQ+OgN/pqabl57iH3hiKatASKuO6BtX3W Q90rg0KSL2atehbzQ+iE7Stz1KoCFIaacsudKdwd/w9nKZKtCUEtrHKdKf7uwBDksexzad wFOwSbykAbhCOwW0TyYXoLMGA2dzavTKgtCUwwn5odb6HsPTeZgsYDB2FXYL+8XchEV9I0 pcQyoDvcTwrmLacX8znfouJ7dSy8NGDWZOk0UNkogsrepMTMk2FAC1aTUlDN2XQ6q07gzb oRl4SLEXnVmXsyN6XHycoQqknAZTfALecyalKV8gZ8A3x79/wspDrqneJtaEKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mwUo+uDT; 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" X-Migadu-Spam-Score: -7.17 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mwUo+uDT; 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" X-Migadu-Queue-Id: D759612B31 X-Spam-Score: -7.17 X-Migadu-Scanner: scn0.migadu.com X-TUID: k2E8B0ucCRCC Carlos Pita writes: > 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? And finally fixed on main using a different approach. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1a62cd94cfc92c3ce6eadb2ffc1d6a18e8caee86 -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at Fixed.