From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oEUxIKKZqmDo9wAAgWs5BA (envelope-from ) for ; Sun, 23 May 2021 20:06:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UJ/bG6KZqmA3UgAAB5/wlQ (envelope-from ) for ; Sun, 23 May 2021 18:06:26 +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 9FF8610781 for ; Sun, 23 May 2021 20:06:25 +0200 (CEST) Received: from localhost ([::1]:54348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lksUa-0005Ku-1U for larch@yhetil.org; Sun, 23 May 2021 14:06:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lksTw-0005Kl-Td for emacs-orgmode@gnu.org; Sun, 23 May 2021 14:05:44 -0400 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:33782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lksTu-0004z2-W5 for emacs-orgmode@gnu.org; Sun, 23 May 2021 14:05:44 -0400 Received: by mail-lj1-x22f.google.com with SMTP id o8so30568942ljp.0 for ; Sun, 23 May 2021 11:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qkg9YhWg4shyeEscmwfL7FOkNsIHE2NYIBxFaiCdjiI=; b=JjiPOIvFa0kl4tTrkqfl2CZOgNHTOGsVSDBncUJpkCurkUiJbQlhQPtaTuSEpCQ+Uz fE+YO5a5PQzyod8B1J4v/C4FJbrZWdwdknbPuLoByt0sFF4hPciICULkTkEODDfaQquz 7yZc6liOOWWNCKFh/aWkwwsrz9Wdf0Nd7i4TMw1Vd+xrGpftjfs/C/GMlO4dekDtKEeS P3G/ZTaa71E+lqPW1hckkbRCHlTre1ckrXmqgSH3d7sF7YUNw6XV8Vam1EQsJfYtGkaO E31z1CzdLkgaXncwS/dRstTAmaZjsrEyghqG8U3slP44kTwZvPa8XyOcf/BqDP9oJpV5 4i4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qkg9YhWg4shyeEscmwfL7FOkNsIHE2NYIBxFaiCdjiI=; b=c5H7ylSY/y0YmU97hm7cj44jIuxaet9bBMmEYetJ2N7lB41PglLHSRw+gN6t3jd3v+ 2IloebKQLIBZpVZEtGnK+NQ+iH9ua1Vz4Z8U32hD8iFvHNZ1Hx1F/s66Zb+diQuiw3Fc crWxu6lOcM/XfRvSJ0wjWwV7dYNPxayiFHmB8LTabpIyo8dVczgBFTXRwGe8QwvVX+DQ HFbuW3OSI8EGmg9paTi6B6wgGs9krd0YhE6Z0Q2U1NzsmaidKQCNv4hk3qqhy2TJVTNO YeDny9YwowwKPyWKfUA02k0oRqG2OuqIZLLD7GwRECKA6aA7Bkjh/cJ9onq1u+7gqWQr B52A== X-Gm-Message-State: AOAM533IpjmdIpFuT7p2glGUq+wdla7epzFesr7VW4TZNH99aSzY7N1y oybwEmQzbXqdnBxmZjm+CndHT7Zggnck80HWq7E= X-Google-Smtp-Source: ABdhPJzVZeNxh/DeJUh2slpu31ZGJEW238JOnPSFwriyB/WyxVlgsbv5TlQfEwoWfutkg/TsxanFEDqb+zNwMTB6Uv8= X-Received: by 2002:a2e:6a03:: with SMTP id f3mr12838306ljc.455.1621793140002; Sun, 23 May 2021 11:05:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bhavin Gandhi Date: Sun, 23 May 2021 23:35:05 +0530 Message-ID: Subject: Re: Bug: Double trailing slash for default candidate in org-refile-get-target [9.4 (9.4-7-g3eccc5-elpaplus @ /home/gustavo/.emacs.d/elpa/org-plus-contrib-20200921/)] To: gusbrs.2016@gmail.com Content-Type: multipart/mixed; boundary="000000000000026aa305c3032453" Received-SPF: pass client-ip=2a00:1450:4864:20::22f; envelope-from=bhavin7392@gmail.com; helo=mail-lj1-x22f.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, HTML_MESSAGE=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: 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=1621793185; 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=qW7F/HtFCXDi+4XMuaSjbAp4Zui/ZvDzJEgB08dA3yo=; b=SM2CI4qEDgPYBprnig6ih/LMxWb1/qIQbWyMm78QlJvpzGYutmepNJKdblYOvmD+NAJymf JEF4/bgtgn/RJjcYv5GIagR5W0wcuFn1zsXRg5TgH0jBuA8rNVRB/SeQXHe9DICw3sYChe J4Wn/BfrX+5VupEraq7cH4sqOrYmahgrY26niVD4F07+JPzjp2lm0QtYuja7NDvtKV5X3p TnjctYiQ9J189Re2/Xip41xT22PWCPMbvZAdtf6lw+RWLOev9fH+HeZww6hvcIwkQ/PExs rFa0S8ROtC78tMF60PdMz780nTt3xNGletnJ6ly8IGZ6ySOOTJeoO1uMno36Ag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621793185; a=rsa-sha256; cv=none; b=XYhA0pT4cDJ+9EBRNN/QiEnbSujVB6NblVGjEnFBGT2jR/uUkIUQbTddogB2ubvOxNXc9j px87kwVk0yE+wN1X0HH+Zfq1wf81RH1oNTUMZg0Dr+EUWV7Tuy1dKKY05halUJ2Gf3ebg9 5oindPBxJu144clYetp6m4Nu6m9RYnrPgIDOGU1vXb9TLoqoL9bXrTtwtNabgr5QjQeAF6 5wFIp76woyhrrU1z9ogYdJXpTwU659B/AtO0OekbSfL2u0MSk3NuU62zj1qkIjD31dBQsQ qVxU+Ygt/tS/serzjBhE4Gg1/ubeNfjtYaD7o/131aC5YCyTSFalq5l+yEvLoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=JjiPOIvF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: -0.24 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=JjiPOIvF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 9FF8610781 X-Spam-Score: -0.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: oBjSyh4qZA3c --000000000000026aa305c3032453 Content-Type: multipart/alternative; boundary="000000000000026aa205c3032451" --000000000000026aa205c3032451 Content-Type: text/plain; charset="UTF-8" Finally after spending a couple of hours, I was able to understand the code of org-refile-get-location \o/. The detailed bug report helped me to understand the issue. I'm attaching a patch here which should fix the problem, it has other details as well. I have tested a few basic scenarios as mentioned in the report. OTOH, I haven't signed the FSF Copyright assignment yet, should I do it before this gets merged or it can be done later? --000000000000026aa205c3032451 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Finally after spending a couple of h= ours, I was able to understand the code of org-refile-get-location \o/. The= detailed bug report helped me to understand the issue. I'm attaching a= patch here which should fix the problem, it has other details as well. I h= ave tested a few basic scenarios as mentioned in the report.
=
OTOH, I haven't signed the FSF Copyright assignment yet,= should I do it before this gets merged or it can be done later?
<= /div>
--000000000000026aa205c3032451-- --000000000000026aa305c3032453 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-org-refile-Fix-double-slashes-in-the-refile-targets.patch" Content-Disposition: attachment; filename="0001-org-refile-Fix-double-slashes-in-the-refile-targets.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kp1hp76u0 RnJvbSAyMzQzMTZlZDQ5MDIzMzYyZDExNmQ4ODRiYTdmMjg1OWU1ZjA0YzFiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCaGF2aW4gR2FuZGhpIDxiaGF2aW4xOTJAZ2Vla3NvY2tldC5p bj4KRGF0ZTogU3VuLCAyMyBNYXkgMjAyMSAyMzowNzoxMyArMDUzMApTdWJqZWN0OiBbUEFUQ0hd IG9yZy1yZWZp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