emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Setting export scope to subtree not working as expected [9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)]
@ 2022-12-09  2:52 Alejandro Pérez Carballo
  2022-12-10  9:45 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Pérez Carballo @ 2022-12-09  2:52 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

If point is on a heading followed by a subheading without any text in between, the export process is using the tree starting with the subheading instead of the tree starting from point position. If instead you have some text after the first heading and before the subheading, the tree that is exported is the tree starting from point position, as expected. I’m assuming this is a bug, but maybe I’m missing something.

For example, take a buffer containing just this:

   * The title
   ** A subtitle
   Some text

If I export this to an HTML buffer, with point at the beginning of the first line and  after setting the scope to ‘subtree’, I get an HTML buffer whose title is “A subtitle”.

If I follow the same steps on a buffer containing just this: 

   * The title
   Some text
   ** A subtitle

I get an HTML buffer whose title is “The title”.

This doesn’t happen with Org 9.5.5. In both cases, I get what I expect, viz. an HTML buffer whose title is “The title”.

I can reproduce this with the following minimal configuration:

I can reproduce this behavior with the following minimal config:

   (setq straight-check-for-modifications '(check-on-save find-when-checking))

   (defvar bootstrap-version)
   (let ((bootstrap-file
         (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
         (bootstrap-version 5))
     (unless (file-exists-p bootstrap-file)
       (with-current-buffer
           (url-retrieve-synchronously
           "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
           'silent 'inhibit-cookies)
         (goto-char (point-max))
         (eval-print-last-sexp)))
     (load bootstrap-file nil 'nomessage))

   (setq-default use-package-enable-imenu-support t)
   (setq straight-use-package-by-default t)
   (straight-use-package 'use-package)
   (setq use-package-verbose nil
         use-package-compute-statistics t
         use-package-expand-minimally t
         use-package-always-defer t)

   (straight-register-package 'org)

   (use-package org
     :ensure t)



Emacs  : GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.5 (Build 21G72))
of 2022-09-15
Package: Org mode version 9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)


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

* Re: [BUG] Setting export scope to subtree not working as expected [9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)]
  2022-12-09  2:52 [BUG] Setting export scope to subtree not working as expected [9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)] Alejandro Pérez Carballo
@ 2022-12-10  9:45 ` Ihor Radchenko
  2022-12-10 11:10   ` Kaushal Modi
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-12-10  9:45 UTC (permalink / raw)
  To: Alejandro Pérez Carballo; +Cc: emacs-orgmode

Alejandro Pérez Carballo <apc@umass.edu> writes:

> If point is on a heading followed by a subheading without any text in between, the export process is using the tree starting with the subheading instead of the tree starting from point position. If instead you have some text after the first heading and before the subheading, the tree that is exported is the tree starting from point position, as expected. I’m assuming this is a bug, but maybe I’m missing something.
>
> For example, take a buffer containing just this:
>
>    * The title
>    ** A subtitle
>    Some text
>
> If I export this to an HTML buffer, with point at the beginning of the first line and  after setting the scope to ‘subtree’, I get an HTML buffer whose title is “A subtitle”.
>
> If I follow the same steps on a buffer containing just this: 
>
>    * The title
>    Some text
>    ** A subtitle
>
> I get an HTML buffer whose title is “The title”.

Thanks for reporting!
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0616b3c37

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: [BUG] Setting export scope to subtree not working as expected [9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)]
  2022-12-10  9:45 ` Ihor Radchenko
@ 2022-12-10 11:10   ` Kaushal Modi
  2022-12-10 18:58     ` Alejandro Perez Carballo
  0 siblings, 1 reply; 4+ messages in thread
From: Kaushal Modi @ 2022-12-10 11:10 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Alejandro Pérez Carballo, emacs-org list

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

Hi Alejandro,

Thanks for reporting this issue. I was seeing the same issue and I wasn't
sure if this issue was in org-mode or the ox-hugo package. It was on my
to-debug list.

Ihor: Thank you for the quick response and fix!

On Sat, Dec 10, 2022, 4:47 AM Ihor Radchenko <yantar92@posteo.net> wrote:

> Alejandro Pérez Carballo <apc@umass.edu> writes:
>
> > If point is on a heading followed by a subheading without any text in
> between, the export process is using the tree starting with the subheading
> instead of the tree starting from point position. If instead you have some
> text after the first heading and before the subheading, the tree that is
> exported is the tree starting from point position, as expected. I’m
> assuming this is a bug, but maybe I’m missing something.
> >
> > For example, take a buffer containing just this:
> >
> >    * The title
> >    ** A subtitle
> >    Some text
> >
> > If I export this to an HTML buffer, with point at the beginning of the
> first line and  after setting the scope to ‘subtree’, I get an HTML buffer
> whose title is “A subtitle”.
> >
> > If I follow the same steps on a buffer containing just this:
> >
> >    * The title
> >    Some text
> >    ** A subtitle
> >
> > I get an HTML buffer whose title is “The title”.
>
> Thanks for reporting!
> Fixed on bugfix.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0616b3c37
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>
>

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

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

* Re: [BUG] Setting export scope to subtree not working as expected [9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)]
  2022-12-10 11:10   ` Kaushal Modi
@ 2022-12-10 18:58     ` Alejandro Perez Carballo
  0 siblings, 0 replies; 4+ messages in thread
From: Alejandro Perez Carballo @ 2022-12-10 18:58 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Ihor Radchenko, emacs-org list

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

Thanks for the quick fix!!

On Saturday, December 10, 2022, Kaushal Modi <kaushal.modi@gmail.com> wrote:

> Hi Alejandro,
>
> Thanks for reporting this issue. I was seeing the same issue and I wasn't
> sure if this issue was in org-mode or the ox-hugo package. It was on my
> to-debug list.
>
> Ihor: Thank you for the quick response and fix!
>
> On Sat, Dec 10, 2022, 4:47 AM Ihor Radchenko <yantar92@posteo.net> wrote:
>
>> Alejandro Pérez Carballo <apc@umass.edu> writes:
>>
>> > If point is on a heading followed by a subheading without any text in
>> between, the export process is using the tree starting with the subheading
>> instead of the tree starting from point position. If instead you have some
>> text after the first heading and before the subheading, the tree that is
>> exported is the tree starting from point position, as expected. I’m
>> assuming this is a bug, but maybe I’m missing something.
>> >
>> > For example, take a buffer containing just this:
>> >
>> >    * The title
>> >    ** A subtitle
>> >    Some text
>> >
>> > If I export this to an HTML buffer, with point at the beginning of the
>> first line and  after setting the scope to ‘subtree’, I get an HTML buffer
>> whose title is “A subtitle”.
>> >
>> > If I follow the same steps on a buffer containing just this:
>> >
>> >    * The title
>> >    Some text
>> >    ** A subtitle
>> >
>> > I get an HTML buffer whose title is “The title”.
>>
>> Thanks for reporting!
>> Fixed on bugfix.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0616b3c37
>>
>> --
>> Ihor Radchenko // yantar92,
>> Org mode contributor,
>> Learn more about Org mode at <https://orgmode.org/>.
>> Support Org development at <https://liberapay.com/org-mode>,
>> or support my work at <https://liberapay.com/yantar92>
>>
>>

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

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

end of thread, other threads:[~2022-12-10 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-09  2:52 [BUG] Setting export scope to subtree not working as expected [9.6 (9.6-gb3da42 @ /Users/apc/.emacs.d/straight/build/org/)] Alejandro Pérez Carballo
2022-12-10  9:45 ` Ihor Radchenko
2022-12-10 11:10   ` Kaushal Modi
2022-12-10 18:58     ` Alejandro Perez Carballo

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