From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OJe5IfIe6V8mcAAA0tVLHw (envelope-from ) for ; Sun, 27 Dec 2020 23:55:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id UJ5nHfIe6V/NUwAAbx9fmQ (envelope-from ) for ; Sun, 27 Dec 2020 23:55:30 +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 E7F2C9402A2 for ; Sun, 27 Dec 2020 23:55:29 +0000 (UTC) Received: from localhost ([::1]:46148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktfsl-0006qO-BD for larch@yhetil.org; Sun, 27 Dec 2020 18:55:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktfs5-0006qH-FA for emacs-orgmode@gnu.org; Sun, 27 Dec 2020 18:54:45 -0500 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:39831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktfs3-0004fR-TD for emacs-orgmode@gnu.org; Sun, 27 Dec 2020 18:54:45 -0500 Received: by mail-oi1-x22a.google.com with SMTP id w124so10040090oia.6 for ; Sun, 27 Dec 2020 15:54:43 -0800 (PST) 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=bkdISYfkvQX9pBniV/YcpUty0lZCyygR6+b8M6AsPxI=; b=gUxXHyusnoNlw06TyiWLFzFYP7nkOP8ckaZlSS/qrZtDGKwoLtONGPeLxFzT9TlyHJ st8jSvJCmF2RGcTX02bX65H/g6oDqVcIHhlPnj8jnUx4vQe+mErhtRKdFFyoVc7prNg6 lM60SBTEOaqwKPuI8MmokM9E6PZmARgHtILivWDX5NMt7rvCpRaEs8FMdSnqucJtrGRn pSDWSUDIG0GyuHJFScqcrGFiwf7tg2vUOITv9ULgOhGHh6U20wDNegwcegyOBoVruLXM j51c5pMyGjB49RhnkKMUnWA5n/VnbNm2HRsS3G5YctH+9ShZcKzafa+ZwMv+yYz/tuNP fqvQ== 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=bkdISYfkvQX9pBniV/YcpUty0lZCyygR6+b8M6AsPxI=; b=iVp/AJzAuRKhrn8Wh7k+bc4cCyg3Wg33okIjevbEBf0AP6WcBB8pNE1dDcTQ5yn89V u0lArgVdMIlUCkJE6OvdLval+9kkLJWv+Lr5NMn53eS2OsOKOyn4nDTZtrjdMCMvzreg V5s0w2HXSMZBb+pTkDbMCOGG8ABmdHj6Xrt9RNdOYJ/60TKw7JPYiZ41zFC53c6LUTvO YAkegoJBSYWFdJpDUhynLarMDaMNsQZ9uxSQ06SlqSEXvER2NuHB3dU+EqoW2LRWtmp5 Nc/YpOzJYEmsPyu37WLB5XkvXFjCcJQEmD49ZCkIXckmK3pwNj9ZsHq72imXEekCpefo 5OHQ== X-Gm-Message-State: AOAM531Oc1P1CyQdM9ROUie4pje1juvZohGnwnopBvgsx/8thP8+4xTh xBKZ2oa8to6/m0d+Lhgt6KbdLAZo023kpN0YVQQ= X-Google-Smtp-Source: ABdhPJxZf3/8wIJpmrd/jPFNMXeBByGs27kXg9ZX1YB55/pt+0JtkDTQkq6Nvc8knBhS//khnv0ndpxDMseRS99E9/Y= X-Received: by 2002:aca:909:: with SMTP id 9mr10260880oij.69.1609113282812; Sun, 27 Dec 2020 15:54:42 -0800 (PST) MIME-Version: 1.0 References: <87eejbunhh.fsf@posteo.net> In-Reply-To: <87eejbunhh.fsf@posteo.net> From: Chris Hunt Date: Sun, 27 Dec 2020 18:54:06 -0500 Message-ID: Subject: Re: Bug: Tildes in URL impact visible link text [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] To: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::22a; envelope-from=chrahunt@gmail.com; helo=mail-oi1-x22a.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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.02 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=gUxXHyus; 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: E7F2C9402A2 X-Spam-Score: -3.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: A5C8e0y3Nbh/ > If it's just that case, you can try replacing each > tilde with %7E (see > https://www.w3schools.com/tags/ref_urlencode.asp). That way the > link description would have to be formatted correctly, without spurious > characters. That's a good workaround, thank you. Manually replacing "~" in the URL with "%7E" results in the expected description ("metrics"). Using that link in Firefox navigates to the page successfully, too. I looked at the problem some more. I think the underlying behavior leading to the bug is that `org-activate-links` sets an `invisible` text property on the URL and brackets of link text. `org-activate-code`, which runs afterwards, identifies "code" in a way that isn't aware of links, then proceeds to drop the "invisible" property. That behavior makes sense, since in the usual case we're removing properties so the text is displayed verbatim, but not when the whole text is contained in the URL section of a link.