emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien Guerry <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: [Accepted] [O, 1/2] org-lparse/org-odt: Add docstring. Silence byte-compiler
Date: Sun,  3 Jul 2011 12:36:04 +0200 (CEST)	[thread overview]
Message-ID: <20110703103604.148F866E9@myhost.localdomain> (raw)
In-Reply-To: 81vcvkoa7a.fsf@gmail.com

Patch 820 (http://patchwork.newartisans.com/patch/820/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C81vcvkoa7a.fsf%40gmail.com%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O,1/2] org-lparse/org-odt: Add docstring. Silence byte-compiler
> Date: Sat, 02 Jul 2011 22:37:29 -0000
> From: Jambunathan K <kjambunathan@gmail.com>
> X-Patchwork-Id: 820
> Message-Id: <81vcvkoa7a.fsf@gmail.com>
> To: emacs-orgmode@gnu.org
> Cc: 
> 
> I am attaching two org-odt patches for inclusion. Both are desirable and
> not mandatory.
> 
> ---
> 
> 
> >From 38d0dcbc921d69ba55c3a5bb3a219204800370c9 Mon Sep 17 00:00:00 2001
> From: Jambunathan K <kjambunathan@gmail.com>
> Date: Sat, 2 Jul 2011 16:51:38 +0530
> Subject: [PATCH 1/2] org-lparse/org-odt: Add docstring. Silence byte-compiler.
> 
> * contrib/lisp/org-odt.el (org-odt-unit-test):
> Removed. This doesn't belong to production code.
> 
> * contrib/lisp/org-lparse.el (org-lparse-and-open)
> (org-lparse-to-buffer, org-lparse-backend)
> (org-lparse-other-backend, org-lparse-body-only)
> (org-lparse-to-buffer): Update docstring.
> ---
>  contrib/lisp/org-lparse.el |   52 +++++++++++++++++++++++++++++++++----------
>  contrib/lisp/org-odt.el    |   11 ---------
>  2 files changed, 40 insertions(+), 23 deletions(-)
> 
> diff --git a/contrib/lisp/org-lparse.el b/contrib/lisp/org-lparse.el
> index cff8fd6..b37b683 100755
> --- a/contrib/lisp/org-lparse.el
> +++ b/contrib/lisp/org-lparse.el
> @@ -50,8 +50,6 @@
>  ;;; See README.org file that comes with this library for answers to
>  ;;; FAQs and more information on using this library.
>  
> -;;; Use M-x `org-odt-unit-test' for test driving the odt exporter
> -
>  ;;; Code:
>  
>  (require 'org-exp)
> @@ -59,10 +57,11 @@
>  
>  ;;;###autoload
>  (defun org-lparse-and-open (target-backend native-backend arg)
> -  "Export the outline as HTML and immediately open it with a browser.
> -If there is an active region, export only the region.
> -The prefix ARG specifies how many levels of the outline should become
> -headlines.  The default is 3.  Lower levels will become bulleted lists."
> +  "Export the outline to TARGET-BACKEND via NATIVE-BACKEND and open exported file.
> +If there is an active region, export only the region.  The prefix
> +ARG specifies how many levels of the outline should become
> +headlines.  The default is 3.  Lower levels will become bulleted
> +lists."
>    ;; (interactive "Mbackend: \nP")
>    (interactive
>     (let* ((input (if (featurep 'ido) 'ido-completing-read 'completing-read))
> @@ -102,8 +101,9 @@ emacs   --batch
>  
>  ;;;###autoload
>  (defun org-lparse-to-buffer (backend arg)
> -  "Call `org-lparse` with output to a temporary buffer.
> -No file is created.  The prefix ARG is passed through to `org-lparse'."
> +  "Call `org-lparse' with output to a temporary buffer.
> +No file is created.  The prefix ARG is passed through to
> +`org-lparse'."
>    (interactive "Mbackend: \nP")
>    (let ((tempbuf (format "*Org %s Export*" (upcase backend))))
>        (org-lparse backend backend arg nil nil tempbuf)
> @@ -508,9 +508,36 @@ then that converter is used.  Otherwise
>  (defvar org-lparse-toc)
>  (defvar org-lparse-entity-control-callbacks-alist)
>  (defvar org-lparse-entity-format-callbacks-alist)
> -(defvar org-lparse-backend)
> -(defvar org-lparse-body-only)
> -(defvar org-lparse-to-buffer)
> +(defvar org-lparse-backend nil
> +  "The native backend to which the document is currently exported.
> +This variable is let bound during `org-lparse'.  Valid values are
> +one of the symbols corresponding to `org-lparse-native-backends'.
> +
> +Compare this variable with `org-export-current-backend' which is
> +bound only during `org-export-preprocess-string' stage of the
> +export process.
> +
> +See also `org-lparse-other-backend'.")
> +
> +(defvar org-lparse-other-backend nil
> +  "The target backend to which the document is currently exported.
> +This variable is let bound during `org-lparse'.  This variable is
> +set to either `org-lparse-backend' or one of the symbols
> +corresponding to OTHER-BACKENDS specification of the
> +org-lparse-backend.
> +
> +For example, if a document is exported to \"odt\" then both
> +org-lparse-backend and org-lparse-other-backend are bound to
> +'odt.  On the other hand, if a document is exported to \"odt\"
> +and then converted to \"doc\" then org-lparse-backend is set to
> +'odt and org-lparse-other-backend is set to 'doc.")
> +
> +(defvar org-lparse-body-only nil
> +  "Bind this to BODY-ONLY arg of `org-lparse'.")
> +
> +(defvar org-lparse-to-buffer nil
> +  "Bind this to TO-BUFFER arg of `org-lparse'.")
> +
>  (defun org-do-lparse (arg &optional hidden ext-plist
>  			  to-buffer body-only pub-dir)
>    "Export the outline to various formats.
> @@ -1240,6 +1267,7 @@ But it has the disadvantage, that no cell- or row-spanning is allowed."
>      (org-lparse-do-format-table-table lines)
>      (buffer-substring-no-properties (point-min) (point-max))))
>  
> +(defvar table-source-languages)		; defined in table.el
>  (defun org-lparse-format-table-table-using-table-generate-source (backend
>  								 lines
>  								 &optional
> @@ -1948,7 +1976,7 @@ Replaces invalid characters with \"_\"."
>  
>  (defun org-lparse-format-section-number (&optional snumber level)
>    (and org-export-with-section-numbers
> -       (not body-only) snumber level
> +       (not org-lparse-body-only) snumber level
>         (org-lparse-format 'FONTIFY snumber (format "section-number-%d" level))))
>  
>  (defun org-lparse-warn (msg)
> diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
> index c0b6491..3d28c60 100644
> --- a/contrib/lisp/org-odt.el
> +++ b/contrib/lisp/org-odt.el
> @@ -27,8 +27,6 @@
>  ;;
>  ;;; Commentary:
>  
> -;;; Use M-x `org-odt-unit-test' to test drive the exporter
> -
>  ;;; Code:
>  (eval-when-compile (require 'cl))
>  (require 'org-lparse)
> @@ -1499,15 +1497,6 @@ To disable outline numbering pass a LEVEL of 0."
>  	  (replace-match replacement t nil))))
>      (save-buffer 0)))
>  
> -;;;###autoload
> -(defun org-odt-unit-test (&optional linger)
> -  "Automatically visit the Unit Test file and export it."
> -  (interactive "P")
> -  (with-current-buffer
> -      (find-file (expand-file-name "tests/test.org" org-odt-data-dir))
> -    (unless linger
> -      (call-interactively 'org-export-as-odt-and-open))))
> -
>  (provide 'org-odt)
>  
>  ;;; org-odt.el ends here
> -- 
> 1.7.2.3
> 
> 

  reply	other threads:[~2011-07-03 10:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02 14:05 Bugs and patches hunt before tomorrow Bastien
2011-07-02 14:45 ` David Maus
2011-07-03 11:05   ` Bastien
2011-07-02 14:49 ` David Maus
2011-07-03 11:07   ` Bastien
2011-07-02 17:37 ` [PATCH 1/2] org-lparse/org-odt: Add docstring. Silence byte-compiler Jambunathan K
2011-07-03 10:36   ` Bastien Guerry [this message]
2011-07-02 17:39 ` [PATCH 2/2] doc/org.texi: Add a new node for OpenDocumentText exporter Jambunathan K
2011-07-02 18:34   ` Jambunathan K
2011-07-03 11:27     ` Bastien
2011-07-03 10:36   ` [Accepted] [O, " Bastien Guerry

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=20110703103604.148F866E9@myhost.localdomain \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /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).