emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Okam <okamsn+emacs-org@protonmail.com>
To: "Berry, Charles" <ccberry@health.ucsd.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Org failing to format a link with verbatim text
Date: Thu, 18 Feb 2021 00:25:41 +0000	[thread overview]
Message-ID: <7456c577-b2d9-f847-8bdd-db602ad4d0ed@protonmail.com> (raw)
In-Reply-To: <200F8C74-6673-4EF4-A8DC-A45C5E865A2A@health.ucsd.edu>

[-- Attachment #1: Type: text/plain, Size: 3122 bytes --]

On 2/17/21 1:00 PM, Berry, Charles wrote:
>
>
>
>> On Feb 17, 2021, at 6:48 AM, Okam <okamsn+emacs-org@protonmail.com> wrote:
>>
>> On 2/16/21 6:52 PM, Berry, Charles" via "General discussions about
>> Org-mode. wrote:
>>>
>>>
>>>
>>>> On Feb 16, 2021, at 1:20 PM, Okam <okamsn+emacs-org@protonmail.com> wrote:
>>>>
>>>> I am using the Emacs gccemacs branch with Org version "9.5-dev".
>>>> I have noticed that when I try to insert the stored link
>>>>
>>>>      file:doc/loopy-doc.org::*Destructuring with =dash=
>>>>
>>>> and use the heading as the link description, that Org cannot format this
>>>> link correctly in all circumstances, and tries to make the verbatim text
>>>> break out from the link.
>>>
>>> The last para of (info "(org) External Links") says in part:
>>>
>>> #+begin_quote
>>> If spaces must be part of the link (for example in
>>> ‘bbdb:R.*Stallman’), or if you need to remove ambiguities about the
>>> end of the link, enclose the link in square or angular brackets.
>>> #+end_quote
>>>
>>> To me, this sounds like advice not to drop external links amid normal text. i.e. put them in brackets instead.
>>>
>>> HTH,
>>>
>>> Chuck
>>>
>>>
>>
>> Hello,
>>
>> The link is being insert with the command `org-insert-link`, and the
>> information is gotten by the command `org-store-link`.  The link is
>> being surrounded by square brackets when `org-insert-link` inserts the
>> link.  However, Org mode does not format the link correctly, as seen in
>> the pictures I sent.
>>
>> I am wondering whether I should report this as a bug, or whether this
>> problem is already fixed, as I do not update Org frequently.
>>
>> Thank you.
>>
>
> I cannot reproduce this. These keystrokes:
>
> #+begin_example
> M-x org-insert-link file:doc/loopy-doc.org::*Destructuring with =dash= RET Destructuring with =dash= RET
> #+end_example
>
> yield a link displayed as underlined `Destructuring with =dash=' and show the actual link when the cursor hovers over the description.  Further, when I run `org-fill-paragraph' I sometimes get newlines inserted in the description, but the link is still functional.
>
> What is needed is an ECM [1] that will lead to the problem you describe.
>
> Screenshots do not help very much as the precise sequence of keystrokes that results in the issue cannot be reverse engineered, so others cannot easily trace the action.
>
> Chuck
>
> p.s. Using Org version 9.4.3
>
> [1] https://orgmode.org/worg/org-faq.html#ecm
>

Hello,

I have attached a minimum working example.  The bad formatting also
occurs when just pasting the link.  In the example, Org mode highlights
from beginning of the phrase "=verbatim text 1=" to the end of the
phrase "=verbatim text 3=" in the verbatim font style. Part of the link
is hidden as normal, but the text within the region of now verbatim text
is not hidden, including some of the brackets.

I have reproduced this without loading a configuration, so it is present
in version of Org included in the Gccemacs branch of Emacs.

Does that help?

Thank you.


[-- Attachment #2: org-formatting-ecm.org --]
[-- Type: text/plain, Size: 144 bytes --]

The link [[phrase with =verbatim text 1=][a phrase with =verbatim text 2=]] followed by a phrase in =verbatim text 3= followed by normal text.


  parent reply	other threads:[~2021-02-18  0:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 21:20 Org failing to format a link with verbatim text Okam
2021-02-16 23:52 ` Berry, Charles via General discussions about Org-mode.
     [not found]   ` <4d4823eb-926a-0b5b-a594-69b8d3c9cbe8@protonmail.com>
     [not found]     ` <200F8C74-6673-4EF4-A8DC-A45C5E865A2A@health.ucsd.edu>
2021-02-18  0:25       ` Okam [this message]
2021-02-18  2:19         ` Samuel Wales
2021-02-18  3:15         ` Berry, Charles via General discussions about Org-mode.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7456c577-b2d9-f847-8bdd-db602ad4d0ed@protonmail.com \
    --to=okamsn+emacs-org@protonmail.com \
    --cc=ccberry@health.ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).