* Re: [bug] export corruption bug and 3 more bugs
@ 2011-05-25 16:58 Samuel Wales
2011-05-27 4:52 ` [bug, babel] " David Maus
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2011-05-25 16:58 UTC (permalink / raw)
To: mail; +Cc: emacs-orgmode
Minimal .emacs and test case for export corruption bug.
In the process, I found 2 Emacs 22 incompatibilities (fixed in the
minimal .emacs -- I had already fixed them) and 1 args out of range
error (not fixed -- can somebody find this bug?). There is no stack
trace.
The args out of range error occurs when you do c-c c-e A on the lowest
level headline.
The corruption bug occurs when you export the top level of the test case.
I wanted to post my blog today, but I don't know which org version to
roll back to to make sure it will work, and for health reasons can't
afford the typing for git bisect.
Thanks.
Samuel
===
* something
hi there
more
*** still more
more
more
***** org
try exporting the above for one bug and the below for the
other.
use c-c c-e A .
******* Confusion and conflation
#bug!
Some definitions using the same name /exclude/ people who
have serious disease. Can you predict the results?
******* test
===
;;;
;;;alpha-org-testcase.el
;;;
;;;minimal testcase for org
;;;
;;;how to use:
;;;
;;;1) put this file in your shell's current directory.
;;;2) put any testcase org files in your shell's current directory.
;;;3) comment out the set-frame-font line if you don't have that font.
;;;4) call like this.
;;;
;;; delorgsrc=your-org-src-dir emacs22 -Q -l alpha-org-testcase.el
;;;
(require 'cl)
;;my org files use these
(setq org-odd-levels-only t)
(setf org-export-initial-scope 'subtree)
;;fix abominations
(blink-cursor-mode 0)
(setf visible-bell 'top-bottom)
(defvar alpha-mac-font
"-apple-courier-medium-r-normal--24-240-72-72-m-240-iso10646-1")
;;;'(progn
;;; (progn
;;; (defconst alpha-mac-font-2
;;; "-apple-courier-medium-r-normal--*-*-*-*-*-240-*")
;;; (set-frame-font alpha-mac-font-2))
;;; )
(set-frame-font alpha-mac-font)
;;; (setq mac-pass-control-to-system nil)
;;; (setq mac-command-modifier 'hyper)
;;; (setq mac-option-modifier 'meta)
;;basics
(defun alpha-add-path (p) (setq load-path (cons p load-path)))
(alpha-add-path (concat (getenv "delorgsrc") "/lisp"))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(require 'org-install)
(setq org-agenda-files '("todo-new--a.org"))
;;;(defvar alpha-org-map (make-sparse-keymap "alpha org map"))
;;;(define-key global-map [f8] alpha-org-map)
(setq org-completion-use-ido t)
(setf org-outline-path-complete-in-steps nil)
;;fix compatibility bug in org [2011-05-25 Wed 08:59]
(when (= emacs-major-version 22)
(defun activate-mark ()
"Activate the mark."
(when (mark t)
(setq mark-active t)
(unless transient-mark-mode
(setq transient-mark-mode 'lambda))
(when (and select-active-regions
(display-selections-p))
(x-set-selection 'PRIMARY (current-buffer))))))
;;[2011-05-25 Wed 09:23] fix compatibility bug in Org.
;;this is redefinition. it is for 22 for export.
(defcustom select-active-regions nil
"If non-nil, an active region automatically becomes the window selection."
:type 'boolean
:group 'killing
:version "23.1")
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel] export corruption bug and 3 more bugs
2011-05-25 16:58 [bug] export corruption bug and 3 more bugs Samuel Wales
@ 2011-05-27 4:52 ` David Maus
2011-05-27 14:15 ` Samuel Wales
2011-06-02 18:19 ` Eric Schulte
0 siblings, 2 replies; 11+ messages in thread
From: David Maus @ 2011-05-27 4:52 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode, mail
[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]
At Wed, 25 May 2011 09:58:03 -0700,
Samuel Wales wrote:
>
> Minimal .emacs and test case for export corruption bug.
Okay, I can reproduce the args out of range with Emacs 22. Turns out
that `regexp-opt` behaves different when creating
`org-babel-result-regexp'.
(regexp-opt org-babel-data-names)
encloses the regexp for babel data names in a shy grouping construct
in Emacs 23
(regexp-opt org-babel-data-names) => "\\(?:DATA\\|RES\\(?:NAME\\|ULTS\\)\\|TBLNAME\\)"
While it does not in Emacs 22
(regexp-opt org-babel-data-names) => "DATA\\|RES\\(?:NAME\\|ULTS\\)\\|TBLNAME"
Thus the literal string "results" in the example file is matched by
Org Babel in `org-exp-res/src-name-cleanup'.
Looks like setting up `org-babel-result-regexp' should do a check for
the Emacs version and explictly add the shy grouping construct if
version < 23 -- I'm really not familar with all the Babel parts so Cc:
Erik Schulte who I assume knows Babel better than me.
I'll check the other (compatibilty) problems during the weekend.
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel] export corruption bug and 3 more bugs
2011-05-27 4:52 ` [bug, babel] " David Maus
@ 2011-05-27 14:15 ` Samuel Wales
2011-05-27 14:47 ` [bug, babel][OT] " Jambunathan K
2011-06-01 7:16 ` [bug, babel] " David Maus
2011-06-02 18:19 ` Eric Schulte
1 sibling, 2 replies; 11+ messages in thread
From: Samuel Wales @ 2011-05-27 14:15 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode, mail
Hi David,
Thank you. I am unable to debug this further so I appreciate it.
Is it necessary to construct this regexp for babel if babel is not used?
Were you able to reproduce the corruption bug? Did anybody else?
Emacs -Q, minimal test case.
(I'm trying to warn the world about one definitely-already-existing
global pandemic of an AIDS-like disease that nobody has heard of but
is 2x the size of AIDS in the USA -- and a possible global pandemic
10x the size of HIV -- but my normally-sublimely-excellent software is
dropping random lines. :/ Hmm, should I switch to talking about
Justin Bieber and use Microsoft Word instead? :) We could hand out
soma with Word and tell people it's just as good as Org. :))
Samuel
P.S. Please feel free to put the compatibility fixes into org-compat
or wherever.
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support the Whittemore-Peterson Institute (WPI)
===
I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MRV paper.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel][OT] export corruption bug and 3 more bugs
2011-05-27 14:15 ` Samuel Wales
@ 2011-05-27 14:47 ` Jambunathan K
2011-05-27 15:01 ` Samuel Wales
2011-06-01 7:16 ` [bug, babel] " David Maus
1 sibling, 1 reply; 11+ messages in thread
From: Jambunathan K @ 2011-05-27 14:47 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
> (I'm trying to warn the world about one definitely-already-existing
> global pandemic of an AIDS-like disease that nobody has heard of but
> is 2x the size of AIDS in the USA -- and a possible global pandemic
> 10x the size of HIV -- but my normally-sublimely-excellent software is
> dropping random lines. :/ Hmm, should I switch to talking about
> Justin Bieber and use Microsoft Word instead? :) We could hand out
> soma with Word and tell people it's just as good as Org. :))
That's LOTS of keystrokes.
Jambunathan K.
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel] export corruption bug and 3 more bugs
2011-05-27 14:15 ` Samuel Wales
2011-05-27 14:47 ` [bug, babel][OT] " Jambunathan K
@ 2011-06-01 7:16 ` David Maus
2011-06-02 6:12 ` Samuel Wales
1 sibling, 1 reply; 11+ messages in thread
From: David Maus @ 2011-06-01 7:16 UTC (permalink / raw)
To: Samuel Wales; +Cc: David Maus, emacs-orgmode, mail
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
At Fri, 27 May 2011 07:15:10 -0700,
Samuel Wales wrote:
>
> Hi David,
>
> Thank you. I am unable to debug this further so I appreciate it.
I've just pushed a fix for compatibility with Emacs22 and the
`activate-mark' function.
> Were you able to reproduce the corruption bug? Did anybody else?
> Emacs -Q, minimal test case.
I suppose I reproduced the corruption bugs: It's the Babel regexp
problem.
>
> Is it necessary to construct this regexp for babel if babel is not used?
>
Suppose so. A temporary work-around could be
(setq org-babel-data-names nil)
before you load Org. This will cause Babel to not create the offending
regexp.
HTH,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #2: Type: application/pgp-signature, Size: 230 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel] export corruption bug and 3 more bugs
2011-05-27 4:52 ` [bug, babel] " David Maus
2011-05-27 14:15 ` Samuel Wales
@ 2011-06-02 18:19 ` Eric Schulte
2011-06-02 20:37 ` Samuel Wales
1 sibling, 1 reply; 11+ messages in thread
From: Eric Schulte @ 2011-06-02 18:19 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode, mail
Hi David,
Sorry it took me a while to notice this thread -- incidentally after a
patch to this effect was shared by Lawrence Mitchell in a separate
thread. I've just applied Lawrence's patch, which should resolve this
issue as well.
Please let me know if the problem remains. Now that this thread is on
my radar I should be more attentive to it.
Thanks -- Eric
David Maus <dmaus@ictsoc.de> writes:
> At Wed, 25 May 2011 09:58:03 -0700,
> Samuel Wales wrote:
>>
>> Minimal .emacs and test case for export corruption bug.
>
> Okay, I can reproduce the args out of range with Emacs 22. Turns out
> that `regexp-opt` behaves different when creating
> `org-babel-result-regexp'.
>
> (regexp-opt org-babel-data-names)
>
> encloses the regexp for babel data names in a shy grouping construct
> in Emacs 23
>
> (regexp-opt org-babel-data-names) => "\\(?:DATA\\|RES\\(?:NAME\\|ULTS\\)\\|TBLNAME\\)"
>
> While it does not in Emacs 22
>
> (regexp-opt org-babel-data-names) => "DATA\\|RES\\(?:NAME\\|ULTS\\)\\|TBLNAME"
>
> Thus the literal string "results" in the example file is matched by
> Org Babel in `org-exp-res/src-name-cleanup'.
>
> Looks like setting up `org-babel-result-regexp' should do a check for
> the Emacs version and explictly add the shy grouping construct if
> version < 23 -- I'm really not familar with all the Babel parts so Cc:
> Erik Schulte who I assume knows Babel better than me.
>
> I'll check the other (compatibilty) problems during the weekend.
>
> Best,
> -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel] export corruption bug and 3 more bugs
2011-06-02 18:19 ` Eric Schulte
@ 2011-06-02 20:37 ` Samuel Wales
2011-06-02 21:00 ` Eric Schulte
0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2011-06-02 20:37 UTC (permalink / raw)
To: Eric Schulte; +Cc: David Maus, emacs-orgmode, mail
On 2011-06-02, Eric Schulte <schulte.eric@gmail.com> wrote:
> Please let me know if the problem remains. Now that this thread is on
> my radar I should be more attentive to it.
Thanks Eric, David. Test case and .emacs seem to work for it so far.
To anybody: I noticed that the region stays active after export. Is
this intentional?
Thanks.
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
I support the Whittemore-Peterson Institute (WPI)
===
Extreme bigotry against people with deadly serious diseases is still
extreme bigotry.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [bug, babel] export corruption bug and 3 more bugs
2011-06-02 20:37 ` Samuel Wales
@ 2011-06-02 21:00 ` Eric Schulte
0 siblings, 0 replies; 11+ messages in thread
From: Eric Schulte @ 2011-06-02 21:00 UTC (permalink / raw)
To: Samuel Wales; +Cc: David Maus, emacs-orgmode, mail
Samuel Wales <samologist@gmail.com> writes:
> On 2011-06-02, Eric Schulte <schulte.eric@gmail.com> wrote:
>> Please let me know if the problem remains. Now that this thread is
>> on
>> my radar I should be more attentive to it.
>
> Thanks Eric, David. Test case and .emacs seem to work for it so far.
>
Great, thanks for confirming.
>
> To anybody: I noticed that the region stays active after export. Is
> this intentional?
>
I have no idea, but it seems to me it is better to preserve the active
region than eliminate it.
Best -- Eric
>
> Thanks.
>
> Samuel
--
Eric Schulte
http://cs.unm.edu/~eschulte/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-06-02 21:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-25 16:58 [bug] export corruption bug and 3 more bugs Samuel Wales
2011-05-27 4:52 ` [bug, babel] " David Maus
2011-05-27 14:15 ` Samuel Wales
2011-05-27 14:47 ` [bug, babel][OT] " Jambunathan K
2011-05-27 15:01 ` Samuel Wales
2011-05-27 15:22 ` Jambunathan K
2011-06-01 7:16 ` [bug, babel] " David Maus
2011-06-02 6:12 ` Samuel Wales
2011-06-02 18:19 ` Eric Schulte
2011-06-02 20:37 ` Samuel Wales
2011-06-02 21:00 ` Eric Schulte
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).