emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] wrapping links
@ 2022-07-04  0:48 Tor Kringeland
  2022-07-04  1:11 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Tor Kringeland @ 2022-07-04  0:48 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

When a link goes over a (real) line wrap for indented lines, the leading
spaces get formatted as part of the link and this looks ugly.

#+begin_example
- [[this link looks
  ugly]]
#+end_example

It would be nice to at least have an option to disable formatting of the
leading (and trailing) spaces.  (Now I just try to keep all of the link
on one line, but this does not work well with `fill-paragraph'.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] wrapping links
  2022-07-04  0:48 [BUG] wrapping links Tor Kringeland
@ 2022-07-04  1:11 ` Ihor Radchenko
  2022-07-04 14:03   ` Tor Kringeland
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2022-07-04  1:11 UTC (permalink / raw)
  To: Tor Kringeland; +Cc: emacs-orgmode@gnu.org

Tor Kringeland <tor.kringeland@ntnu.no> writes:

> When a link goes over a (real) line wrap for indented lines, the leading
> spaces get formatted as part of the link and this looks ugly.
>
> #+begin_example
> - [[this link looks
>   ugly]]
> #+end_example
>
> It would be nice to at least have an option to disable formatting of the
> leading (and trailing) spaces.  (Now I just try to keep all of the link
> on one line, but this does not work well with `fill-paragraph'.)

Could you please elaborate?
The above link (if changed to more correct [[https://orgmode.org][this
link looks ugly]] will be exported without the newlines and extra
spaces.

Best,
Ihor


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] wrapping links
  2022-07-04  1:11 ` Ihor Radchenko
@ 2022-07-04 14:03   ` Tor Kringeland
  0 siblings, 0 replies; 3+ messages in thread
From: Tor Kringeland @ 2022-07-04 14:03 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode@gnu.org

Ihor Radchenko <yantar92@gmail.com> writes:

> Could you please elaborate?
> The above link (if changed to more correct [[https://orgmode.org][this
> link looks ugly]] will be exported without the newlines and extra
> spaces.

Yes.  I don't mean in export, but in org-mode itself.  Since the second
line in the example starts with leading spaces, those spaces will be
formatted as part of the link (with a blue nuderline).  So Org correctly
recognizes multi-line links, it's just that the formatting in this case
is ugly.

#+begin_example
- [[https://orgmode.org][this
  link looks ugly]]
#+end_example

The same happens with underline formatting.  With bold or italic
formatting it does not happen because no visible change to spaces is
made.  For example

#+begin_example
  _formatting continues into the
  second line_
#+end_example

looks ugly as well.  Both because the leading spaces on the second line
are formatted and (arguably) because the newline at the end of the first
line is formatted as an underline as well (like a space).

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-04 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-04  0:48 [BUG] wrapping links Tor Kringeland
2022-07-04  1:11 ` Ihor Radchenko
2022-07-04 14:03   ` Tor Kringeland

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).