From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SJDAL9tWNWQF0AAASxT56A (envelope-from ) for ; Tue, 11 Apr 2023 14:47:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2CPjL9tWNWQcAQEA9RJhRA (envelope-from ) for ; Tue, 11 Apr 2023 14:47:23 +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 4A76230498 for ; Tue, 11 Apr 2023 14:47:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmDOI-0004bC-FR; Tue, 11 Apr 2023 08:46:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pm3gO-0000M6-SL for emacs-orgmode@gnu.org; Mon, 10 Apr 2023 22:24:32 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pm3gM-0003Ax-1W for emacs-orgmode@gnu.org; Mon, 10 Apr 2023 22:24:32 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 247453200983 for ; Mon, 10 Apr 2023 22:24:27 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Mon, 10 Apr 2023 22:24:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1681179866; x=1681266266; bh=Mtq8KtBNzWKvdfKB4ATE8Khgu LZ7+VI9ehXWjjJpSqM=; b=l1sXg1cJgXG9gxB8wYeJuIGIoUsizGNkqWTh/C3Ej yIZ4HqbbGo7QLuOipDz8c2RCRCYFAxQKZXQM/nZrrKxbdOSxOfLX3/7fZoY2JUVZ rdiAzOQrTGQnbXCOEwjRAFIEXe6kgmII2efOAkKvoL9R82mNco0N6OP7L1ghrnVG S3BSlPQJB3Zrg5IaSnX8MTfbsnjRVe6GObPdQp6AzKTckzHJ6n6BpH2sFOe/uLmF s/hq8HdsW5OFBMnVMa18nAs8L3u9o/H8mKO81/oUdEGsoanizu9WX+PaCm8NyMKY N82CowC74SJsyKpbFsNRdARDIL84leX7So4N69iBoPX9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1681179866; x=1681266266; bh=Mtq8KtBNzWKvdfKB4ATE8KhguLZ7+VI9ehX WjjJpSqM=; b=YVllzyaVNihX1EurSz38L7NnQ5Z6y9xRNQus2ILR1IvGKKBrvJD FdigNoGdnkmFo4Om+sJhV7/SSjtLTP3n+gkmypw4PJf5NV/XIvseDdd9kMcfF1FH S6BaDqNgsNZMrWe3ui4ZZFYsVFb+Xn7JNEDpJC7q2M83CDb2cKdQBDP6fFI/K42+ Qo5qhq/Ehx9eLCmLvj6/OeKLtErUSFt+4ATcCg/PVDr1n1k47PJRrZ9/UYDxUxX7 VvrwNMAgYCdtv5F4TCyWlKjQ9eZCjUQ/o83Gnt6Sab0YrfyMflucAh+esPeIpPf8 zvJE8iKCEQNQ0fEqT3dCr+NUJcKX87NsSZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekfedgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsegrtderre erredtnecuhfhrohhmpedfofhighhuvghlucfirghriigrfdcuoehmihhguhgvlhhgrghr iigrsehfrghsthhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepkedtveekudejte ehjeefhfffueegheeiudehteehveeuuedtgeeiieelteefffffnecuffhomhgrihhnpehg ohhoghhlvgdrtghomhhlihhnkhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehmihhguhgvlhhgrghriigrsehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i277944eb:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7E0D615A0091; Mon, 10 Apr 2023 22:24:26 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-334-g8c072af647-fm-20230330.001-g8c072af6 Mime-Version: 1.0 Message-Id: <4277d947-36de-45fd-b161-c8e4af5d17eb@app.fastmail.com> Date: Mon, 10 Apr 2023 21:23:57 -0500 From: "Miguel Garza" To: emacs-orgmode@gnu.org Subject: [BUG] Killing link located at beginning of line does not kill full link if region is selected to beginning or end of line by either mouse or arrow keys [9.5.2 (release_9.5.2-13-gdd6486 @ c:/Program Files/Emacs/emacs-29.0.50-snapshot/share/emacs/29.0.50/lisp/org/)] Content-Type: multipart/alternative; boundary=bc410788946140f3ae1e2d5b0b0d6ba2 Received-SPF: pass client-ip=64.147.123.21; envelope-from=miguelgarza@fastmail.com; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 11 Apr 2023 08:46:25 -0400 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681217243; a=rsa-sha256; cv=none; b=qAZuV6Jwh5WJsEr6zYklRdzDKHoNe8TvMJ1wXLi07JykafY+RZaScKfUOLtkb1a61MP85t 6sWsWNEbTOAIbc10vxiUL+ezQP1l2dckiIXtd/Ukt3TSvOkhfoGvTv2lD2l5c55wkNWosh Ug/YIRpSltcwZnOyq7TLoN+qc/wXEed0Cptkv3fLTqMalayALZoVEkaEvGDOj58pPFse9u OoaSsjRG/wQfsEg/yChfpLAv43bl+rhGQpal/QxAGUeBAydH/ZrDvVib+5HaWvp+2JShzE zXwUqUjAirpGa/KUScOMf7PGU3p15yx8sVpG4HQamCWUeZuFCzndUP538wFUuQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.com header.s=fm2 header.b=l1sXg1cJ; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=YVllzyaV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681217243; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Mtq8KtBNzWKvdfKB4ATE8KhguLZ7+VI9ehXWjjJpSqM=; b=As6xTeyHaChXuGcTcTQufykwR7huvviFJWg1SwbwPS+SvHgAf7Q5KkdQzZ8dLR0GPIDyUz pLKLxukRX9VMdnvaUuRD3Sr4dGxNEGljVrqjbdlNpivDtl6r1LpBO3EgRb4D8nSjFrcwOA fXQjxZqfsk3YaW5ZrByY7CntcikgLemBT4l8PV98HlNYUIDiuzQoGsa9+D3pPj8O99Fpw+ v+RXeeJoyFGW2+qKF2Tc5l7xdNEqtcLlWy+744Djei31D1rpMY2hDXO4WOmQleijZXokBV ytJGy+kTzjWy8jOtvqQRrlmOvl2zI7Qswol9z9tqJVfKiE2q+0NF79O5rGpDUw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fastmail.com header.s=fm2 header.b=l1sXg1cJ; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=YVllzyaV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=none); 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -0.73 X-Spam-Score: -0.73 X-Migadu-Queue-Id: 4A76230498 X-TUID: kFtJxlJqgJWw --bc410788946140f3ae1e2d5b0b0d6ba2 Content-Type: text/plain Hello, I have Emacs 28 on one machine and this build 29 on this machine--both running on Windows 10. I've encountered the same bug on both builds of Emacs. I believe it's a bug. To reproduce the behavior, first make a link that begins a line, such as: [[www.google.com][link]] Org Mode will turn the above text into a clickable link called "link". Now, select the link either by clicking and dragging the mouse from the end of the word "link" to the beginning of the word, or by starting a region at either the beginning or end of the word (or on the next line) and then using the arrow keys to move point to either the "l" or "k" in "link". Your region should now encompass "link" and nothing else. Now, kill the line or region. You will see immediately that the full text was not killed. Instead, the link description is killed, along with, depending on where point was, possibly some of the brackets, leaving behind the opening brackets, the link URL, the URL closing bracket, and in some cases the final two brackets. This behavior does not occur if the link is not at the beginning of a line. For example, write this instead: This is a [[www.google.com][link]] to Google. Now, mark the same area, just the link that Org Mode has made, called "link", using the mouse or using a region demarcated by using the arrow keys. Now, kill the link. You will see that the full link has been killed. Yank to confirm. I believe org mode is not correctly finding the last characters to select before either the beginning or end of the line in these use cases. Thank you! Emacs : GNU Emacs 29.0.50 (build 8, x86_64-w64-mingw32) of 2022-02-11 Package: Org mode version 9.5.2 (release_9.5.2-13-gdd6486 @ c:/Program Files/Emacs/emacs-29.0.50-snapshot/share/emacs/29.0.50/lisp/org/) current state: ============== (setq org-link-elisp-confirm-function 'yes-or-no-p org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 "\n\n(fn ENTRY)"] org-export-before-parsing-hook '(org-attach-expand-links) org-archive-hook '(org-attach-archive-delete-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) 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-confirm-shell-link-function 'yes-or-no-p outline-isearch-open-invisible-function 'outline-isearch-open-invisible org-agenda-before-write-hook '(org-agenda-add-entry-text) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-elisp-link-function 'yes-or-no-p org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" :follow org-eww-open :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) ("doi" :follow org-link-doi-open :export org-link-doi-export) ("file+sys") ("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"] ) ("help" :follow org-link--open-help :store org-link--store-help) ("file" :complete org-link-complete-file) ("elisp" :follow org-link--open-elisp)) org-metaup-hook '(org-babel-load-in-session-maybe) ) --bc410788946140f3ae1e2d5b0b0d6ba2 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
Hello,

I have Emacs 28 on one machine and this build 29 on= this machine--both running on Windows 10. I've encountered the same bug= on both builds of Emacs. I believe it's a bug.

=
To reproduce the behavior, first make a link that begins a line, su= ch as:


Org Mode w= ill turn the above text into a clickable link called "link".

Now, select the link either by clicking and dragging t= he mouse from the end of the word "link" to the beginning of the word, o= r by starting a region at either the beginning or end of the word (or on= the next line) and then using the arrow keys to move point to either th= e "l" or "k" in "link".

Your region should = now encompass "link" and nothing else.

Now,= kill the line or region.

You will see imme= diately that the full text was not killed. Instead, the link description= is killed, along with, depending on where point was, possibly some of t= he brackets, leaving behind the opening brackets, the link URL, the URL = closing bracket, and in some cases the final two brackets.

This behavior does not occur if the link is not at the b= eginning of a line. For example, write this instead:

<= /div>
This is a [[www.google= .com][link]] to Google.

Now, mark the s= ame area, just the link that Org Mode has made, called "link", using the= mouse or using a region demarcated by using the arrow keys.

Now, kill the link.

You w= ill see that the full link has been killed. Yank to confirm.

I believe org mode is not correctly finding the last c= haracters to select before either the beginning or end of the line in th= ese use cases.

Thank you!
Emacs  : GNU Emacs 29.0.50 (build 8, x86_64-w64-mingw32= )
of 2022-02-11
Package: Org mode version 9.= 5.2 (release_9.5.2-13-gdd6486 @ c:/Program Files/Emacs/emacs-29.0.50-sna= pshot/share/emacs/29.0.50/lisp/org/)

curren= t state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
(setq
org-link-elisp-confirm-function 'yes-or-no-p=
org-bibtex-headline-format-function #[257 "\300=01\236A\2= 07" [:title] 3 "\n\n(fn ENTRY)"]
org-export-before-parsing= -hook '(org-attach-expand-links)
org-archive-hook '(org-at= tach-archive-delete-maybe)
org-cycle-hook '(org-cycle-hide= -archived-subtrees org-cycle-hide-drawers
  org-cycle= -show-empty-lines
  org-optimize-window-after-visibil= ity-change)
org-mode-hook '(#[0 "\300\301\302\303\304$\207= "
   [add-hook change-major-mode-hook org-show-a= ll append local]
   5]
#[0 "\300\3= 01\302\303\304$\207"
   [add-hook change-major-m= ode-hook org-babel-show-result-all
    appe= nd local]
   5]
org-babel-result-h= ide-spec org-babel-hide-all-hashes)
org-confirm-shell-link= -function 'yes-or-no-p
outline-isearch-open-invisible-func= tion 'outline-isearch-open-invisible
org-agenda-before-wri= te-hook '(org-agenda-add-entry-text)
org-src-mode-hook '(o= rg-src-babel-configure-edit-buffer
    = ; org-src-mode-configure-edit-buffer)
org-confirm-elisp-li= nk-function 'yes-or-no-p
org-speed-command-hook '(org-spee= d-command-activate
  org-babel-speed-command-activate= )
org-tab-first-hook '(org-babel-hide-result-toggle-maybe<= br>
      org-babel-header-arg-expand= )
org-link-shell-confirm-function 'yes-or-no-p
org-babel-pre-tangle-hook '(save-buffer)
org-agenda-loo= p-over-headlines-in-active-region nil
org-occur-hook '(org= -first-headline-recenter)
org-metadown-hook '(org-babel-po= p-to-session-maybe)
org-link-parameters '(("attachment" :f= ollow org-attach-follow :complete
org-attach-complete-link= )
       ("id" :follow org-i= d-open)
       ("eww" :follo= w org-eww-open :store org-eww-store-link)
  &nbs= p;    ("rmail" :follow org-rmail-open :store
org-rmail-store-link)
     &nbs= p; ("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 :expo= rt org-info-export
:store org-info-store-link)
       ("gnus" :follow org-gnus-open :s= tore
org-gnus-store-link)
   =     ("docview" :follow org-docview-open :export
=
org-docview-export :store org-docview-store-link)
&nb= sp;      ("bibtex" :follow org-bibtex-open :sto= re
org-bibtex-store-link)
   =     ("bbdb" :follow org-bbdb-open :export org-bbdb-export=
:complete org-bbdb-complete-link :store
org= -bbdb-store-link)
       ("w= 3m" :store org-w3m-store-link)
    &nb= sp;  ("doi" :follow org-link-doi-open :export
org-lin= k-doi-export)
       ("file+= sys") ("file+emacs")
       = ("shell" :follow org-link--open-shell)
   &= nbsp;   ("news" :follow
#[514 "\301\300\302=04Q=02= \"\207"
  ["news" browse-url ":"] 6 "\n\n(fn URL ARG)= "]
)
       ("= mailto" :follow
#[514 "\301\300\302=04Q=02\"\207"
  ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
       ("https" :follow=
#[514 "\301\300\302=04Q=02\"\207"
  ["= https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
)
       ("http" :follow
#[= 514 "\301\300\302=04Q=02\"\207"
  ["http" browse-url = ":"] 6 "\n\n(fn URL ARG)"]
)
  &nb= sp;    ("ftp" :follow
#[514 "\301\300\302=04= Q=02\"\207" ["ftp" browse-url ":"]
  6 "\n\n(fn URL A= RG)"]
)
      = ("help" :follow org-link--open-help :store
org-link--stor= e-help)
       ("file" :comp= lete org-link-complete-file)
     = ;  ("elisp" :follow org-link--open-elisp))
org-metaup= -hook '(org-babel-load-in-session-maybe)
)
<= br>
--bc410788946140f3ae1e2d5b0b0d6ba2--