emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-export-as
@ 2017-03-07 18:50 drymer
  2017-03-07 23:24 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: drymer @ 2017-03-07 18:50 UTC (permalink / raw)
  To: lista de correo de org-mode

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

Hi,

I'm trying to debug the package org2nikola, which works on emacs-24.5
but not on >emacs-25. What I'm trying to see is why the title is
exported when using >emacs-25 but not when prior versions. For what I've
being testing, it doesn't seem related to the package but to org-mode or
emacs. I'll explain why I think this. An example text I want to export would be:

  ,---
  | * TODO Testing                                                    :test:
  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
  |   pulvinar nibh.  Nam a sapien.
  `---

I would execute the function `org2nikola-export-subtree' in the
header. More or less, this function would guide us until the next
function with the above text, but not the header, marked as a region:

  ,----
  | (org-export-as 'html t nil t)
  `----

In emacs-24.5 this function returns:

  ,----
  | <p>
  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec facilisis
  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc porta
  | vulputate tell us.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.
  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis
  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit hendrerit,
  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur vulputate
  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci ultrices
  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est convallis
  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
  | </p>
  `----

In >emacs-25 this function returns:

  ,----
  | <div id="outline-container-org1ce23b7" class="outline-2">
  | <h2 id="org1ce23b7">Testing</h2>
  | <div class="outline-text-2" id="text-org1ce23b7">
  | <p>
  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec facilisis
  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc porta
  | vulputate tellus.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.
  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis
  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit hendrerit,
  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur vulputate
  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci ultrices
  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est convallis
  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
  | </p>
  | </div>
  | </div>
  `----

In both emacs versions I have same results until I arribe here. I'm
not sure how to proceed to debug, any idea? Just ask me more information if needed.

PD: I attach my org-mode configuration since it's what is sugested,
but I don't know if it's relevant. I've only removed agenda related
variables.

Regards

  ----------------------------------------------------------------------



  Emacs : GNU Emacs 25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version
   3.18.9) of 2017-01-21 Package: Org mode version 9.0.5
   (release_9.0.5-28-g4108f5-git @
   /home/drymer/.emacs.d/el-get/org-mode-maint/lisp/)

  current state: `============' (setq org-tab-first-hook
  '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
  org-habit-show-all-today t org-footnote-section nil
  org-habit-preceding-days 7 org-speed-command-hook
  '(org-speed-command-default-hook org-babel-speed-command-hook)
  org-time-clocksum-format '(:hours "%d" :require-hours t :minutes
  ":%02d" :require-minutes t) org-occur-hook
  '(org-first-headline-recenter) org-tab-follows-link t
  org-src-tab-acts-natively t org-metaup-hook
  '(org-babel-load-in-session-maybe) org-imenu-depth 9
  org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
  CONTENTS)"] org-latex-format-inlinetask-function
  'org-latex-format-inlinetask-default-function
  org-confirm-shell-link-function 'yes-or-no-p
  org-ascii-format-inlinetask-function
  'org-ascii-format-inlinetask-default org-link-translation-function
  'toc-org-unhrefify org-export-default-language "es" org-emphasis-alist
  '(("`" (:foreground "cyan")) ("*" bold) ("/" italic) ("_" underline)
  ("'" org-verbatim verbatim) ("~" org-code verbatim) ("+"
  (:strike-through t))) org-pretty-entities t org-return-follows-link t
  org-latex-format-headline-function
  'org-latex-format-headline-default-function org-habit-following-days 0
  org-agenda-remove-tags t org-after-todo-state-change-hook
  '(org-clock-out-if-current) org-latex-format-drawer-function #[514
  "\207" [] 3 "\n\n(fn _ CONTENTS)"] org-odt-format-headline-function
  'org-odt-format-headline-default-function org-from-is-user-regexp nil
  org-icalendar-timezone "Europe/Madrid" org-src-mode-hook
  '(org-src-babel-configure-edit-buffer
  org-src-mode-configure-edit-buffer) org-agenda-before-write-hook
  '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer)
  org-mode-hook '(toc-org-enable (lambda nil (org-bullets-mode 1)) #[0
  "\300\301\302\303\304$\207" [add-hook change-major-mode-hook
  org-show-block-all append local] 5] #[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-babel-show-result-all append
  local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes)
  org-refile-targets '((nil :maxlevel . 10) (org-agenda-files :maxlevel
  . 4)) org-archive-hook '(org-attach-archive-delete-maybe)
  org-ascii-format-drawer-function #[771 "\x01\207" [] 4 "\n\n(fn NAME
  CONTENTS WIDTH)"] org-odt-format-inlinetask-function
  'org-odt-format-inlinetask-default-function org-ctrl-c-ctrl-c-hook
  '(ob-async-org-babel-execute-src-block) org-cycle-hook
  '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
  org-cycle-show-empty-lines
  org-optimize-window-after-visibility-change) org-todo-keywords
  '((sequence "TODO(t)" "NEXT(n)" "IN-PROGRESS(p@/!)" "WAITING(w@/!)"
  "|" "DONE(d!)" "CANCELED(c@)") ) org-hide-emphasis-markers t
  org-modules '(org-habit org-w3m org-bbdb org-bibtex org-docview
  org-gnus org-info org-irc org-mhe org-rmail)
  org-babel-tangle-lang-exts '(("python" . "py") ("latex" . "tex")
  ("emacs-lisp" . "el") ("elisp" . "el"))
  org-confirm-elisp-link-function 'yes-or-no-p
  org-edit-src-content-indentation 0 org-metadown-hook
  '(org-babel-pop-to-session-maybe) org-odt-format-drawer-function #[514
  "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
  org-html-format-headline-function
  'org-html-format-headline-default-function org-link-parameters
  '(("rmail" :follow org-rmail-open :store org-rmail-store-link) ("mhe"
  :follow org-mhe-open :store org-mhe-store-link) ("irc" :follow
  org-irc-visit :store org-irc-store-link) ("info" :follow org-info-open
  :export org-info-export :store org-info-store-link) ("gnus" :follow
  org-gnus-open :store org-gnus-store-link) ("docview" :follow
  org-docview-open :export org-docview-export :store
  org-docview-store-link) ("bibtex" :follow org-bibtex-open :store
  org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export
  org-bbdb-export :complete org-bbdb-complete-link :store
  org-bbdb-store-link) ("w3m" :store org-w3m-store-link) ("id" :follow
  org-id-open) ("file+sys") ("file+emacs") ("doi" :follow
  org--open-doi-link) ("elisp" :follow org--open-elisp-link) ("file"
  :complete org-file-complete-link) ("ftp" :follow (lambda (path)
  (browse-url (concat "ftp:" path)))) ("help" :follow
  org--open-help-link) ("http" :follow (lambda (path) (browse-url
  (concat "http:" path)))) ("https" :follow (lambda (path) (browse-url
  (concat "https:" path)))) ("mailto" :follow (lambda (path) (browse-url
  (concat "mailto:" path)))) ("message" :follow (lambda (path)
  (browse-url (concat "message:" path)))) ("news" :follow (lambda (path)
  (browse-url (concat "news:" path)))) ("shell" :follow
  org--open-shell-link)) org-babel-load-languages '((dot . t)
  (emacs-lisp . t) (gnuplot . t) (latex . t) (ledger . t) (python . t)
  (shell . t) (sql . t) (sqlite . t)) org-src-preserve-indentation t
  org-html-format-inlinetask-function
  'org-html-format-inlinetask-default-function org-habit-graph-column 50
  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
  org-confirm-babel-evaluate nil )

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Bug: org-export-as
  2017-03-07 18:50 Bug: org-export-as drymer
@ 2017-03-07 23:24 ` Nicolas Goaziou
  2017-03-08 10:19   ` drymer
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2017-03-07 23:24 UTC (permalink / raw)
  To: drymer; +Cc: lista de correo de org-mode

Hello,

drymer <drymer@autistici.org> writes:

> I'm trying to debug the package org2nikola, which works on emacs-24.5
> but not on >emacs-25. What I'm trying to see is why the title is
> exported when using >emacs-25 but not when prior versions. For what I've
> being testing, it doesn't seem related to the package but to org-mode or
> emacs. I'll explain why I think this. An example text I want to export would be:
>
>  ,---
>  | * TODO Testing                                                    :test:
>  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
>  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
>  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
>  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
>  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
>  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
>  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
>  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
>  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
>  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
>  |   pulvinar nibh.  Nam a sapien.
>  `---
>
> I would execute the function `org2nikola-export-subtree' in the
> header. More or less, this function would guide us until the next
> function with the above text, but not the header, marked as a region:
>
>  ,----
>  | (org-export-as 'html t nil t)
>  `----
>
> In emacs-24.5 this function returns:
>
>  ,----
>  | <p>
>  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec facilisis
>  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc porta
>  | vulputate tell us.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.
>  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis
>  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit hendrerit,
>  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur vulputate
>  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci ultrices
>  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est convallis
>  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
>  | </p>
>  `----
>
> In >emacs-25 this function returns:
>
>  ,----
>  | <div id="outline-container-org1ce23b7" class="outline-2">
>  | <h2 id="org1ce23b7">Testing</h2>
>  | <div class="outline-text-2" id="text-org1ce23b7">
>  | <p>
>  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec facilisis
>  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc porta
>  | vulputate tellus.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.
>  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis
>  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit hendrerit,
>  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur vulputate
>  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci ultrices
>  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est convallis
>  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
>  | </p>
>  | </div>
>  | </div>
>  `----

FWIW, I cannot reproduce it. When calling (org-export-as 'html t nil t)
gets me the the first output. However, I get the latter when region
includes the heading.

Actually you cannot have both a region and subtree export. Pick the one
you need.

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: org-export-as
  2017-03-07 23:24 ` Nicolas Goaziou
@ 2017-03-08 10:19   ` drymer
  2017-03-08 10:58     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: drymer @ 2017-03-08 10:19 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: lista de correo de org-mode

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

Hi,

Thanks for your time. Could you please retry and evaluate this:

,----
| (defun test-org-export ()
|   (interactive)
|   (save-excursion
|     (org-mark-element)
|     (forward-line) ;; donot export title
|     (setq b (region-beginning))
|     (setq e (region-end)))
|   (message (org-export-as 'html t nil t)))
`----

And execute `M-x test-org-export RET' on the example header:

  ,---
  | * TODO Testing                                                    :test:
  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
  |   pulvinar nibh.  Nam a sapien.
  `---

And see if it happens? I see it clearly different when using different versions of emacs, and I know I'm not the only one[1]. On >emacs25 it does not execute `forward-line' for some reason and it includes the header.

If you still see the expected behaviour, what would you recommend me to do?

Regards

1 - https://github.com/redguardtoo/org2nikola/issues/5
On Wed, Mar 08, 2017 at 12:24:38AM +0100, Nicolas Goaziou wrote:
>Hello,
>
>drymer <drymer@autistici.org> writes:
>
>> I'm trying to debug the package org2nikola, which works on emacs-24.5
>> but not on >emacs-25. What I'm trying to see is why the title is
>> exported when using >emacs-25 but not when prior versions. For what I've
>> being testing, it doesn't seem related to the package but to org-mode or
>> emacs. I'll explain why I think this. An example text I want to export would be:
>>
>>  ,---
>>  | * TODO Testing                                                    :test:
>>  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
>>  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
>>  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
>>  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
>>  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
>>  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
>>  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
>>  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
>>  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
>>  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
>>  |   pulvinar nibh.  Nam a sapien.
>>  `---
>>
>> I would execute the function `org2nikola-export-subtree' in the
>> header. More or less, this function would guide us until the next
>> function with the above text, but not the header, marked as a region:
>>
>>  ,----
>>  | (org-export-as 'html t nil t)
>>  `----
>>
>> In emacs-24.5 this function returns:
>>
>>  ,----
>>  | <p>
>>  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec facilisis
>>  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc porta
>>  | vulputate tell us.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.
>>  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis
>>  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit hendrerit,
>>  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur vulputate
>>  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci ultrices
>>  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est convallis
>>  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
>>  | </p>
>>  `----
>>
>> In >emacs-25 this function returns:
>>
>>  ,----
>>  | <div id="outline-container-org1ce23b7" class="outline-2">
>>  | <h2 id="org1ce23b7">Testing</h2>
>>  | <div class="outline-text-2" id="text-org1ce23b7">
>>  | <p>
>>  | Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec facilisis
>>  | facilisis, est dui fermentum leo, quis tempor ligula erat quis odio.  Nunc porta
>>  | vulputate tellus.  Nunc rutrum turpis sed pede.  Sed bibendum.  Aliquam posuere.
>>  | Nunc aliquet, augue nec adipiscing interdum, lacus tellus malesuada massa, quis
>>  | varius mi purus non odio.  Pellentesque condimentum, magna ut suscipit hendrerit,
>>  | ipsum augue ornare nulla, non luctus diam neque sit amet urna.  Curabitur vulputate
>>  | vestibulum lorem.  Fusce sagittis, libero non molestie mollis, magna orci ultrices
>>  | dolor, at vulputate neque nulla lacinia eros.  Sed id ligula quis est convallis
>>  | tempor.  Curabitur lacinia pulvinar nibh.  Nam a sapien.
>>  | </p>
>>  | </div>
>>  | </div>
>>  `----
>
>FWIW, I cannot reproduce it. When calling (org-export-as 'html t nil t)
>gets me the the first output. However, I get the latter when region
>includes the heading.
>
>Actually you cannot have both a region and subtree export. Pick the one
>you need.
>
>Regards,
>
>--
>Nicolas Goaziou

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Bug: org-export-as
  2017-03-08 10:19   ` drymer
@ 2017-03-08 10:58     ` Nicolas Goaziou
  2017-03-08 12:43       ` drymer
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2017-03-08 10:58 UTC (permalink / raw)
  To: drymer; +Cc: lista de correo de org-mode

Hello,

drymer <drymer@autistici.org> writes:

> Hi,
>
> Thanks for your time. Could you please retry and evaluate this:
>
> ,----
> | (defun test-org-export ()
> |   (interactive)
> |   (save-excursion
> |     (org-mark-element)
> |     (forward-line) ;; donot export title
> |     (setq b (region-beginning))
> |     (setq e (region-end)))
> |   (message (org-export-as 'html t nil t)))
> `----
>
> And execute `M-x test-org-export RET' on the example header:
>
>  ,---
>  | * TODO Testing                                                    :test:
>  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
>  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
>  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
>  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
>  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
>  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
>  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
>  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
>  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
>  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
>  |   pulvinar nibh.  Nam a sapien.
>  `---
>
> And see if it happens?

It does, but the problem is in `test-org-export'. There, `org-export-as'
is called outside the `save-excursion' so region beginning is not the
same as b anymore. The region then includes the headline, and "subtree
export" feature is ignored since there is an active region.


Regards,

-- 
Nicolas Goaziou                                                0x80A93738

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

* Re: Bug: org-export-as
  2017-03-08 10:58     ` Nicolas Goaziou
@ 2017-03-08 12:43       ` drymer
  0 siblings, 0 replies; 5+ messages in thread
From: drymer @ 2017-03-08 12:43 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: lista de correo de org-mode

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

Ah, I see, you're wright. I believe I can fix the problem, but I still don't understand why it behaves differently on that two versions. Anyway, thank you very much.

On Wed, Mar 08, 2017 at 11:58:57AM +0100, Nicolas Goaziou wrote:
>Hello,
>
>drymer <drymer@autistici.org> writes:
>
>> Hi,
>>
>> Thanks for your time. Could you please retry and evaluate this:
>>
>> ,----
>> | (defun test-org-export ()
>> |   (interactive)
>> |   (save-excursion
>> |     (org-mark-element)
>> |     (forward-line) ;; donot export title
>> |     (setq b (region-beginning))
>> |     (setq e (region-end)))
>> |   (message (org-export-as 'html t nil t)))
>> `----
>>
>> And execute `M-x test-org-export RET' on the example header:
>>
>>  ,---
>>  | * TODO Testing                                                    :test:
>>  |   Nullam eu ante vel est convallis dignissim.  Fusce suscipit, wisi nec
>>  |   facilisis facilisis, est dui fermentum leo, quis tempor ligula erat
>>  |   quis odio.  Nunc porta vulputate tellus.  Nunc rutrum turpis sed pede.
>>  |   Sed bibendum.  Aliquam posuere.  Nunc aliquet, augue nec adipiscing
>>  |   interdum, lacus tellus malesuada massa, quis varius mi purus non odio.
>>  |   Pellentesque condimentum, magna ut suscipit hendrerit, ipsum augue
>>  |   ornare nulla, non luctus diam neque sit amet urna.  Curabitur
>>  |   vulputate vestibulum lorem.  Fusce sagittis, libero non molestie
>>  |   mollis, magna orci ultrices dolor, at vulputate neque nulla lacinia
>>  |   eros.  Sed id ligula quis est convallis tempor.  Curabitur lacinia
>>  |   pulvinar nibh.  Nam a sapien.
>>  `---
>>
>> And see if it happens?
>
>It does, but the problem is in `test-org-export'. There, `org-export-as'
>is called outside the `save-excursion' so region beginning is not the
>same as b anymore. The region then includes the headline, and "subtree
>export" feature is ignored since there is an active region.
>
>
>Regards,
>
>--
>Nicolas Goaziou                                                0x80A93738
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2017-03-08 11:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-07 18:50 Bug: org-export-as drymer
2017-03-07 23:24 ` Nicolas Goaziou
2017-03-08 10:19   ` drymer
2017-03-08 10:58     ` Nicolas Goaziou
2017-03-08 12:43       ` drymer

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