From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Link "bracket-types"
Date: Fri, 11 May 2018 16:15:59 +0200 [thread overview]
Message-ID: <8736yynuqo.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CALn3zohO-Sf0Yb0RmN+TcAkUbpGFzP1c8FXpOgFrh6_0VXFcVg@mail.gmail.com> (Michael Brand's message of "Fri, 11 May 2018 15:55:50 +0200")
[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]
Michael Brand <michael.ch.brand@gmail.com> writes:
> Do you mean here attached and updated as of today?
I meant to attach it, but apparently forgot. I attach it here for other feedback.
> Currently we disagree in that you suggest one bracket where I prefer
> none for descriptive links and you suggest one bracket where I prefer
> two for the other cases, see rendering examples and my reasons for raw
> plain text in non-Org tools above.
Indeed, we disagree. I find your suggestion not predictable enough.
Sometimes square brackets appear, sometimes not... Besides, it doesn't
solve the issue my suggestion was initially trying to solve.
> If there would be an option to show 0 (current behavior), 1 (your
> suggestion) or 2 brackets (new) everywhere I could use 2 as
> a compromise. If the option 0, 1 or 2 would be individual for case
> 1 and for case 3/4 that would of course be perfect at least for me.
It's a matter of taste. Showing 2 square brackets doesn't bring much
value, IMO.
Anyway, we might need more feedback on the topic.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: partial link visibility --]
[-- Type: text/x-diff, Size: 1347 bytes --]
From 9e49be14b86a359cd4ea834763c697349eba0d2f Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Fri, 11 May 2018 14:59:33 +0200
Subject: [PATCH] Add `partial' to `org-descriptive-link'
* lisp/org.el (org-activate-links): Handle `partial' value.
---
lisp/org.el | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 2cfe46697..bf1e19f36 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5914,8 +5914,17 @@ This includes angle, plain, and bracket links."
,(or (org-link-get-parameter type :display)
'org-link))
properties))
- (visible-start (or (match-beginning 4) (match-beginning 2)))
- (visible-end (or (match-end 4) (match-end 2))))
+ (visible-start
+ (pcase org-descriptive-links
+ (`nil start)
+ (`partial (or (match-beginning 3)
+ (1- (match-beginning 2))))
+ (_ (or (match-beginning 4) (match-beginning 2)))))
+ (visible-end
+ (pcase org-descriptive-links
+ (`nil end)
+ (`partial (or (match-end 3) (1+ (match-end 2))))
+ (_ (or (match-end 4) (match-end 2))))))
(add-text-properties start visible-start hidden)
(add-text-properties visible-start visible-end properties)
(add-text-properties visible-end end hidden)
--
2.17.0
next prev parent reply other threads:[~2018-05-11 14:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 6:08 Link "bracket-types" Michael Brand
2018-05-10 8:14 ` Nicolas Goaziou
2018-05-10 8:32 ` Eric S Fraga
2018-05-11 12:34 ` Nicolas Goaziou
2018-05-11 13:20 ` Eric S Fraga
2018-05-10 9:41 ` Michael Brand
2018-05-10 12:44 ` Nicolas Goaziou
2018-05-10 13:23 ` Michael Brand
2018-05-10 13:33 ` Nicolas Goaziou
2018-05-10 14:29 ` Michael Brand
2018-05-10 16:27 ` Nicolas Goaziou
2018-05-10 19:58 ` Samuel Wales
2018-05-12 23:35 ` Samuel Wales
2018-05-13 11:10 ` Eric S Fraga
2018-05-10 19:59 ` Michael Brand
2018-05-11 0:22 ` Nicolas Goaziou
2018-05-11 13:10 ` Nicolas Goaziou
2018-05-11 13:55 ` Michael Brand
2018-05-11 14:15 ` Nicolas Goaziou [this message]
2018-05-12 8:12 ` Michael Brand
2018-05-17 16:17 ` Michael Brand
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=8736yynuqo.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=michael.ch.brand@gmail.com \
/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).