From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Subject: Export issue of URL when the text begins with a date Date: Wed, 05 Jan 2011 14:27:00 +0100 Message-ID: <80oc7veb17.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=41032 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaTOR-0004W0-FE for emacs-orgmode@gnu.org; Wed, 05 Jan 2011 08:27:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaTOQ-00075W-9k for emacs-orgmode@gnu.org; Wed, 05 Jan 2011 08:27:11 -0500 Received: from smtp07.smtpout.orange.fr ([80.12.242.129]:58825 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaTOQ-00075C-5J for emacs-orgmode@gnu.org; Wed, 05 Jan 2011 08:27:10 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org mode Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= Hello, Here is an example org file: ----------------------------------------------------------------------- * some example [[file://localhost/c%3A/msys/1.0/temp/example.html][2011-01-01 example]] ----------------------------------------------------------------------- When I export this with `C-c C-e h' I get the following in place of the URL: -----------------------------------------------------------------------

[[file://localhost/c%3A/msys/1.0/temp/example.html] 2011-01-01 example]

----------------------------------------------------------------------- I would have rather expected something like ----------------------------------------------------------------------- 2011-01-01 example ----------------------------------------------------------------------- BTW: happy new year 2011 to all ! Vincent. From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Subject: Export issue of URL when the text begins with a date Date: Wed, 12 Jan 2011 14:34:17 +0100 Message-ID: <80y66qb606.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=51395 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd0qa-0004tz-RA for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 08:34:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd0qV-0002jf-DW for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 08:34:44 -0500 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:31406 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd0qV-0002ir-95 for emacs-orgmode@gnu.org; Wed, 12 Jan 2011 08:34:39 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org mode Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= >Hello, > >Here is an example org file: > >----------------------------------------------------------------------- >* some example > >[[file://localhost/c%3A/msys/1.0/temp/example.html][2011-01-01 example]] >----------------------------------------------------------------------- > >When I export this with `C-c C-e h' I get the following in place of the >URL: > >----------------------------------------------------------------------- >

>[[file://localhost/c%3A/msys/1.0/temp/example.html] class="timestamp-wrapper"> 2011-01-01 >example] >

>----------------------------------------------------------------------- > >I would have rather expected something like > >----------------------------------------------------------------------- >2011-01-01 >example >----------------------------------------------------------------------- > >BTW: happy new year 2011 to all ! > > Vincent. > > Hello, I could not see any feedback. Am I the only one with this issue. Shall I fill in a bug report ? Vincent. PS: I have tried again with the laster on the Git repo, and the problem is still there. From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Subject: RE: Export issue of URL when the text begins with a date Date: Sun, 16 Jan 2011 22:02:20 +0100 Message-ID: <80oc7gbm03.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=56204 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PeZk0-0000F8-Py for emacs-orgmode@gnu.org; Sun, 16 Jan 2011 16:02:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PeZjz-000685-Dz for emacs-orgmode@gnu.org; Sun, 16 Jan 2011 16:02:24 -0500 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:34788 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PeZjy-00067H-UT for emacs-orgmode@gnu.org; Sun, 16 Jan 2011 16:02:23 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org mode , David Maus Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > >Date: Sat, 15 Jan 2011 07:40:35 +0100 >From: dmaus@ictsoc.de >To: vincent.b.1@hotmail.fr >Subject: Re: [Orgmode] Export issue of URL when the text begins with a dat= e=E2=80=8F >CC: dmaus@ictsoc.de; emacs-orgmode@gnu.org > >At Fri, 14 Jan 2011 22:12:07 +0100, >Vincent Bela=C3=AFche wrote: >> Thank-you David again for carrying out this correction. By the way, I >> noticed in the source tree that has a test base, that there is some >> testing sub-directory. I was expecting that there would be a list of >>=20 >> testNN.org >> testNN.tex=20 >> testNN.html >>=20 >> etc... >>=20 >> so that to check that to carry out non regression tests from testNN.org >> exported to reference testNN.tex and testNN.html. >>=20 >> It seems that such a non-regression test base and script do not >> exist. However that would be good to have in order to check that any >> correction does not break anything.=20 >=20 >That's exactly what the testing framework[1] could and should do. >I've just not figured out how to best write tests for entire export >operations. Thinking of it: We could create an input file dedicated >to test link exporting, put in different kinds of links, export and >then use regexps to check if the links have been exported fine. >=20 >Best, > -- David >=20 [...] Hello David and al., I sketched some test script, herein attached. It allows to make a few export tests. I hope that this is what you had in view... Vincent. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=test-export.el Content-Transfer-Encoding: quoted-printable (require 'org)=0D (defvar test-ext-plist nil)=0D (defvar test-export-arg 0)=0D (defvar test-start-regexp-ocurrence 1)=0D (defvar test-log-buffer nil)=0D (defvar test-temp-buff-1 nil)=0D (defvar test-temp-buff-2 nil)=0D (defvar test-number 0)=0D (defvar test-debug nil=0D "Set to non `nil' in order to debug on first error met")=0D (defvar test-ignore-space t=0D "\=0D * `nil' to keep output as it is =0D =0D * `:par' when all white space must bit ignored in output, but a=0D skipped lined in remained=0D =0D * `t' when all white space must be ignored in output")=0D =0D (defvar test-exporter (symbol-function 'org-export-as-html)=0D "Exporter under test")=0D =0D (defvar test-exporter 'org-export-as-html=0D "Exporter under test")=0D =0D (defvar test-from-start-re "")=0D (defvar test-upto-end-re "")=0D (defvar test-delimiter-detecter nil)=0D =0D (defun test-export (org-code export-code)=0D "\=0D Return nil in case of export OK, error code in case or error.=0D =0D ORG-CODE is some string, EXPORT-CODE is the expected export=0D string, `test-exporter' is exported, `test-from-start-re' and=0D `test-up-to-end-re' are regexp to extract export-code from the=0D exported code."=0D =0D (setq test-number (1+ test-number))=0D (let (p1 p2 exported-string)=0D (with-current-buffer test-temp-buff-2 (erase-buffer))=0D (with-current-buffer test-temp-buff-1=0D (erase-buffer)=0D (insert org-code)=0D (funcall test-exporter=0D test-export-arg nil test-ext-plist test-temp-buff-2=0D (plist-get test-ext-plist :body-only))=0D (when (functionp test-delimiter-detecter)=0D (funcall test-delimiter-detecter export-code))=0D (with-current-buffer test-temp-buff-2=0D (goto-char (point-min))=0D (let ((found test-start-regexp-ocurrence))=0D (while (and (re-search-forward test-from-start-re nil t) =0D (> (setq found (1- found)) 0)))=0D (if (=3D 0 found)=0D (progn=0D (setq p1 (match-beginning 0))=0D (if (re-search-forward test-upto-end-re nil t)=0D (progn=0D (setq p2 (match-end 0)=0D exported-string (buffer-substring-no-properties p1 p2))=0D (cond=0D ((null test-ignore-space) )=0D ((eq t test-ignore-space) =0D (setq exported-string =0D (mapconcat 'identity=0D (split-string exported-string "\s-+\\(\ns-*\\)*")=0D " ")))=0D ((eq :par test-ignore-space)=0D (setq exported-string (split-string exported-string "\\s-\n\\s-*"))=0D (let (prev-lines prev-prev-lines (lines exported-string) line)=0D (while lines=0D (setq line lines=0D lines (cdr lines))=0D (when (string-match "\\`\\s-*\\'" (car line))=0D (setcar line ""))=0D (if (and prev-prev-line=0D (string=3D (car prev-prev-line) "")=0D (string=3D (car prev-line) "")=0D (string=3D (car line) ""))=0D (setcdr prev-line lines)=0D (setq prev-prev-line prev-line=0D prev-line line))))=0D (setq exported-string (mapconcat 'identity exported-string "\n")=0D exported-string (split-string exported-string "\\s-\\{2,\\}")=0D exported-string (mapconcat 'identity exported-string " ")))=0D (t (error "Unexpected `test-ignore-space' =3D %S" test-ignore-spac= e)))=0D =0D (if (string=3D exported-string export-code)=0D nil ; test is OK=0D (when test-debug (debug))=0D (list=0D "Error unexpected gotten thing"=0D org-code export-code exported-string )))=0D (when test-debug (debug))=0D (list =0D "Can't find upto-end-re" =0D org-code export-code ""=0D )))=0D (when test-debug (debug))=0D (list "Can't find from-start-re"=0D org-code export-code "")))))))=0D =0D (defun test-html-delimeter-detecter (export-code)=0D (string-match "\\`<\\([a-z]+\\)" export-code)=0D (setq test-from-start-re (concat (regexp-quote (match-string 0 export-cod= e))=0D "\\_>")=0D test-upto-end-re (regexp-quote (concat ""))))=0D =0D =0D (defun test-log (x)=0D (with-current-buffer test-log-buffer=0D (when x=0D (insert "\n=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= \n" (car x)=0D ".\nTest number: " (number-to-string test-number)=0D ".\nOrg code:\n =3D>" (cadr x)=0D ".\nExpected code:\n =3D>" (caddr x)=0D ".\nGotten code:\n =3D>" (cadddr x) "." ))))=0D =0D =0D (defun test-start ()=0D (setq test-number 0)=0D (with-current-buffer (setq=0D test-temp-buff-2 (get-buffer-create " org-tmp2 ")=0D test-temp-buff-1 (get-buffer-create " org-tmp1 "))=0D (org-mode)=0D (erase-buffer))=0D (with-current-buffer (setq test-log-buffer (get-buffer-create "*Org Test*= "))=0D (erase-buffer)) )=0D =0D (defun test-end ()=0D (switch-to-buffer test-log-buffer)=0D ;; output content of current buffer for batch mode testing=0D (when noninteractive=0D (message "%s" (buffer-substring-no-properties (point-min) (point-max)))= ))=0D =0D =0D =0D ;;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =0D ;;; Starting the export tests=0D ;;;=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =0D (test-start)=0D =0D (plist-put test-ext-plist :body-only t)=0D (setq test-start-regexp-ocurrence 1=0D test-delimiter-detecter (symbol-function 'test-html-delimeter-detecte= r))=0D =0D (test-log (test-export "* some test\n[[http:/some/link][xxx]]" =0D "xxx" ))=0D (test-log (test-export "* some test\n[[http:/some/link][2010-11-01 xxx]]" = =0D "2010-11-01 xxx" ))=0D (test-log (test-export "* some test\n*Bold thing*" =0D "Bold thing" ))=0D (test-log (test-export "* some test\nSome^{superscript thing}" =0D "superscript thing" ))=0D =0D =0D (test-end) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Export issue of URL when the text begins with a date Date: Fri, 11 Feb 2011 11:01:13 +0100 Message-ID: <871v3ezy8m.fsf@gnu.org> References: <80oc7veb17.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from [140.186.70.92] (port=53777 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnpoN-0006VY-KY for emacs-orgmode@gnu.org; Fri, 11 Feb 2011 05:01:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnpoM-0000ea-47 for emacs-orgmode@gnu.org; Fri, 11 Feb 2011 05:01:11 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:61608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnpoL-0000eB-8Q for emacs-orgmode@gnu.org; Fri, 11 Feb 2011 05:01:10 -0500 Received: by bwz16 with SMTP id 16so3010875bwz.0 for ; Fri, 11 Feb 2011 02:01:08 -0800 (PST) In-Reply-To: <80oc7veb17.fsf@gmail.com> ("Vincent =?iso-8859-1?Q?Bela=EFch?= =?iso-8859-1?Q?e=22's?= message of "Wed, 05 Jan 2011 14:27:00 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vincent =?iso-8859-1?Q?Bela=EFche?= Cc: Org mode Hi Vincent, Vincent Belaïche writes: > Here is an example org file: > > ----------------------------------------------------------------------- > * some example > > [[file://localhost/c%3A/msys/1.0/temp/example.html][2011-01-01 example]] > ----------------------------------------------------------------------- > > When I export this with `C-c C-e h' I get the following in place of the > URL: > > ----------------------------------------------------------------------- >

> [[file://localhost/c%3A/msys/1.0/temp/example.html] class="timestamp-wrapper"> 2011-01-01 > example] >

> ----------------------------------------------------------------------- I cannot reproduce this problem with latest Org. Can you confirm it's gone? Thanks, -- Bastien