Loading ...
Sorry, an error occurred while loading the content.

RE: [emacs-nxml-mode] Clickable links in a xhtml document

Expand Messages
  • DuCharme, Bob (LNG-CHO)
    ... As the old saying goes, be careful of what you ask for, you just might get it. When I click on link anchor text in emacs, I want the point to appear there
    Message 1 of 7 , Mar 14, 2005
    • 0 Attachment
      >I would like to have clickable links (a-tags) in an xhtml document editied
      >with nxml-mode in Emacs. I would like this links
      to take me to the link
      >address in the document (or in another document) -
      still in nxml-mode.
      As the old saying goes, be careful of what you ask for, you just might get it. When I click on link anchor text in emacs, I want the point to appear there so I can edit the text. Otherwise, I'm not sure how I'd edit that text.
       
      In any emacs mode that I know of, C-b invokes browse-url, which send the default web browser to the URL named at the cursor's position. That's not quite what you were looking for, but I find it handy.
       
      Bob
       
    • DuCharme, Bob (LNG-CHO)
      Oops - I guess that s not a default binding. I just found this line in my .emacs file: (global-set-key ^B browse-url) (but with an actual ctrl-B character
      Message 2 of 7 , Mar 14, 2005
      • 0 Attachment
        Oops - I guess that's not a default binding. I just found this line in my .emacs file:
         
            (global-set-key "^B" 'browse-url)
         
        (but with an actual ctrl-B character and not ^ and B). Like I said, it's handy.
         
        Bob



        From: DuCharme, Bob (LNG-CHO) [mailto:bob.ducharme@...]
        Sent: Monday, March 14, 2005 1:54 PM
        To: 'emacs-nxml-mode@yahoogroups.com'
        Subject: RE: [emacs-nxml-mode] Clickable links in a xhtml document

        >I would like to have clickable links (a-tags) in an xhtml document editied
        >with nxml-mode in Emacs. I would like this links
        to take me to the link
        >address in the document (or in another document) -
        still in nxml-mode.
        As the old saying goes, be careful of what you ask for, you just might get it. When I click on link anchor text in emacs, I want the point to appear there so I can edit the text. Otherwise, I'm not sure how I'd edit that text.
         
        In any emacs mode that I know of, C-b invokes browse-url, which send the default web browser to the URL named at the cursor's position. That's not quite what you were looking for, but I find it handy.
         
        Bob
         
      • Lennart Borgman
        ... From: DuCharme, Bob (LNG-CHO) ... editied ... Oh, yes, sorry, your are right. I did meant clickable in a more general
        Message 3 of 7 , Mar 14, 2005
        • 0 Attachment
          ----- Original Message -----
          From: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@...>

          > >I would like to have clickable links (a-tags) in an xhtml document
          editied
          > >with nxml-mode in Emacs. I would like this links to take me to the link
          > >address in the document (or in another document) - still in nxml-mode.
          >
          > As the old saying goes, be careful of what you ask for, you just might get
          > it. When I click on link anchor text in emacs, I want the point to appear
          > there so I can edit the text. Otherwise, I'm not sure how I'd edit that
          > text.

          Oh, yes, sorry, your are right. I did meant "clickable" in a more general
          sense. Maybe I should have written:

          "If the point is over the href attribute in an a-tag I would like to have a
          command that could take me to the link address in the document (or in
          another document) - still in nxml-mode. Maybe I even want this command to
          work if the point is anywhere inside that a-tag."
        • drkm
          ... Off course. C-b is initialy bound to backward-char. ... Using control characters in ELisp code sounds like ugly to me. I prefer to use kbd, like this:
          Message 4 of 7 , Mar 15, 2005
          • 0 Attachment
            "DuCharme, Bob (LNG-CHO)" <bob.ducharme@...> writes:

            > Oops - I guess that's not a default binding. I just found this line in my
            > .emacs file:

            > (global-set-key "^B" 'browse-url)

            Off course. C-b is initialy bound to backward-char.

            > (but with an actual ctrl-B character and not ^ and B). Like I said, it's
            > handy.

            Using control characters in ELisp code sounds like ugly to me. I
            prefer to use kbd, like this:

            (global-set-key (kbd "C-b") 'browse-url)

            --drkm
          • Vidar Gundersen
            ... i don t like redefining standard emacs key bindings, what is used for browse-url in other emacs-modes? what about using C-M-return ? will this interfere
            Message 5 of 7 , Mar 15, 2005
            • 0 Attachment
              ===== Original message from drkm | Tue, 15 Mar 2005:
              > Off course. C-b is initialy bound to backward-char.

              i don't like redefining standard emacs key bindings,
              what is used for browse-url in other emacs-modes?

              what about using C-M-return ?
              will this interfere with any emacs functionality?


              --
              Vidar Bronken undersen
            • drkm
              ... Off course. ... I don t know. I think there is no standard binding. ... I think it will not. Personally, I think the function keys are /de facto/ keys
              Message 6 of 7 , Mar 16, 2005
              • 0 Attachment
                Vidar Gundersen <vbg-list@...> writes:

                > ===== Original message from drkm | Tue, 15 Mar 2005:

                >> Off course. C-b is initialy bound to backward-char.

                > i don't like redefining standard emacs key bindings,

                Off course.

                > what is used for browse-url in other emacs-modes?

                I don't know. I think there is no standard binding.

                > what about using C-M-return ?
                > will this interfere with any emacs functionality?

                I think it will not. Personally, I think the function keys are /de
                facto/ keys reserved to the user, aren't they?

                --drkm
              Your message has been successfully submitted and would be delivered to recipients shortly.