From: Michael Brand <michael.ch.brand@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>, Bastien <bzg@gnu.org>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: link interfering with brackets when abbreviated
Date: Mon, 3 Mar 2014 06:54:29 +0100 [thread overview]
Message-ID: <CALn3zogLPBQ4o6NmVf_Z5h3VOQAQvvFigJ8MZMGr-Z-yKWP9xA@mail.gmail.com> (raw)
In-Reply-To: <878ussk3c7.fsf@bzg.ath.cx>
Hi all
On Sun, Mar 2, 2014 at 4:49 PM, Bastien <bzg@gnu.org> wrote:
> In the meantime, other users' voices can help us step back and
> see things differently.
May I ask at least Nicolas and Bastien:
When you carefully reread my last post (Thursday)
http://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00991.html
of this thread: Is it clear that when point is after the character "x"
- x y [2014-03-03 Mon] z t http://orgmode.org
I want to keep "M-x org-open-at-point" to result in the error "No link
found", in any case?
The other reason for this post is an update of my function
f-open-link-between-point-and-eol to deal with links in Org mode that
occur in a place that is not a link according to Org syntax (currently
two cases in discussion). I bind this function still to "C-c o". Not
to "C-c C-o", because I want to use f-open-link-between-point-and-eol
also outside of Org and because I want to have the possibility to use
"C-c C-o" to find out on which point not and on which point
org-open-at-point results in the error "No link found", for example to
learn more about Org syntax and how to better cooperate with it.
#+BEGIN_SRC emacs-lisp
(defun f-open-link-between-point-and-eol ()
"Move to and open first link between point and end of line.
As long as not yet at end of line and as long as
`org-open-at-point' and `browse-url-at-point' result in an error
advance point by one character. For Org and other major modes."
(interactive)
(let ((p (point)) opened)
(while (not (or (eolp)
(progn (ignore-errors
(cond
;; Org mode
((eq major-mode 'org-mode)
(org-open-at-point)
(setq opened 'org-open-at-point))
;; Maybe more major modes that have an
;; open function specific to their
;; syntax
))
(unless opened
(ignore-errors
(browse-url-at-point)
(setq opened 'browse-url-at-point)))
opened)))
(forward-char))
(if opened
(message "Link opened with %s" opened)
(goto-char p)
(user-error "No link between point and end of line"))))
#+END_SRC
Here f-open-link-between-point-and-eol is with "(org-open-at-point)"
but actually I'm using "(org-open-at-point 1)" instead.
Michael
next prev parent reply other threads:[~2014-03-03 5:54 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 12:11 link interfering with brackets when abbreviated Michael Brand
2014-02-26 15:10 ` Michael Brand
2014-02-26 15:25 ` Nicolas Goaziou
2014-02-26 15:44 ` Michael Brand
2014-02-26 15:54 ` Nicolas Goaziou
2014-02-26 16:22 ` Michael Brand
2014-02-26 16:41 ` Nicolas Goaziou
2014-02-26 17:03 ` Michael Brand
2014-02-26 17:20 ` Bastien
2014-02-26 19:02 ` Nicolas Goaziou
2014-02-26 22:54 ` Bastien
2014-02-27 10:28 ` Nicolas Goaziou
2014-02-27 11:04 ` Bastien
2014-02-27 20:01 ` Michael Brand
2014-02-27 22:08 ` Bastien
2014-02-27 23:43 ` Nicolas Goaziou
2014-03-01 18:44 ` Yasushi SHOJI
2014-03-01 20:20 ` Nicolas Goaziou
2014-03-01 20:54 ` Bastien
2014-03-01 20:57 ` Bastien
2014-03-01 21:35 ` Nicolas Goaziou
2014-03-01 21:50 ` Bastien
2014-03-01 22:14 ` Nicolas Goaziou
2014-03-02 13:35 ` Bastien
2014-03-03 14:12 ` Matt Lundin
2014-03-02 0:22 ` Yasushi SHOJI
2014-03-02 9:05 ` Nicolas Goaziou
2014-03-02 13:22 ` Bastien
2014-03-02 14:27 ` Nicolas Goaziou
2014-03-02 15:49 ` Bastien
2014-03-02 16:32 ` Thorsten Jolitz
2014-03-03 3:41 ` Josiah Schwab
2014-03-03 5:54 ` Michael Brand [this message]
2014-03-03 9:50 ` Context of interaction vs. literal syntactic interpretation (was: link interfering with brackets when abbreviated) Bastien
2014-03-03 16:09 ` Context of interaction vs. literal syntactic interpretation Matt Lundin
2014-03-03 18:00 ` Nick Dokos
2014-03-03 18:13 ` Jonathan Leech-Pepin
2014-03-14 13:46 ` Sebastien Vauban
2014-03-21 8:44 ` Bastien
2014-03-21 13:17 ` Nicolas Goaziou
2014-03-23 22:51 ` Bastien
2014-03-24 13:12 ` Nicolas Goaziou
2014-03-01 18:44 ` link interfering with brackets when abbreviated Yasushi SHOJI
2014-02-26 17:42 ` Bastien
2014-02-26 21:15 ` Nicolas Goaziou
2014-02-26 22:21 ` Bastien
-- strict thread matches above, loose matches on Subject: below --
2014-03-02 21:16 Gustav Wikström
2014-03-03 1:30 ` Ista Zahn
2014-03-03 19:33 ` Samuel Wales
2014-03-03 19:46 ` Samuel Wales
2014-03-03 22:18 ` Sebastien Vauban
2014-03-03 22:33 ` Samuel Wales
[not found] ` <CAJcAo8vh0F0tqgX4=gUhJoWFcAsTiwfyi7Fp=spQeoaBog1OMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-04 12:16 ` Sebastien Vauban
2014-03-04 20:06 ` Samuel Wales
2014-03-19 11:19 ` Bastien
2014-03-03 10:58 ` Christian Moe
2014-03-03 16:11 ` Sebastien Vauban
2014-03-03 23:16 ` Robert Horn
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALn3zogLPBQ4o6NmVf_Z5h3VOQAQvvFigJ8MZMGr-Z-yKWP9xA@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.