emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* marking out-links
@ 2008-07-05 11:00 Jose A. Ortega Ruiz
  2008-07-07 15:56 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Jose A. Ortega Ruiz @ 2008-07-05 11:00 UTC (permalink / raw)
  To: emacs-orgmode


Hi,

One featurette that i would find useful is the possibility of
distinguising link types visually: for instance, having the link text
overlay display an additional mark (say, a * or a fancy unicode arrow)
when it is an http[s] or ftp link (as opposed to a link to a local file,
email, etc.). If providing the basic functionality is not difficult, one
can think of additional customizability like associating different
markers to different protocols and so on.

On a related note, it would also be useful to have a mode or command to
see the URL of the current link echo-ed in the minibuffer. I currently
use a quick-and-dirty command for that (it also puts the link in the
kill ring for convenience):

(defun jao-org-copy-link-at-point ()
  (interactive)
  (if (thing-at-point-looking-at "\\[\\[\\([^]]+\\)\\]\\[[^]]+\\]\\]")
      (let ((link (substring-no-properties (match-string 1))))
        (kill-new link)
        (message "%s" link))
      (message "No link at point")))
(define-key org-mode-map "\C-cv" 'jao-org-copy-link-at-point)

but this doesn't work as an 'show link in the mini-buffer, in the sense
that i have to press C-cv to see the link.

What do you think?

Cheers,
jao
-- 
In this age, the mere example of nonconformity, the mere refusal to bend
the knee to custom, is itself a service.
 -John Stuart Mill, philosopher and economist (1806-1873)

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

* Re: marking out-links
  2008-07-05 11:00 marking out-links Jose A. Ortega Ruiz
@ 2008-07-07 15:56 ` Carsten Dominik
  2008-07-07 17:38   ` Jose A. Ortega Ruiz
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2008-07-07 15:56 UTC (permalink / raw)
  To: Jose A. Ortega Ruiz; +Cc: emacs-orgmode


On Jul 5, 2008, at 4:00 AM, Jose A. Ortega Ruiz wrote:

>
> Hi,
>
> One featurette that i would find useful is the possibility of
> distinguising link types visually: for instance, having the link text
> overlay display an additional mark (say, a * or a fancy unicode arrow)
> when it is an http[s] or ftp link (as opposed to a link to a local  
> file,
> email, etc.). If providing the basic functionality is not difficult,  
> one
> can think of additional customizability like associating different
> markers to different protocols and so on.
>
> On a related note, it would also be useful to have a mode or command  
> to
> see the URL of the current link echo-ed in the minibuffer. I currently
> use a quick-and-dirty command for that (it also puts the link in the
> kill ring for convenience):


I you rest the mouse over the link, a tooltip window will show the link.
Additional markers in the display text would require hacking the  
function
`org-activate-bracket-links', but I am not in favor of this proposal.
If you dont like using the mouse, one could use an idle timer to display
the link in the echo area when the cursor is on the link - I have done
something like this with RefTeX, on BibTeX references.

- Carsten

>
>
> (defun jao-org-copy-link-at-point ()
>  (interactive)
>  (if (thing-at-point-looking-at "\\[\\[\\([^]]+\\)\\]\\[[^]]+\\]\\]")
>      (let ((link (substring-no-properties (match-string 1))))
>        (kill-new link)
>        (message "%s" link))
>      (message "No link at point")))
> (define-key org-mode-map "\C-cv" 'jao-org-copy-link-at-point)
>
> but this doesn't work as an 'show link in the mini-buffer, in the  
> sense
> that i have to press C-cv to see the link.
>
> What do you think?
>
> Cheers,
> jao
> -- 
> In this age, the mere example of nonconformity, the mere refusal to  
> bend
> the knee to custom, is itself a service.
> -John Stuart Mill, philosopher and economist (1806-1873)
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: marking out-links
  2008-07-07 15:56 ` Carsten Dominik
@ 2008-07-07 17:38   ` Jose A. Ortega Ruiz
  0 siblings, 0 replies; 3+ messages in thread
From: Jose A. Ortega Ruiz @ 2008-07-07 17:38 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <dominik@uva.nl> writes:


[...]

>
> I you rest the mouse over the link, a tooltip window will show the link.
> Additional markers in the display text would require hacking the
> function
> `org-activate-bracket-links', but I am not in favor of this proposal.
> If you dont like using the mouse, one could use an idle timer to display
> the link in the echo area when the cursor is on the link - I have done
> something like this with RefTeX, on BibTeX references.
>

Well, i run emacs on a terminal most of the time, so tooltips don't work
for me. As for echoing, yes, that'd work, but it's somewhat orthogonal
to the marking feature, the point of the latter being knowing the kind
of one or more links before going there. But it seems i'm the only one
finding that useful :), so i guess i'll hack something around
org-activate-bracket-links. Thanks for the tip!

Cheers,
jao
-- 
Sometimes I think we're alone in the universe, and sometimes I think we're
not. In either case, the idea is quite staggering.
 -Arthur C Clarke, writer (1917- )

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

end of thread, other threads:[~2008-07-07 18:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-05 11:00 marking out-links Jose A. Ortega Ruiz
2008-07-07 15:56 ` Carsten Dominik
2008-07-07 17:38   ` Jose A. Ortega Ruiz

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