emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-info-js folding is broken in 8.3 releases
@ 2015-09-05 23:20 Piyush Srivastava
  2015-09-06  0:20 ` Piyush Srivastava
  0 siblings, 1 reply; 4+ messages in thread
From: Piyush Srivastava @ 2015-09-05 23:20 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 767 bytes --]

Hi,


In the current 8.3.1 release of org-mode the f/F keybinding that
org-info-js provides for folding headings in plain mode (of exported html
files) fails to work.  Further, the 's' and 'o' keys for search and occur
respectively also fail to work.  Both of these work with the 8.2.10 release.

I have attached a minimal org-mode file with which I can reproduce this
error.  By bisecting the commit history, I find that the breaking change is
introduced by commit 4ee8f4 which has the following commit message:

Author: Rasmus <rasmus@gmx.us>
Date:   Sun Apr 19 16:00:06 2015 +0200

    Revert "ox: Change label naming scheme"

    This reverts commit cf7d64f1e456cad281674fc81a8074f969b7911c.

The log produced by git bisect is also attached.


Thanks,
-- Piyush.

[-- Attachment #1.2: Type: text/html, Size: 1014 bytes --]

[-- Attachment #2: bug.txt --]
[-- Type: text/plain, Size: 2196 bytes --]

git bisect start
# bad: [a395da96f74b1d4a12ec25cb337c41f3c4c84f40] ORG-NEWS: Signal new Stan language support
git bisect bad a395da96f74b1d4a12ec25cb337c41f3c4c84f40
# good: [fdd9b18598239dd0e8b18383ac930110d51ed22e] Fix: Emacs 25 fancy diary inclusion in agenda
git bisect good fdd9b18598239dd0e8b18383ac930110d51ed22e
# good: [d2c0bbcf52dee58a6f71690983395f891ba7869d] Merge branch 'maint'
git bisect good d2c0bbcf52dee58a6f71690983395f891ba7869d
# good: [7b450bc7bbd24e79d2aca74210e1b580dc944284] Fix `org-delete-property-globally'
git bisect good 7b450bc7bbd24e79d2aca74210e1b580dc944284
# bad: [8ff31bd0cf9179d7952d933d4638b658b3c9b3ba] ox-latex: Introduce :environment attribute for example blocks
git bisect bad 8ff31bd0cf9179d7952d933d4638b658b3c9b3ba
# bad: [c347b87ffe479824269ae0825e467c35d0946eed] org-src: Allow to post-process edit buffer
git bisect bad c347b87ffe479824269ae0825e467c35d0946eed
# good: [ca08453cc9f142c76536daa0ee824dfa98eb5639] Update defcustom
git bisect good ca08453cc9f142c76536daa0ee824dfa98eb5639
# good: [51d83b91656d235eedccfb01f03abd9ec0545f53] ORG-NEWS: Update copyright year
git bisect good 51d83b91656d235eedccfb01f03abd9ec0545f53
# bad: [0ab15904ec4c8329c41c1965d025b742d3bd0bf1] org-element: Fix "file" link :path
git bisect bad 0ab15904ec4c8329c41c1965d025b742d3bd0bf1
# good: [acf7f47ecd20a48c05f97dc660b00d1850b57e10] Use `completing-read-function' for completion
git bisect good acf7f47ecd20a48c05f97dc660b00d1850b57e10
# good: [88108f652f0d4ddb4250cb89c2453df1fc9ee671] ox-latex: Fix f1548e11fe2972819bc48b88c6094b11150e5c8a
git bisect good 88108f652f0d4ddb4250cb89c2453df1fc9ee671
# good: [1841892321b87ce4873de50dfe339d5b5d8d942c] org.texi: Introduce `org-latex-prefer-user-labels'
git bisect good 1841892321b87ce4873de50dfe339d5b5d8d942c
# bad: [4ee8f4f2865b84669a8a0daec2725efb29c6bd90] Revert "ox: Change label naming scheme"
git bisect bad 4ee8f4f2865b84669a8a0daec2725efb29c6bd90
# good: [ea4e8e3b2c47ebdc0037f09f87625b1bc57c89fc] org.texi: Remove `org-latex-custom-id-as-label'
git bisect good ea4e8e3b2c47ebdc0037f09f87625b1bc57c89fc
# first bad commit: [4ee8f4f2865b84669a8a0daec2725efb29c6bd90] Revert "ox: Change label naming scheme"

[-- Attachment #3: temp.org --]
[-- Type: application/octet-stream, Size: 140 bytes --]

#+TITLE:  Test
#+INFOJS_OPT: view:content toc:nil


* Section 1
  Alpha, Beta, Gamma
* Section 2
  Gamma, Beta, Alpha
* Section 3
  Test




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-info-js folding is broken in 8.3 releases
  2015-09-05 23:20 Org-info-js folding is broken in 8.3 releases Piyush Srivastava
@ 2015-09-06  0:20 ` Piyush Srivastava
  2015-09-06  3:20   ` Piyush Srivastava
  0 siblings, 1 reply; 4+ messages in thread
From: Piyush Srivastava @ 2015-09-06  0:20 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]

In fact, further investigation shows that the first commit that actually
breaks org-info-js is the replacement of `org-export-get-headline-id' by
`org-export-get-reference' in commit id 459033 on April 13.  These problems
are temporarily fixed by commit cf7d64, and then reintroduced by commit
4ee8f4 which reverted the changes made to org-export-get-reference in
cf7d64.

-- Piyush.


On Sat, Sep 5, 2015 at 4:20 PM, Piyush Srivastava <piyushsriva@gmail.com>
wrote:

> Hi,
>
>
> In the current 8.3.1 release of org-mode the f/F keybinding that
> org-info-js provides for folding headings in plain mode (of exported html
> files) fails to work.  Further, the 's' and 'o' keys for search and occur
> respectively also fail to work.  Both of these work with the 8.2.10 release.
>
> I have attached a minimal org-mode file with which I can reproduce this
> error.  By bisecting the commit history, I find that the breaking change is
> introduced by commit 4ee8f4 which has the following commit message:
>
> Author: Rasmus <rasmus@gmx.us>
> Date:   Sun Apr 19 16:00:06 2015 +0200
>
>     Revert "ox: Change label naming scheme"
>
>     This reverts commit cf7d64f1e456cad281674fc81a8074f969b7911c.
>
> The log produced by git bisect is also attached.
>
>
> Thanks,
> -- Piyush.
>
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1827 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-info-js folding is broken in 8.3 releases
  2015-09-06  0:20 ` Piyush Srivastava
@ 2015-09-06  3:20   ` Piyush Srivastava
  2015-09-06  3:32     ` Piyush Srivastava
  0 siblings, 1 reply; 4+ messages in thread
From: Piyush Srivastava @ 2015-09-06  3:20 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2301 bytes --]

I think I have finally isolated a fix.  org-info.js uses the magic number
"4" (i.e. the length of the string "sec-") to substring DOM ids in order to
fin section numbers (this is on line number 97 in the source code of
org-info-src.js).   However the changes to org-export-get-reference mean
that instead of using the string "sec-" before the section heading, ox-html
now used the string "orgheadline".  Thus, the fix is to replace "4" by
"orgheadline".length in the source code of org-info-src.js.

This seems to be the simplest way to fix this error.  However, as it is, it
will break those people's code who are using the online version of the
script.  We will probably need to detect what string the html file is using
in the DOM id for headlines and used the length of that string.  I will try
to write a patch in the next few days if this strategy sounds good.

-- Piyush.



On Sat, Sep 5, 2015 at 5:20 PM, Piyush Srivastava <piyushsriva@gmail.com>
wrote:

> In fact, further investigation shows that the first commit that actually
> breaks org-info-js is the replacement of `org-export-get-headline-id' by
> `org-export-get-reference' in commit id 459033 on April 13.  These problems
> are temporarily fixed by commit cf7d64, and then reintroduced by commit
> 4ee8f4 which reverted the changes made to org-export-get-reference in
> cf7d64.
>
> -- Piyush.
>
>
> On Sat, Sep 5, 2015 at 4:20 PM, Piyush Srivastava <piyushsriva@gmail.com>
> wrote:
>
>> Hi,
>>
>>
>> In the current 8.3.1 release of org-mode the f/F keybinding that
>> org-info-js provides for folding headings in plain mode (of exported html
>> files) fails to work.  Further, the 's' and 'o' keys for search and occur
>> respectively also fail to work.  Both of these work with the 8.2.10 release.
>>
>> I have attached a minimal org-mode file with which I can reproduce this
>> error.  By bisecting the commit history, I find that the breaking change is
>> introduced by commit 4ee8f4 which has the following commit message:
>>
>> Author: Rasmus <rasmus@gmx.us>
>> Date:   Sun Apr 19 16:00:06 2015 +0200
>>
>>     Revert "ox: Change label naming scheme"
>>
>>     This reverts commit cf7d64f1e456cad281674fc81a8074f969b7911c.
>>
>> The log produced by git bisect is also attached.
>>
>>
>> Thanks,
>> -- Piyush.
>>
>>
>>
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3364 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Org-info-js folding is broken in 8.3 releases
  2015-09-06  3:20   ` Piyush Srivastava
@ 2015-09-06  3:32     ` Piyush Srivastava
  0 siblings, 0 replies; 4+ messages in thread
From: Piyush Srivastava @ 2015-09-06  3:32 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2732 bytes --]

Of course, we will also need to change the regexp SID_REGEX (in
org-info-src.js) to "/(^#)((sec-|orgheadline)\d+([._]\d+)*$)/" from the
current value of "/(^#)(sec-\d+([._]\d+)*$)/".  It's capturing groups are
not used, to this should not propagate any more changes.

On Sat, Sep 5, 2015 at 8:20 PM, Piyush Srivastava <piyushsriva@gmail.com>
wrote:

> I think I have finally isolated a fix.  org-info.js uses the magic number
> "4" (i.e. the length of the string "sec-") to substring DOM ids in order to
> fin section numbers (this is on line number 97 in the source code of
> org-info-src.js).   However the changes to org-export-get-reference mean
> that instead of using the string "sec-" before the section heading, ox-html
> now used the string "orgheadline".  Thus, the fix is to replace "4" by
> "orgheadline".length in the source code of org-info-src.js.
>
> This seems to be the simplest way to fix this error.  However, as it is,
> it will break those people's code who are using the online version of the
> script.  We will probably need to detect what string the html file is using
> in the DOM id for headlines and used the length of that string.  I will try
> to write a patch in the next few days if this strategy sounds good.
>
> -- Piyush.
>
>
>
> On Sat, Sep 5, 2015 at 5:20 PM, Piyush Srivastava <piyushsriva@gmail.com>
> wrote:
>
>> In fact, further investigation shows that the first commit that actually
>> breaks org-info-js is the replacement of `org-export-get-headline-id' by
>> `org-export-get-reference' in commit id 459033 on April 13.  These problems
>> are temporarily fixed by commit cf7d64, and then reintroduced by commit
>> 4ee8f4 which reverted the changes made to org-export-get-reference in
>> cf7d64.
>>
>> -- Piyush.
>>
>>
>> On Sat, Sep 5, 2015 at 4:20 PM, Piyush Srivastava <piyushsriva@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>>
>>> In the current 8.3.1 release of org-mode the f/F keybinding that
>>> org-info-js provides for folding headings in plain mode (of exported html
>>> files) fails to work.  Further, the 's' and 'o' keys for search and occur
>>> respectively also fail to work.  Both of these work with the 8.2.10 release.
>>>
>>> I have attached a minimal org-mode file with which I can reproduce this
>>> error.  By bisecting the commit history, I find that the breaking change is
>>> introduced by commit 4ee8f4 which has the following commit message:
>>>
>>> Author: Rasmus <rasmus@gmx.us>
>>> Date:   Sun Apr 19 16:00:06 2015 +0200
>>>
>>>     Revert "ox: Change label naming scheme"
>>>
>>>     This reverts commit cf7d64f1e456cad281674fc81a8074f969b7911c.
>>>
>>> The log produced by git bisect is also attached.
>>>
>>>
>>> Thanks,
>>> -- Piyush.
>>>
>>>
>>>
>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 4145 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-06  3:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-05 23:20 Org-info-js folding is broken in 8.3 releases Piyush Srivastava
2015-09-06  0:20 ` Piyush Srivastava
2015-09-06  3:20   ` Piyush Srivastava
2015-09-06  3:32     ` Piyush Srivastava

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).