Re: export regions of a org files to other formats (most likely only to a buffer).
Samuel Wales writes: > i would say that respecting narrowing is expected in emacs, as a kind > of pseudo-buffer bob/eob, so it would be surprising to find that it > might not be so in a part of org. lack of it should be mentioned, but > might be a bug. I think the main confusion was about active region, not narrowing. Respecting active region is not as much conventional. Best, Ihor
Re: export regions of a org files to other formats (most likely only to a buffer).
[i realized there is a footnote to my comment about narrowing. of course there might be questions about what org will do if there are things that refer to outside the region, like links or macro definitions.] On 5/26/22, Samuel Wales wrote: > i would say that respecting narrowing is expected in emacs, as a kind > of pseudo-buffer bob/eob, so it would be surprising to find that it > might not be so in a part of org. lack of it should be mentioned, but > might be a bug. > > > On 5/25/22, Ihor Radchenko wrote: >> Uwe Brauer writes: >> Could you please clarify which part of the function docstring was not clear? >>> >>> Well >>> | org-export-dispatch is an interactive compiled Lisp function in >>> | ‘ox.el’. >>> | >>> | (org-export-dispatch ARG) >>> ... >>> >>> Does not mention, that a selected region gets exported. >> >> Fair enough. >> Ironically, it is not even wrong. Looking at the source code, respecting >> region is merely a convention coming from most of backends calling >> `org-export-as'. >> >> As one possibility, we can add something like the following to the >> docstring: >> >> "Usually, exporting respects current narrowing and active region, though >> individual export backends might not follow the convention. See >> `org-export-as' for more details." >> >> Alternatively, we can modify `org-export-define-backend' to change the >> docstring with links to individual backend exporters. >> >> Or we may modify the dispatcher menu to indicate active region. Though >> it is not guaranteed to be obeyed by the backends. >> >> Best, >> Ihor >> >> > > > -- > The Kafka Pandemic > > A blog about science, health, human rights, and misopathy: > https://thekafkapandemic.blogspot.com > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: export regions of a org files to other formats (most likely only to a buffer).
i would say that respecting narrowing is expected in emacs, as a kind of pseudo-buffer bob/eob, so it would be surprising to find that it might not be so in a part of org. lack of it should be mentioned, but might be a bug. On 5/25/22, Ihor Radchenko wrote: > Uwe Brauer writes: > >>> Could you please clarify which part of the function docstring was not >>> clear? >> >> Well >> | org-export-dispatch is an interactive compiled Lisp function in >> | ‘ox.el’. >> | >> | (org-export-dispatch ARG) >> ... >> >> Does not mention, that a selected region gets exported. > > Fair enough. > Ironically, it is not even wrong. Looking at the source code, respecting > region is merely a convention coming from most of backends calling > `org-export-as'. > > As one possibility, we can add something like the following to the > docstring: > > "Usually, exporting respects current narrowing and active region, though > individual export backends might not follow the convention. See > `org-export-as' for more details." > > Alternatively, we can modify `org-export-define-backend' to change the > docstring with links to individual backend exporters. > > Or we may modify the dispatcher menu to indicate active region. Though > it is not guaranteed to be obeyed by the backends. > > Best, > Ihor > > -- The Kafka Pandemic A blog about science, health, human rights, and misopathy: https://thekafkapandemic.blogspot.com
Re: export regions of a org files to other formats (most likely only to a buffer).
>>> "IR" == Ihor Radchenko writes: > Uwe Brauer writes: >>> Could you please clarify which part of the function docstring was not >>> clear? >> >> Well >> | org-export-dispatch is an interactive compiled Lisp function in >> | ‘ox.el’. >> | >> | (org-export-dispatch ARG) >> ... >> >> Does not mention, that a selected region gets exported. > Fair enough. > Ironically, it is not even wrong. Looking at the source code, respecting > region is merely a convention coming from most of backends calling > `org-export-as'. > As one possibility, we can add something like the following to the > docstring: > "Usually, exporting respects current narrowing and active region, though > individual export backends might not follow the convention. See > `org-export-as' for more details." I think this is fine, at least for me. Not sure what others think. -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine. smime.p7s Description: S/MIME cryptographic signature
Re: export regions of a org files to other formats (most likely only to a buffer).
Uwe Brauer writes: >> Could you please clarify which part of the function docstring was not >> clear? > > Well > | org-export-dispatch is an interactive compiled Lisp function in > | ‘ox.el’. > | > | (org-export-dispatch ARG) > ... > > Does not mention, that a selected region gets exported. Fair enough. Ironically, it is not even wrong. Looking at the source code, respecting region is merely a convention coming from most of backends calling `org-export-as'. As one possibility, we can add something like the following to the docstring: "Usually, exporting respects current narrowing and active region, though individual export backends might not follow the convention. See `org-export-as' for more details." Alternatively, we can modify `org-export-define-backend' to change the docstring with links to individual backend exporters. Or we may modify the dispatcher menu to indicate active region. Though it is not guaranteed to be obeyed by the backends. Best, Ihor
Re: export regions of a org files to other formats (most likely only to a buffer).
>>> "IR" == Ihor Radchenko writes: > Uwe Brauer writes: >> It seems that I did not check this carefully enough. Indeed, if I mark a >> region and run the export function, only the active region will be >> exported. The docstring of that function is, however, not that clear >> about it. > Could you please clarify which part of the function docstring was not > clear? Well , | | org-export-dispatch is an interactive compiled Lisp function in | ‘ox.el’. | | (org-export-dispatch ARG) | | Export dispatcher for Org mode. | | It provides an access to common export related tasks in a buffer. | Its interface comes in two flavors: standard and expert. | | While both share the same set of bindings, only the former | displays the valid keys associations in a dedicated buffer. | Scrolling (resp. line-wise motion) in this buffer is done with | SPC and DEL (resp. C-n and C-p) keys. | | Set variable ‘org-export-dispatch-use-expert-ui’ to switch to one | flavor or the other. | | When ARG is ‘C-u’, repeat the last export action, with the same | set of options used back then, on the current buffer. | | When ARG is ‘C-u C-u’, display the asynchronous export stack. ` Does not mention, that a selected region gets exported. smime.p7s Description: S/MIME cryptographic signature
Re: export regions of a org files to other formats (most likely only to a buffer).
Uwe Brauer writes: > It seems that I did not check this carefully enough. Indeed, if I mark a > region and run the export function, only the active region will be > exported. The docstring of that function is, however, not that clear > about it. Could you please clarify which part of the function docstring was not clear? Best, Ihor
Re: export regions of a org files to other formats (most likely only to a buffer).
>>> "WD" == William Denton writes: > On 25 May 2022, Uwe Brauer wrote: >> Sometimes I only want to convert/export a region or a paragraph of an >> org file to another format, most likely as html or latex. > Is this different from subtree export? After C-c C-e, C-s will toggle > "export scope" between buffer and subtree. (There's also C-v to > toggle "visible only" export, which I've never used.) Or would it > work to add a heading for the paragraph temporarily, just for export? It seems that I did not check this carefully enough. Indeed, if I mark a region and run the export function, only the active region will be exported. The docstring of that function is, however, not that clear about it. Sorry for the noise smime.p7s Description: S/MIME cryptographic signature
Re: export regions of a org files to other formats (most likely only to a buffer).
On Wed, May 25, 2022 at 11:09 AM Uwe Brauer wrote: > > Hi > > Sometimes I only want to convert/export a region or a paragraph of an > org file to another format, most likely as html or latex. > I cannot find such a functionality also not in the package system > does anybody knows about such a function? Check out this recent thread: https://lists.gnu.org/r/emacs-orgmode/2022-05/msg4.html It concludes with a solution on how to convert a region in Org buffer to Markdown. You can do something similar for any exporter. http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard
Re: export regions of a org files to other formats (most likely only to a buffer).
On Wednesday, 25 May 2022 at 16:35, Uwe Brauer wrote: > Sometimes I only want to convert/export a region or a paragraph of an > org file to another format, most likely as html or latex. > I cannot find such a functionality also not in the package system > does anybody knows about such a function? You can narrow your buffer to the region, (narrow-to-region, C-x n r), and export then. I believe this will work. Alternatively, you can always export the contents of a sub-heading by specifying C-s during export, e.g C-c C-e C-s l l -- : Eric S Fraga, with org release_9.5.3-511-g8e69ad in Emacs 29.0.50
Re: export regions of a org files to other formats (most likely only to a buffer).
On 25 May 2022, Uwe Brauer wrote: Sometimes I only want to convert/export a region or a paragraph of an org file to another format, most likely as html or latex. Is this different from subtree export? After C-c C-e, C-s will toggle "export scope" between buffer and subtree. (There's also C-v to toggle "visible only" export, which I've never used.) Or would it work to add a heading for the paragraph temporarily, just for export? Bill -- William Denton https://www.miskatonic.org/ Librarian, artist and licensed private investigator. Toronto, Canada