emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Paul Sexton <psexton@xnet.co.nz>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Integrating ctags & org mode (patch)
Date: Fri, 18 Dec 2009 17:00:30 +0100	[thread overview]
Message-ID: <8716B67D-2747-410C-AFB4-D158D107864E@gmail.com> (raw)
In-Reply-To: <loom.20091215T220432-769@post.gmane.org>

Hi Paul,

I have now made a new hook `org-open-link-functions'.
Each function in this hook will be called with the link text as the  
single
argument.  If the function feels responsible for this link, it should
follow the link and return a non-nil value.  If it does not feel
responsible for the link, it should return nil.

Can I persuade you to change your implementation to use this hook
instead of a patch modifying org.el?  The we could wrap this
functionality into org-etags.el and include it with Emacs.

Could you please at the same time start the paperwork with Emacs?
To see how, follow the link near the end of http://orgmode.org

Thanks

- Carsten

P.S.  Actually, before getting to work on this, maybe you should wait
for the discussion just started in another thread.


On Dec 15, 2009, at 10:08 PM, Paul Sexton wrote:

> Sorry guys, I seem to be spamming this topic, but I just fixed  
> another problem
> -- properties on the link string were causing problems with find- 
> tag, which
> expected a propertyless string.
>
> Fixed patch follows.
>
> ----BEGIN PATCH for org.el (delete this line)----
> 8349,8369c8349,8350
> {             (condition-case nil (eval cmd)
> {               ;; ORG-TAGS
> {               (error
> {                (progn
> {                  (widen)
> {                  (condition-case nil (eval cmd)
> {                    (error
> {                     ;; No matching link found anywhere in this file
> {                     ;; See if we can find a tag
> {                    ;; If so, jump to it
> {                    (let ((linktext path))
> {                      (set-text-properties 0 (length linktext)
> {                                           nil linktext)
> {                      (condition-case nil (find-tag linktext)
> {                        (error
> {                         (cond
> {                          (org-make-new-topics-for-missing-links-p
> {                           (if (y-or-n-p
> {                                (format "Topic `%S' not found;  
> append to
> current buffer?"
> {                                        linktext))
> {                               (org-append-new-topic linktext nil)))
> {                          (t
> {                           (error "No match found")))))))))))))
> {
> {
> ---
> } 	    (condition-case nil (eval cmd)
> } 	      (error (progn (widen) (eval cmd))))))
> 8592,8595d8572
> {      ;; ORG-TAGS
> {      ((not org-open-link-defaults-to-normal-string-search-p)
> {       ;; We don't want to search for a plain text match.
> {       (error "No match."))
> 8651,8682d8627
> {
> {
> { ;; ORG-TAGS
> {
> { (defvar org-open-link-defaults-to-normal-string-search-p nil
> {   "Behaviour when attempting to open a 'thisfile' hyperlink for  
> which no
> { EXACT match can be found (i.e. no match in angled brackets, etc).
> { If true (default), exhibit normal org behaviour of doing a search  
> for a string
> { matching the link name.
> { If nil, abort the attempt to open the link.")
> {
> {
> { (defvar org-make-new-topics-for-missing-links-p nil
> {   "If true, when attempting to follow a 'plain' hyperlink for  
> which no precise
> { match is found, offer to append a top-level heading with the same  
> name as the
> { hyperlink, to the end of the buffer.")
> {
> {
> { (defun org-append-new-topic (word)
> {   (interactive "s")
> {   (widen)
> {   (end-of-buffer)
> {   (newline 2)
> {   (insert (format "* <<%s>>" word))  ; <<<>>> to make radio word
> {   (backward-char 4)
> {   ;;(org-update-radio-target-regexp)
> {   (end-of-line)
> {   (newline 2)
> {   (next-line 2))
> {
> {
> {
> ----END PATCH (delete this line)----
>
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

  parent reply	other threads:[~2009-12-18 17:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15  3:02 Integrating ctags & org mode (patch) Paul Sexton
2009-12-15  3:41 ` Bill Powell
2009-12-15  7:20 ` Carsten Dominik
2009-12-15 14:29   ` Carsten Dominik
2009-12-15 19:58   ` Paul Sexton
2009-12-15 20:36     ` Paul Sexton
2009-12-15 21:08       ` Paul Sexton
2009-12-15 21:33         ` Nick Dokos
2009-12-15 22:06           ` Óscar Fuentes
2009-12-18 16:00         ` Carsten Dominik [this message]
2010-02-06  0:10           ` Samuel Wales

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=8716B67D-2747-410C-AFB4-D158D107864E@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=psexton@xnet.co.nz \
    /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).