From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: link interfering with brackets when abbreviated Date: Mon, 3 Mar 2014 06:54:29 +0100 Message-ID: References: <87ppm9sxoh.fsf@gmail.com> <87lhwxswby.fsf@gmail.com> <87ha7lsu5o.fsf@gmail.com> <8761o1n63t.fsf@bzg.ath.cx> <8738j5snms.fsf@gmail.com> <87vbw11o3q.fsf@bzg.ath.cx> <87ppm8rgrf.fsf@gmail.com> <87lhwwgqe4.fsf@bzg.ath.cx> <878uswqfzc.fsf@gmail.com> <87zjl9vjw4.wl@dns1.atmark-techno.com> <87ha7hpt6l.fsf@gmail.com> <87wqgdv48n.wl@dns1.atmark-techno.com> <87mwh9nf6h.fsf@gmail.com> <87wqgcka56.fsf@bzg.ath.cx> <87y50sn09o.fsf@gmail.com> <878ussk3c7.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKLph-0004ah-0h for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 00:54:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKLpf-00077T-Oa for emacs-orgmode@gnu.org; Mon, 03 Mar 2014 00:54:32 -0500 In-Reply-To: <878ussk3c7.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou , Bastien Cc: Org Mode Hi all On Sun, Mar 2, 2014 at 4:49 PM, Bastien 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