Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Ken Mankoff


On 2019-09-25 at 01:07 +02, Tim Cross  wrote...
> I just put :tangle no in the block header e.g.
>
> #+begin_src emacs-lisp :tangle no
>
> #+end_src

Also,

* COMMENT Section
#+BEGIN_SRC
# not exported because of COMMENT
#+END_SRC

  -k.




Re: [O] [BUG] Tags misalign while editing heading

2019-09-24 Thread David Masterson
Dmitrii Korobeinikov  writes:

> When I edit a heading (the title), if I add characters, the tags auto-align.
> But if I remove text, tags shift left and so are no longer aligned.

Need much more information about your setup.  You wouldn't, by chance,
be sharing your Org files with BeOrg on an iPhone?

--
David



Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Nathan Neff
On Tue, Sep 24, 2019 at 8:19 PM Tim Cross  wrote:

>
> There are two different concepts - tangling and exporting. When you
> tangle the file, code blocks are written out into code files (possibly
> with evaluation etc). This is part of the 'literate programming' support
> within org.
>

Yep - thanks - it's just easy to conflate the two :-)


> When you export a file, you are exporting the file
> contents into a different format i.e PDF, HTML, markdown etc. By
> default, code blocks are not evaluated during this process - they are
> just exported 'as-is'. However, sometimes, these code blocks are used to
> generate content in the file, so you do want them to be evaluated during
> the export (for example, to create a 'results' section, generate an
> image that is embedded in the file etc).
>
> So, if you 'export' your emacs init org file as PDF, it will be exported
> as a PDF file where the source blocks will appear as source listings in
> the PDF file along with all the other non source block text. If on the
> other hand, you tangle your emacs init org file, it will create an .el
> file with only the source blocks.
>
> Nathan Neff  writes:
>
> > Thanks Tim - I wanted to ask the list -- what does "
> >
> > By default, Org does not tangle the ‘src’ code block on export." mean in
> > this web page:https://orgmode.org/manual/Extracting-source-code.html
> > I mean, I have all of my begin_src emacs-lisp blocks with no explicit
> > :tangle yesand they all are exported to the resulting *.el file.  What
> does
> > the above statement mean?
> >
> > On Tue, Sep 24, 2019 at 6:14 PM Tim Cross  wrote:
> >
> >>
> >> I just put :tangle no in the block header e.g.
> >>
> >> #+begin_src emacs-lisp :tangle no
> >>
> >> #+end_src
> >>
> >> This is how I turn off or remove blocks from my .emacs.d/init.el file,
> >> which is tangled from an or file. You can also put a filename. This is
> >> what I do for Emacs 27, which introduces the early-init.el file i.e.
> >>
> >> #+begin_src emacs-lisp :tangle early-init.el
> >>
> >> #+end_src
> >>
> >> #+begin_src emacs-lisp :tangle init.el
> >>
> >> #+end_src
> >>
> >> Nathan Neff  writes:
> >>
> >> > Hello all,
> >> >
> >> > I use *.org files to configure my emacs and use org-babel-load-file
> >> > to configure my org-mode using *.org files.  Love the feature.
> >> >
> >> > However sometimes I'm experimenting with code blocks, and want to
> simply
> >> > "turn off" certain code blocks in my *.org files from being executed.
> >> > Every time
> >> > I go to do this, I search the web for 30-60 minutes and I'm frustrated
> >> and
> >> > confused by
> >> > the myriad options and documentation.
> >> >
> >> > All I want to do is mark a source code block in my *.org files so that
> >> the
> >> > particular code block is:
> >> >
> >> > 1) Not exported to the resulting .el file when tangling
> >> > Or
> >> > 2) Not ran in the resulting .el files when tangling
> >> >
> >> > I recently spent 30 minutes to an hour trying to figure out how to
> simply
> >> > "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or
> >> > "please don't do this"
> >> > to a code block in my *.org files.  I don't want to mark the code
> block
> >> as
> >> > "text", unless there's really no other option.
> >> >
> >> > In my opinion, the documentation does not simply define how to do this
> >> > relatively common task.
> >> >
> >> > Can someone please point me in the right direction?  Also I would be
> >> > willing to submit a doc-fix or FAQ item if there is currently not an
> item
> >> > to do so.  I'm lost and do not want to spend more time on this
> seemingly
> >> > easy task.
> >> >
> >> > Thanks,
> >> > --Nate
> >>
> >>
> >> --
> >> Tim Cross
> >>
> >>
>
>
> --
> Tim Cross
>


Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Tim Cross


There are two different concepts - tangling and exporting. When you
tangle the file, code blocks are written out into code files (possibly
with evaluation etc). This is part of the 'literate programming' support
within org.

When you export a file, you are exporting the file
contents into a different format i.e PDF, HTML, markdown etc. By
default, code blocks are not evaluated during this process - they are
just exported 'as-is'. However, sometimes, these code blocks are used to
generate content in the file, so you do want them to be evaluated during
the export (for example, to create a 'results' section, generate an
image that is embedded in the file etc).

So, if you 'export' your emacs init org file as PDF, it will be exported
as a PDF file where the source blocks will appear as source listings in
the PDF file along with all the other non source block text. If on the
other hand, you tangle your emacs init org file, it will create an .el
file with only the source blocks.

Nathan Neff  writes:

> Thanks Tim - I wanted to ask the list -- what does "
>
> By default, Org does not tangle the ‘src’ code block on export." mean in
> this web page:https://orgmode.org/manual/Extracting-source-code.html
> I mean, I have all of my begin_src emacs-lisp blocks with no explicit
> :tangle yesand they all are exported to the resulting *.el file.  What does
> the above statement mean?
>
> On Tue, Sep 24, 2019 at 6:14 PM Tim Cross  wrote:
>
>>
>> I just put :tangle no in the block header e.g.
>>
>> #+begin_src emacs-lisp :tangle no
>>
>> #+end_src
>>
>> This is how I turn off or remove blocks from my .emacs.d/init.el file,
>> which is tangled from an or file. You can also put a filename. This is
>> what I do for Emacs 27, which introduces the early-init.el file i.e.
>>
>> #+begin_src emacs-lisp :tangle early-init.el
>>
>> #+end_src
>>
>> #+begin_src emacs-lisp :tangle init.el
>>
>> #+end_src
>>
>> Nathan Neff  writes:
>>
>> > Hello all,
>> >
>> > I use *.org files to configure my emacs and use org-babel-load-file
>> > to configure my org-mode using *.org files.  Love the feature.
>> >
>> > However sometimes I'm experimenting with code blocks, and want to simply
>> > "turn off" certain code blocks in my *.org files from being executed.
>> > Every time
>> > I go to do this, I search the web for 30-60 minutes and I'm frustrated
>> and
>> > confused by
>> > the myriad options and documentation.
>> >
>> > All I want to do is mark a source code block in my *.org files so that
>> the
>> > particular code block is:
>> >
>> > 1) Not exported to the resulting .el file when tangling
>> > Or
>> > 2) Not ran in the resulting .el files when tangling
>> >
>> > I recently spent 30 minutes to an hour trying to figure out how to simply
>> > "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or
>> > "please don't do this"
>> > to a code block in my *.org files.  I don't want to mark the code block
>> as
>> > "text", unless there's really no other option.
>> >
>> > In my opinion, the documentation does not simply define how to do this
>> > relatively common task.
>> >
>> > Can someone please point me in the right direction?  Also I would be
>> > willing to submit a doc-fix or FAQ item if there is currently not an item
>> > to do so.  I'm lost and do not want to spend more time on this seemingly
>> > easy task.
>> >
>> > Thanks,
>> > --Nate
>>
>>
>> --
>> Tim Cross
>>
>>


--
Tim Cross



Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Nathan Neff
Thanks Tim - I wanted to ask the list -- what does "

By default, Org does not tangle the ‘src’ code block on export." mean in
this web page:https://orgmode.org/manual/Extracting-source-code.html
I mean, I have all of my begin_src emacs-lisp blocks with no explicit
:tangle yesand they all are exported to the resulting *.el file.  What does
the above statement mean?

On Tue, Sep 24, 2019 at 6:14 PM Tim Cross  wrote:

>
> I just put :tangle no in the block header e.g.
>
> #+begin_src emacs-lisp :tangle no
>
> #+end_src
>
> This is how I turn off or remove blocks from my .emacs.d/init.el file,
> which is tangled from an or file. You can also put a filename. This is
> what I do for Emacs 27, which introduces the early-init.el file i.e.
>
> #+begin_src emacs-lisp :tangle early-init.el
>
> #+end_src
>
> #+begin_src emacs-lisp :tangle init.el
>
> #+end_src
>
> Nathan Neff  writes:
>
> > Hello all,
> >
> > I use *.org files to configure my emacs and use org-babel-load-file
> > to configure my org-mode using *.org files.  Love the feature.
> >
> > However sometimes I'm experimenting with code blocks, and want to simply
> > "turn off" certain code blocks in my *.org files from being executed.
> > Every time
> > I go to do this, I search the web for 30-60 minutes and I'm frustrated
> and
> > confused by
> > the myriad options and documentation.
> >
> > All I want to do is mark a source code block in my *.org files so that
> the
> > particular code block is:
> >
> > 1) Not exported to the resulting .el file when tangling
> > Or
> > 2) Not ran in the resulting .el files when tangling
> >
> > I recently spent 30 minutes to an hour trying to figure out how to simply
> > "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or
> > "please don't do this"
> > to a code block in my *.org files.  I don't want to mark the code block
> as
> > "text", unless there's really no other option.
> >
> > In my opinion, the documentation does not simply define how to do this
> > relatively common task.
> >
> > Can someone please point me in the right direction?  Also I would be
> > willing to submit a doc-fix or FAQ item if there is currently not an item
> > to do so.  I'm lost and do not want to spend more time on this seemingly
> > easy task.
> >
> > Thanks,
> > --Nate
>
>
> --
> Tim Cross
>
>


Re: [O] Org babel tangle: Don't export code

2019-09-24 Thread Tim Cross


I just put :tangle no in the block header e.g.

#+begin_src emacs-lisp :tangle no

#+end_src

This is how I turn off or remove blocks from my .emacs.d/init.el file,
which is tangled from an or file. You can also put a filename. This is
what I do for Emacs 27, which introduces the early-init.el file i.e.

#+begin_src emacs-lisp :tangle early-init.el

#+end_src

#+begin_src emacs-lisp :tangle init.el

#+end_src

Nathan Neff  writes:

> Hello all,
>
> I use *.org files to configure my emacs and use org-babel-load-file
> to configure my org-mode using *.org files.  Love the feature.
>
> However sometimes I'm experimenting with code blocks, and want to simply
> "turn off" certain code blocks in my *.org files from being executed.
> Every time
> I go to do this, I search the web for 30-60 minutes and I'm frustrated and
> confused by
> the myriad options and documentation.
>
> All I want to do is mark a source code block in my *.org files so that the
> particular code block is:
>
> 1) Not exported to the resulting .el file when tangling
> Or
> 2) Not ran in the resulting .el files when tangling
>
> I recently spent 30 minutes to an hour trying to figure out how to simply
> "disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or
> "please don't do this"
> to a code block in my *.org files.  I don't want to mark the code block as
> "text", unless there's really no other option.
>
> In my opinion, the documentation does not simply define how to do this
> relatively common task.
>
> Can someone please point me in the right direction?  Also I would be
> willing to submit a doc-fix or FAQ item if there is currently not an item
> to do so.  I'm lost and do not want to spend more time on this seemingly
> easy task.
>
> Thanks,
> --Nate


-- 
Tim Cross



[O] Org babel tangle: Don't export code

2019-09-24 Thread Nathan Neff
Hello all,

I use *.org files to configure my emacs and use org-babel-load-file
to configure my org-mode using *.org files.  Love the feature.

However sometimes I'm experimenting with code blocks, and want to simply
"turn off" certain code blocks in my *.org files from being executed.
Every time
I go to do this, I search the web for 30-60 minutes and I'm frustrated and
confused by
the myriad options and documentation.

All I want to do is mark a source code block in my *.org files so that the
particular code block is:

1) Not exported to the resulting .el file when tangling
Or
2) Not ran in the resulting .el files when tangling

I recently spent 30 minutes to an hour trying to figure out how to simply
"disable" or "prevent" or "exclude" or "quit" or "don't" or "stop" or
"please don't do this"
to a code block in my *.org files.  I don't want to mark the code block as
"text", unless there's really no other option.

In my opinion, the documentation does not simply define how to do this
relatively common task.

Can someone please point me in the right direction?  Also I would be
willing to submit a doc-fix or FAQ item if there is currently not an item
to do so.  I'm lost and do not want to spend more time on this seemingly
easy task.

Thanks,
--Nate


Re: [O] Is there any orgmode ChangeLog workalike (with enhancements)?

2019-09-24 Thread Alan E. Davis
I have come up with something simple that works:

("X" "ChangeLog README" entry (file+datetree "./00_README.org") "* %?
\n   %U \n %f" :prepend t)

It looks like it will grow quickly into a long file, with four lines for
each entry.  For now, it's exactly what I needed.  Proof of my instinct
that 95% of the time, when I reach out for help, I almost immediately find
a solution on my own.

I apology for wasted space and time.

Alan Davis

On Tue, Sep 24, 2019 at 11:06 AM Alan E. Davis  wrote:

> [I posted almost this exact message to emacs-help by mistake.]
>
> Many times I have envisioned having an org-mode function that works
> similarly to ChangeLog, to save notes as something like a 00_README.org
> file in-place, in any directory in which I am working.   Maybe my
> imagination has just escaped me, and something either already exists or is
> so trivial as to have escaped my notice.
>
> I almost laughed when I saw a ChangeLog exists for the latest org release,
> but then thought that ChangeLog is so perfect and ubiquitous as it should
> not be replaced.
>
> However, for my  plethora of little projects, scattered all over my home
> directory tree, it would be excellent to have a capture template to do this
> sort of thing, and store to any existing such file in the current
> directory, and be picked up readily by some simple keystroke.   As an
> example, I might be working on a graph of today's tides, in a new folder,
> and work away, and when all is said and done, make a note and add it to the
> 00_README.org file.  These would be convenient to find without digging
> through a lot of cruft  (and I have a lot of cruft).
>
> It seems ChangeLog may sometimes save to a directory a the head of a tree
> of directories, though I'm not sure.  Perhaps an option would enable this
> to be done for a limited number of levels.
>
> Certainly  something like this must have been implemented.  I think the
> main trick might be to use the current directory, and use many files with
> the same filename scattered around all over the place.
>
> I turn to the list out of a sense that I have already wasted enough time
> on trying to search for something of this nature.
>
> Thank you,
>
> Alan Davis
> --
> [Fill in the blanks]
>
> The use of corrupt manipulations and blatant rhetorical ploys ...---
> outright lying, flagwaving, personal attacks, setting up phony
> alternatives, misdirection, jargon-mongering, evading key issues, feigning
> disinterested objectivity, willful misunderstanding of other points of
> view---suggests that ... lacks both credibility and evidence.
>
>   Edward Tufte (in context of making presentations)
>
>
>


-- 
[Fill in the blanks]

The use of corrupt manipulations and blatant rhetorical ploys ...---
outright lying, flagwaving, personal attacks, setting up phony
alternatives, misdirection, jargon-mongering, evading key issues, feigning
disinterested objectivity, willful misunderstanding of other points of
view---suggests that ... lacks both credibility and evidence.

  Edward Tufte (in context of making presentations)


[O] Is there any orgmode ChangeLog workalike (with enhancements)?

2019-09-24 Thread Alan E. Davis
[I posted almost this exact message to emacs-help by mistake.]

Many times I have envisioned having an org-mode function that works
similarly to ChangeLog, to save notes as something like a 00_README.org
file in-place, in any directory in which I am working.   Maybe my
imagination has just escaped me, and something either already exists or is
so trivial as to have escaped my notice.

I almost laughed when I saw a ChangeLog exists for the latest org release,
but then thought that ChangeLog is so perfect and ubiquitous as it should
not be replaced.

However, for my  plethora of little projects, scattered all over my home
directory tree, it would be excellent to have a capture template to do this
sort of thing, and store to any existing such file in the current
directory, and be picked up readily by some simple keystroke.   As an
example, I might be working on a graph of today's tides, in a new folder,
and work away, and when all is said and done, make a note and add it to the
00_README.org file.  These would be convenient to find without digging
through a lot of cruft  (and I have a lot of cruft).

It seems ChangeLog may sometimes save to a directory a the head of a tree
of directories, though I'm not sure.  Perhaps an option would enable this
to be done for a limited number of levels.

Certainly  something like this must have been implemented.  I think the
main trick might be to use the current directory, and use many files with
the same filename scattered around all over the place.

I turn to the list out of a sense that I have already wasted enough time on
trying to search for something of this nature.

Thank you,

Alan Davis
--
[Fill in the blanks]

The use of corrupt manipulations and blatant rhetorical ploys ...---
outright lying, flagwaving, personal attacks, setting up phony
alternatives, misdirection, jargon-mongering, evading key issues, feigning
disinterested objectivity, willful misunderstanding of other points of
view---suggests that ... lacks both credibility and evidence.

  Edward Tufte (in context of making presentations)


Re: [O] export to beamer with heading 1 as separators

2019-09-24 Thread Fraga, Eric
On Tuesday, 24 Sep 2019 at 18:15, Luca Ferrari wrote:
> I'm trying to export to beamer my org-mode presentation, but I would
> like that top level elements in the tree appears as "separators"
> slides, that is chapter introduction.

You can make second level headings to correspond to slides with top
level headings as "sections" by specifying:

#+options: H:2

> I want to have "License", "Arg 0" and "arg 1" as slides with title on
> the center (if possible).  What directive should I use?

To do this, you should add something along these lines:

#+latex_header: 
\AtBeginSection[]{\begin{frame}{Topic}\tableofcontents[currentsection]\end{frame}}

You might wish to play with the LaTeX contents to get just the title
alone but this should provide you a good starting point.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-401-gfabd6d



Re: [O] Org-contacts and extra spaces

2019-09-24 Thread Eric Abrahamsen
Norman Walsh  writes:

> Hi,
>
> If I complete an email address with org-contacts, I get extra spaces
> after the email address:
>
>   To: Jane Doe _ _ _ _[cursor]
>
> Is this just me? Before I go digging for a solution, has anyone else
> encountered and fixed this?

The only time I ever saw something like this was in message-mode, using
C-M-i/completion-at-point to complete mail addresses. If I recall
correctly, it was caused by message-mode's idiosyncratic partial support
for the built-in completion mechanisms. In EBDB I had to add a cleanup
function to `choose-completion-string-functions' to remove the
whitespace.

Could that be what you're seeing?




[O] export to beamer with heading 1 as separators

2019-09-24 Thread Luca Ferrari
Hi all,
I'm trying to export to beamer my org-mode presentation, but I would
like that top level elements in the tree appears as "separators"
slides, that is chapter introduction.

So if my tree is:

* License
* Arg 0
** slide 1
** slide 2
** slide 3
* Arg 1
** slide 4
** slide 5
** slide 6

I want to have "License", "Arg 0" and "arg 1" as slides with title on
the center (if possible).
What directive should I use?

Thanks,
Luca



[O] Org-contacts and extra spaces

2019-09-24 Thread Norman Walsh
Hi,

If I complete an email address with org-contacts, I get extra spaces
after the email address:

  To: Jane Doe _ _ _ _[cursor]

Is this just me? Before I go digging for a solution, has anyone else
encountered and fixed this?

Be seeing you,
  norm

-- 
Norman Walsh  | The Future is something which everyone
http://nwalsh.com/| reaches at the rate of sixty minutes an
  | hour, whatever he does, whoever he
  | is.--C. S. Lewis


signature.asc
Description: PGP signature