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 PaBdJ8/O6F/3fAAA0tVLHw (envelope-from ) for ; Sun, 27 Dec 2020 18:13:35 +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 yBuaIs/O6F/hZgAAbx9fmQ (envelope-from ) for ; Sun, 27 Dec 2020 18:13:35 +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 CD8F69402A2 for ; Sun, 27 Dec 2020 18:13:34 +0000 (UTC) Received: from localhost ([::1]:46470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktaXt-0007eU-8y for larch@yhetil.org; Sun, 27 Dec 2020 13:13:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktaXC-0007dz-AX for emacs-orgmode@gnu.org; Sun, 27 Dec 2020 13:12:50 -0500 Received: from mout02.posteo.de ([185.67.36.66]:48931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktaX9-0003fx-IE for emacs-orgmode@gnu.org; Sun, 27 Dec 2020 13:12:49 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id EA8052400FD for ; Sun, 27 Dec 2020 19:12:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1609092765; bh=2k4/843Wbzgl5MgIWr8b+rNbacKNYBWf6+pkX0UWQ/M=; h=From:To:Cc:Subject:Date:From; b=nADJlnbJYNa84X1vwbUMPrhs9oaqoIIgaO2XD/J3HYs4eb9XvbcYS3JA3iyqxHlao TGcsYIdL+alQH8p6EJtvGtcTcQHXJQIruOm6nho7LmswhhSKvTwithr2Kyy0s+DJL4 hq4Fs5HVXDs95e7I7GrZ0SoNZt/pxKeP8XGbDkyMDFGljpQs7wk5OgMMeRKr1NQ405 5iIarot49lyE/tEbl+uKhEZqfSDbW77QJNn5GfwEISBYLEmDbSVxJOLfkvw6bLJNI9 1yLnnQ3pemMl6JLziV+LQRJvDppgbyRr1WJ2aYEdW10wD2lFd7LPtYq47a8Ol+80BB G+9q9lcuZ0Cqg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4D3pgb6tJrz9rxg; Sun, 27 Dec 2020 19:12:43 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Chris Hunt Subject: Re: Bug: Tildes in URL impact visible link text [9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/)] References: Date: Sun, 27 Dec 2020 19:12:42 +0100 In-Reply-To: (Chris Hunt's message of "Sun, 27 Dec 2020 11:44:07 -0500") Message-ID: <87eejbunhh.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=posteo.net header.s=2017 header.b=nADJlnbJ; dmarc=pass (policy=none) header.from=posteo.net; 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: CD8F69402A2 X-Spam-Score: -3.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: wxI4OgoUqZY8 Hello, I think the problem comes because in that url the tilde does not have an escape character. 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. Regards Juan Manuel Chris Hunt writes: > I'm trying to create a link in an org file with this URL: > > https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#metricsV2:graph=~(view~'timeSeries~stacked~false~metrics~(~(~'CWAgent~'backup_time~'host~'desktop~'metric_type~'timing))~region~'us-east-1);query=~'*7bCWAgent*2chost*2cmetric_type*7d > > and this description: "metrics". > > To do it, I followed these steps: > > 1. run `emacs -Q test.org`, where test.org is not an existing file > 2. emacs GUI displays, type `M-x org-insert-link` > 3. a "Link" prompt is displayed, paste the link and press return > 4. a "Description" prompt is displayed, type "metrics" and press return > > At this point I expect to see only the text "metrics" in the buffer, with normal > link decoration (underline and highlight). > > Instead, I see "~(~'CWAgent~metrics" with some mix of link decoration > and some other style, as shown in the following image: > > https://i.imgur.com/vb9vE43.png > > The actual text from the file is > > [[https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#metricsV2:graph=~(view~'timeSeries~stacked~false~metrics~(~(~'CWAgent~'backup_time~'host~'desktop~'metric_type~'timing))~region~'us-east-1);query=~'*7bCWAgent*2chost*2cmetric_type*7d][metrics]] > > This is emacs 27.1 from http://ppa.launchpad.net/kelleyk/emacs/ubuntu, > with org version 9.3. > > Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version > 3.22.30, cairo version 1.15.10) > of 2020-09-19 > Package: Org mode version 9.3 (release_9.3 @ /usr/share/emacs/27.1/lisp/org/) > > current state: > ============== > (setq > org-src-mode-hook '(org-src-babel-configure-edit-buffer > org-src-mode-configure-edit-buffer) > org-link-shell-confirm-function 'yes-or-no-p > org-metadown-hook '(org-babel-pop-to-session-maybe) > org-clock-out-hook '(org-clock-remove-empty-clock-drawer) > org-mode-hook '(#[0 "\300\301\302\303\304$\207" > [add-hook change-major-mode-hook org-show-all append local] > 5] > #[0 "\300\301\302\303\304$\207" > [add-hook change-major-mode-hook org-babel-show-result-all > append local] > 5] > org-babel-result-hide-spec org-babel-hide-all-hashes) > org-archive-hook '(org-attach-archive-delete-maybe) > org-confirm-elisp-link-function 'yes-or-no-p > org-agenda-before-write-hook '(org-agenda-add-entry-text) > org-metaup-hook '(org-babel-load-in-session-maybe) > org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 > "\n\n(fn ENTRY)"] > org-babel-pre-tangle-hook '(save-buffer) > org-tab-first-hook '(org-babel-hide-result-toggle-maybe > org-babel-header-arg-expand) > org-occur-hook '(org-first-headline-recenter) > org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-show-empty-lines > org-optimize-window-after-visibility-change) > org-speed-command-hook '(org-speed-command-activate > org-babel-speed-command-activate) > org-confirm-shell-link-function 'yes-or-no-p > org-link-parameters '(("attachment" :follow org-attach-open-link :export > org-attach-export-link :complete > org-attach-complete-link) > ("id" :follow org-id-open) > ("eww" :follow eww :store org-eww-store-link) > ("rmail" :follow org-rmail-open :store > org-rmail-store-link) > ("mhe" :follow org-mhe-open :store org-mhe-store-link) > ("irc" :follow org-irc-visit :store org-irc-store-link > :export org-irc-export) > ("info" :follow org-info-open :export org-info-export > :store org-info-store-link) > ("gnus" :follow org-gnus-open :store > org-gnus-store-link) > ("docview" :follow org-docview-open :export > org-docview-export :store org-docview-store-link) > ("bibtex" :follow org-bibtex-open :store > org-bibtex-store-link) > ("bbdb" :follow org-bbdb-open :export org-bbdb-export > :complete org-bbdb-complete-link :store > org-bbdb-store-link) > ("w3m" :store org-w3m-store-link) ("file+sys") > ("file+emacs") ("shell" :follow org-link--open-shell) > ("news" :follow > #[257 "\301\300\302 Q!\207" ["news" browse-url ":"] 5 > "\n\n(fn URL)"] > ) > ("mailto" :follow > #[257 "\301\300\302 Q!\207" ["mailto" browse-url ":"] > 5 "\n\n(fn URL)"] > ) > ("https" :follow > #[257 "\301\300\302 Q!\207" ["https" browse-url ":"] > 5 "\n\n(fn URL)"] > ) > ("http" :follow > #[257 "\301\300\302 Q!\207" ["http" browse-url ":"] 5 > "\n\n(fn URL)"] > ) > ("ftp" :follow > #[257 "\301\300\302 Q!\207" ["ftp" browse-url ":"] 5 > "\n\n(fn URL)"] > ) > ("help" :follow org-link--open-help) > ("file" :complete org-link-complete-file) > ("elisp" :follow org-link--open-elisp) > ("doi" :follow org-link--open-doi)) > org-link-elisp-confirm-function 'yes-or-no-p > ) >