Explorar el Código

Move org-eww to core

* lisp/org-eww.el: Move file from contrib/lisp/ to lisp/.
* lisp/org.el (org-modules): Apply change.
* lisp/org-capture.el (org-capture-templates):
* doc/org.texi: Document changes.
Nicolas Goaziou hace 8 años
padre
commit
71a3331aaf
Se han modificado 5 ficheros con 19 adiciones y 7 borrados
  1. 4 2
      doc/org.texi
  2. 1 0
      etc/ORG-NEWS
  3. 1 1
      lisp/org-capture.el
  4. 12 3
      lisp/org-eww.el
  5. 1 1
      lisp/org.el

+ 4 - 2
doc/org.texi

@@ -3667,7 +3667,7 @@ Pretty much all Emacs mail clients are supported.  The link will point to the
 current article, or, in some GNUS buffers, to the group.  The description is
 constructed from the author and the subject.
 
-@b{Web browsers: W3 and W3M}@*
+@b{Web browsers: Eww, W3 and W3M}@*
 Here the link will be the current URL, with the page title as description.
 
 @b{Contacts: BBDB}@*
@@ -7341,7 +7341,7 @@ gnus, notmuch                    |  %:from %:fromname %:fromaddress
                                  |  %:date-timestamp-inactive @r{(date as inactive timestamp)}
                                  |  %:fromto @r{(either "to NAME" or "from NAME")@footnote{This will always be the other, not the user.  See the variable @code{org-from-is-user-regexp}.}}
 gnus                             |  %:group, @r{for messages also all email fields}
-w3, w3m                          |  %:url
+eww, w3, w3m                     |  %:url
 info                             |  %:file %:node
 calendar                         |  %:date
 @end smallexample
@@ -19350,6 +19350,8 @@ work on a tty.
 @item
 @i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks
 and contributed various ideas and code snippets.
+@item
+@i{Marco Wahl} wrote @file{org-eww.el}.
 @end itemize
 
 

+ 1 - 0
etc/ORG-NEWS

@@ -138,6 +138,7 @@ should be written instead
 Please note that, however, old properties were defined at the source
 block definition.  Current ones are defined where the block is called.
 ** New features
+*** ~org-eww~ is moved into core
 *** New org-protocol key=value syntax
 
 Org-protocol can now handle query-style parameters such as:

+ 1 - 1
lisp/org-capture.el

@@ -288,7 +288,7 @@ gnus                    |  %:from %:fromname %:fromaddress
                         |  %:date %:date-timestamp (as active timestamp)
                         |  %:date-timestamp-inactive (as inactive timestamp)
 gnus                    |  %:group, for messages also all email fields
-w3, w3m                 |  %:type %:url
+eww, w3, w3m            |  %:type %:url
 info                    |  %:type %:file %:node
 calendar                |  %:type %:date
 

+ 12 - 3
contrib/lisp/org-eww.el → lisp/org-eww.el

@@ -6,7 +6,7 @@
 ;; Keywords: link, eww
 ;; Homepage: http://orgmode.org
 ;;
-;; This file is not part of GNU Emacs.
+;; This file is part of GNU Emacs.
 ;;
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -45,6 +45,14 @@
 
 ;;; Code:
 (require 'org)
+(require 'cl-lib)
+
+(defvar eww-current-title)
+(defvar eww-current-url)
+(defvar eww-data)
+(defvar eww-mode-map)
+
+(declare-function eww-current-url "eww")
 
 
 ;; Store Org-link in eww-mode buffer
@@ -112,8 +120,9 @@ the structure of the Org file."
         ;; Move to next anchor when current point is not at anchor.
         (or (org-eww-url-below-point)
 	    (org-eww-goto-next-url-property-change))
-	(assert (org-eww-url-below-point) t
-                "program logic error: point must have an url below but it hasn't")
+	(cl-assert
+	 (org-eww-url-below-point) t
+	 "program logic error: point must have an url below but it hasn't")
 	(if (<= (point) transform-end) ; if point is inside transform bound
 	    (progn
 	      ;; Get content between two links.

+ 1 - 1
lisp/org.el

@@ -687,6 +687,7 @@ For export specific modules, see also `org-export-backends'."
 	(const :tag "   crypt:             Encryption of subtrees" org-crypt)
 	(const :tag "   ctags:             Access to Emacs tags with links" org-ctags)
 	(const :tag "   docview:           Links to doc-view buffers" org-docview)
+	(const :tag "   eww:               Store link to url of eww" org-eww)
 	(const :tag "   gnus:              Links to GNUS folders/messages" org-gnus)
 	(const :tag "   habit:             Track your consistency with habits" org-habit)
 	(const :tag "   id:                Global IDs for identifying entries" org-id)
@@ -711,7 +712,6 @@ For export specific modules, see also `org-export-backends'."
 	(const :tag "C  eshell             Support for links to working directories in eshell" org-eshell)
 	(const :tag "C  eval-light:        Evaluate inbuffer-code on demand" org-eval-light)
 	(const :tag "C  eval:              Include command output as text" org-eval)
-	(const :tag "C  eww:               Store link to url of eww" org-eww)
 	(const :tag "C  expiry:            Expiry mechanism for Org-mode entries" org-expiry)
 	(const :tag "C  favtable:          Lookup table of favorite references and links" org-favtable)
 	(const :tag "C  git-link:          Provide org links to specific file version" org-git-link)