emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Alexandros Prekates <aprekates@posteo.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: link can not be created in a line with another link.
Date: Wed, 01 May 2024 20:57:36 +0000	[thread overview]
Message-ID: <87sez1qmgv.fsf@localhost> (raw)
In-Reply-To: <20240501230858.2647b8d9@enoush2o>

Alexandros Prekates <aprekates@posteo.net> writes:

> I give a couple of examples that i think highligth some foggy semantics
> of links.
>
> In the example below . is the pointer and single quotes is for
> recognized links and $ for the start of the line.
>
>    $[[foo]].
>    $'foo'.
>    $.'foo'         // here while we could think that the pointer is
>                    // before the link , if we type a char it will 
>                    // be inserted into the link.
>    $'xfoo'         // not x'foo'

This is not about semantics. The point position when there is hidden
text is generally ambiguous. Emacs chooses to put point before or after
invisible text depending on the "direction" of the last command. See
22.6 Adjusting Point After Commands section of Elisp manual, if you want
to know the details. The scenario when invisible text is right at bol is
the most tricky. 

> Also what if we type :
>    $and [[foo]].
>    $and 'foo'.
>    $.and 'foo'
>    $[[goo. and 'foo' //Could not be seen as [[ goo and  [[foo ]]    ?
>                      //                        'goo and [[foo'
>                                              
>                      // But that doesnt happens.
>                      // Org sees it as :
>    $[[goo.  and  'foo' 
>    $[[goo]]  and 'foo'
>    $'goo' and 'foo'

Unescaped brackets are not allowed in the link path.
See 4.1 Link Format section of the manual

      [[LINK][DESCRIPTION]]
     
     or alternatively
     
          [[LINK]]
     
        Some ‘\’, ‘[’ and ‘]’ characters in the LINK part need to be
     “escaped”, i.e., preceded by another ‘\’ character.  More specifically,
     the following characters, and only them, must be escaped:
     
       1. all ‘[’ and ‘]’ characters,
       2. every ‘\’ character preceding either ‘]’ or ‘[’,
       3. every ‘\’ character at the end of the link.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-05-01 20:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28  6:33 link can not be created in a line with another link Alexandros Prekates
2024-04-28 12:40 ` Ihor Radchenko
2024-04-29 12:45   ` Alexandros Prekates
2024-04-29 13:19     ` Ihor Radchenko
2024-04-29 22:33       ` Alexandros Prekates
2024-05-01 20:08       ` Alexandros Prekates
2024-05-01 20:57         ` Ihor Radchenko [this message]
2024-05-01 10:59     ` Max Nikulin
2024-05-01 16:36       ` Alexandros Prekates
2024-05-02 11:15       ` Ihor Radchenko
2024-05-03 10:39         ` Max Nikulin
2024-05-03 13:32           ` Ihor Radchenko

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=87sez1qmgv.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=aprekates@posteo.net \
    --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).