Re: org-adapt-indentation not honored prior to Org 9.4?

2021-03-30 Thread Kyle Meyer
Tim Cross writes:

> one thing I think might help (maybe too late) would be to put the
> entries for both electric-indent-mode and org-adapt-indentation so that
> they are together in the release notes as they do interact with each
> other and often people stop looking once they see one and not the other
> (they are currently a fair 'distance' apart in the file). 

Thanks for the suggestion.  I'm not sure that it will help, but it's
easy to do, at least in the Git repo [*], so I've done so in d017cdb0a.

[*] That of course won't be in effect for the file included with Emacs
27.2.  It also won't be at .
Cc'ing Bastien in case he thinks updating 9.4's Changes.html is
worth it.



Re: [PATCH] Remove redundant #' around lambdas

2021-03-30 Thread Kyle Meyer
Stefan Kangas writes:

> Please find attached a minor cleanup patch.

Thank you.  Pushed (3089fcd69).



Re: [PATCH] org-agenda.el: Rename org-agenda-format-item parameters

2021-03-30 Thread Kyle Meyer
Renato Ferreira writes:

> On Mon, 29 Mar 2021 23:20:02 -0400, Kyle Meyer  said:
>
>> Presumably you arrived at this patch because you hit into a particular
>> issue (related the lexical binding conversion in 129c33ddd).
>> Could you provide a reproducer (or at least a description) for that
>> problem?  That'd be useful for reviewing this patch, as well as
>> assessing if the conversion has other similar issues.
>
> Sure:
>
> ```org
>
> * TODO Header [...]

Great, thanks.  Pushed (6a50e41ea).




[:results append] and [:wrap ...] don't play well together

2021-03-30 Thread Greg Minshall
hi.  this fails with [emacs -Q], which in my case
: Org mode version 9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/)

and, also in whatever elpa'ish version i'm running
: Org mode version 9.4.4 (release_9.4.4-277-g2e1c98 @ 
/home/minshall/.emacs.d/straight/build/org/)

when i specify [:results append] and also [:wrap foo], the results are
not obviously appended.  below it seems as if the second evaluation is
appended, then the following are prepended after the first one?

cheers, Greg

#+begin_src elisp :results none
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((emacs-lisp . t) (R . t)))
#+end_src

#+begin_src R :results append :wrap foo
Sys.time()
#+end_src

#+RESULTS:
#+begin_foo
2021-03-31 05:51:08
#+end_foo
#+begin_foo
2021-03-31 05:51:15
#+end_foo
#+begin_foo
2021-03-31 05:51:12
#+end_foo
#+begin_foo
2021-03-31 05:51:10
#+end_foo



Re: Starting from 9.5, Org contrib will be distributed as a separate NonGNU ELPA package

2021-03-30 Thread Tim Cross


Allen Li  writes:

> Bastien  writes:
>
>> Hi all,
>>
>> starting from Org 9.5, org-contrib will be distributed as a NonGNU
>> ELPA package.  You will find it here: https://elpa.nongnu.org/nongnu/
>>
>> See for https://orgmode.org/list/87wnzfy60h@bzg.fr/ for context.
>>
>> Thanks,
>
> Will there be an overlapping period (and if not, can we add such a
> period)?  For example, have one release where org-contrib is still
> shipped, and the NonGNU repos are available.  That gives users such as
> myself a period to switch over without things breaking immediately.
>
> If I understand correctly, the current plan is that users using
> org-contrib will have their configs break immediately when they upgrade
> to 9.5, forcing them to do both the 9.5 upgrade and switchover to NonGNU
> simultaneously.  It's easier if we can first safely upgrade to 9.5, then
> switch to NonGNU repos, and in the next release org-contrib can be removed.

I agree an overlap would be useful. This will give maintainers of
'canned' configs, like spacemacs and doom time to update their setups.

However, just to clarify. As I understand it, after 9.5, there will no
longer be an 'org-plus-contrib' package. Those who now use
org-plus-contrib will need to update their config to install org (fro
ELPA) and org-contrib (from NONGNU ELPA). The good news is nothing will
break. When you do an update, there just won't be an updated
org-plus-contrib and you will remain on 9.5. Only after you have updated
your config will you get a version > 9.5.


-- 
Tim Cross



Re: Starting from 9.5, Org contrib will be distributed as a separate NonGNU ELPA package

2021-03-30 Thread Allen Li
Bastien  writes:

> Hi all,
>
> starting from Org 9.5, org-contrib will be distributed as a NonGNU
> ELPA package.  You will find it here: https://elpa.nongnu.org/nongnu/
>
> See for https://orgmode.org/list/87wnzfy60h@bzg.fr/ for context.
>
> Thanks,

Will there be an overlapping period (and if not, can we add such a
period)?  For example, have one release where org-contrib is still
shipped, and the NonGNU repos are available.  That gives users such as
myself a period to switch over without things breaking immediately.

If I understand correctly, the current plan is that users using
org-contrib will have their configs break immediately when they upgrade
to 9.5, forcing them to do both the 9.5 upgrade and switchover to NonGNU
simultaneously.  It's easier if we can first safely upgrade to 9.5, then
switch to NonGNU repos, and in the next release org-contrib can be removed.



Re: Adding Quick Notes in Org-mode Agenda View Inserts then In Drawer in Reverse Order

2021-03-30 Thread Tim Cross


The challenge with org-mode is that there are an almost unlimited way to
solve every requirement. My approach to what you are doing is likely
very different, but I'll outline it so that the recording of notes has
context. 

Notes are added as sub-headings under the task. All my tasks are at
level 2, so my notes are level 3 or more (notes with sub-notes). I only
use the draw for recroding planning metadata and perhaps some properties
for some special cases.

 I use two methods for adding notes -

1. Just hit enter on the task in the agenda to open its org file and
position the cursor at the task. I then just move down and enter the
note. This is the method I tend to use when actually working on the task
as opposed to just having a thought/idea/info to log about the task.

2. I have a 'note' capture template. Initially, this adds the note to a
refile.org file, but it could be configured to add it where you want.
For me, the aim is to just log the 'thought' as quickly as possible. I
don't worry about where to file it initially. At least once a day, I go
through my refile.org file and refile all the entries in that file.
Using org-refile, it is pretty easy to find the location to refile the
note. Using a capture template, I can ensure additional metadata
associated with the note are included automatically (like the date,
maybe the buffer, web page (I also use org-protocol, so I can record the
notes from web pages in chrome, including anything 'selected'. etc).

Many people would likely find the additional step of having to refile
notes from the refile.org file a hassle or time sink. However, I find it
really useful. The refile task is usually the main component of my
planning for the days activities. I also often find it useful as other
points or info will occur while processing the entries, which I can add
before refiling. Most days, the whole process takes only a couple of
minutes and is usually finished before I've finished my morning coffee!

I also tend to keep my agenda quite small. I treat the refile.org file
as a backlog of 'things'. Items in that file are not included in my
agenda. They only become included in my agenda once they have been
refiled into the appropriate main org file(s). This has two benefits for
me -

1. I don't get 'overloaded' with tasks. If you have too many tasks, I
find it can be overwhelming at times and becomes difficult to focus on
getting progress. All the tasks actually in my agenda are tasks I have
actually committed to completing. More importantly, they are tasks I'm
committed to completing in the 'near future'.

2. All possible tasks, ideas etc are recorded and kept in the refile.org
file. This is my backlog. There are numerous tasks in there which will
likely end up being cancelled without any action (either because
requirements have changed, opportunity has been missed, no longer
relevant etc). Often, they are just ideas which never mature enough to
be worth progressing. As tasks in my agenda are completed, I will go
through the backlog and select new tasks to add.  

Any tasks in my agenda which don't get any action after 2 weeks are
re-evaluated. Either they are not high enough priority to remain in the
agenda, are no longer required/relevant or need to be acted on.

My general philosophy is log everyhting as quickly and easily as
possible, but have a small focused list of 'active' tasks to work on. I
also tend to classify tasks as urgent and important. Urgent tasks are
tings which need to be done ASAP, important are tasks which need to be
done to 'improve' or move things forward. I find this an important
distinction as it is too easy to get caught up in urgent tasks and
forsake those important ones which could actually move things forward so
that there are less urgent tasks. I try to make sure that while I resond
to urgent tasks, I also allocate time to focus on important tasks so
taht I don't end up being only reactive and failing to be proactive.

Tim

Husain Alshehhi  writes:

> Hello.
>
> I use org-agenda frequently for getting an overview of my work. I
> clock-in when I start working on something. I often find myself needing
> to add a note to the task I am working on. To do that from the Agenda
> view, I run org-agenda-add-note. I add typical notes like what my
> findings are, anything I did related to the task, but it is nothing
> related to notes about why the task changed status (at least not always).
>
> However, I do have in my config
>
>   (setq org-log-into-drawer t)
>
> which should add clocking into my LOGBOOK drawer by default. I
> discovered however that org-mode adds my notes in the LOGBOOK drawer. I
> am not sure why, but it appears that these notes are considered "status
> notes" (?) and thus by org-log-into-drawer documentation are logged into
> the drawer. I am not certain if this is correct.
>
> This setup, works fine except for two cases:
>
> a. When I want to export my notes to HTML, exporters will ignore the
>LOGBOOK, and I would like t

Re: ox-html Incorrectly (?) Puts HTML Into the `` Tag

2021-03-30 Thread Tim Visher
On Wed, Jan 20, 2021 at 11:10 PM Kyle Meyer  wrote:

> Tim Visher writes:
>
> > Nice! I don't know enough about `org-export` but FWIW the use case I have
> > is not to have an explicit `title` property but instead just the default
> > title of the heading contents. I assume that's all handled transparently
> by
> > the `(plist-get …` section.
> >
> > Do you have any idea the timeline for getting that patch merged?
>
> It's been applied to master (f4b9f9808).  Please report back if you
> still encounter the problem in your use case.
>

I (finally) got around to testing this out. Initially I thought it had been
released in 9.4.5 but AFAICT that's not the case. Does org not get released
from `master`?

Anyway, we're a step further now in that the title appears to be set using
no markup, so that's đź‘Ť.

Unfortunately, the title now is essentially the exact text of the org
heading, which is awkward in terms of readability for a general audience
(and probably for SEO etc.). I know I said in my original message that I
think stripping all the markup characters would be going too far but now I
think I've come full circle and rendering the title as nothing but the
plain text without any markup information feels like the right solution
given what the title is supposed to convey.

So, would we be willing to accept a patch to that effect? :)


Re: Adding Quick Notes in Org-mode Agenda View Inserts then In Drawer in Reverse Order

2021-03-30 Thread Samuel Wales
another possibility is org-export-with-drawers.

On 3/30/21, Samuel Wales  wrote:
> there is a variable that controls sequence of notes.
>
> one trick would be to go to the entry and keep notes as entries below them:
>
> * x
> ** LOG [2021-03-30 Tue 15:13] hi
> ** some stuff about x
>
> On 3/30/21, Husain Alshehhi  wrote:
>>
>> Hello.
>>
>> I use org-agenda frequently for getting an overview of my work. I
>> clock-in when I start working on something. I often find myself needing
>> to add a note to the task I am working on. To do that from the Agenda
>> view, I run org-agenda-add-note. I add typical notes like what my
>> findings are, anything I did related to the task, but it is nothing
>> related to notes about why the task changed status (at least not always).
>>
>> However, I do have in my config
>>
>>   (setq org-log-into-drawer t)
>>
>> which should add clocking into my LOGBOOK drawer by default. I
>> discovered however that org-mode adds my notes in the LOGBOOK drawer. I
>> am not sure why, but it appears that these notes are considered "status
>> notes" (?) and thus by org-log-into-drawer documentation are logged into
>> the drawer. I am not certain if this is correct.
>>
>> This setup, works fine except for two cases:
>>
>> a. When I want to export my notes to HTML, exporters will ignore the
>>LOGBOOK, and I would like to export my notes.
>> b. Notes are ordered in reverse: newer notes are put first.
>>
>> Because of this behavior, I suspect that I am hijacking the notion of
>> "status change notes" and using them as notes.
>>
>> My questions are:
>>
>> 1. Am I using the notes correctly in org?
>> 2. If not, what is equivalence of adding quick notes into a task
>>(ideally, with time stamp of sort)?
>> 3. If yes, then how can I work around the limitations (a) and (b)?
>>
>> --
>> Husain Alshehhi
>>
>>
>>
>
>
> --
> The Kafka Pandemic
>
> Please learn what misopathy is.
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Re: Adding Quick Notes in Org-mode Agenda View Inserts then In Drawer in Reverse Order

2021-03-30 Thread Samuel Wales
there is a variable that controls sequence of notes.

one trick would be to go to the entry and keep notes as entries below them:

* x
** LOG [2021-03-30 Tue 15:13] hi
** some stuff about x

On 3/30/21, Husain Alshehhi  wrote:
>
> Hello.
>
> I use org-agenda frequently for getting an overview of my work. I
> clock-in when I start working on something. I often find myself needing
> to add a note to the task I am working on. To do that from the Agenda
> view, I run org-agenda-add-note. I add typical notes like what my
> findings are, anything I did related to the task, but it is nothing
> related to notes about why the task changed status (at least not always).
>
> However, I do have in my config
>
>   (setq org-log-into-drawer t)
>
> which should add clocking into my LOGBOOK drawer by default. I
> discovered however that org-mode adds my notes in the LOGBOOK drawer. I
> am not sure why, but it appears that these notes are considered "status
> notes" (?) and thus by org-log-into-drawer documentation are logged into
> the drawer. I am not certain if this is correct.
>
> This setup, works fine except for two cases:
>
> a. When I want to export my notes to HTML, exporters will ignore the
>LOGBOOK, and I would like to export my notes.
> b. Notes are ordered in reverse: newer notes are put first.
>
> Because of this behavior, I suspect that I am hijacking the notion of
> "status change notes" and using them as notes.
>
> My questions are:
>
> 1. Am I using the notes correctly in org?
> 2. If not, what is equivalence of adding quick notes into a task
>(ideally, with time stamp of sort)?
> 3. If yes, then how can I work around the limitations (a) and (b)?
>
> --
> Husain Alshehhi
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Adding Quick Notes in Org-mode Agenda View Inserts then In Drawer in Reverse Order

2021-03-30 Thread Husain Alshehhi


Hello.

I use org-agenda frequently for getting an overview of my work. I
clock-in when I start working on something. I often find myself needing
to add a note to the task I am working on. To do that from the Agenda
view, I run org-agenda-add-note. I add typical notes like what my
findings are, anything I did related to the task, but it is nothing
related to notes about why the task changed status (at least not always).

However, I do have in my config

  (setq org-log-into-drawer t)

which should add clocking into my LOGBOOK drawer by default. I
discovered however that org-mode adds my notes in the LOGBOOK drawer. I
am not sure why, but it appears that these notes are considered "status
notes" (?) and thus by org-log-into-drawer documentation are logged into
the drawer. I am not certain if this is correct.

This setup, works fine except for two cases:

a. When I want to export my notes to HTML, exporters will ignore the
   LOGBOOK, and I would like to export my notes.
b. Notes are ordered in reverse: newer notes are put first.

Because of this behavior, I suspect that I am hijacking the notion of
"status change notes" and using them as notes.

My questions are:

1. Am I using the notes correctly in org?
2. If not, what is equivalence of adding quick notes into a task
   (ideally, with time stamp of sort)?
3. If yes, then how can I work around the limitations (a) and (b)?

--
Husain Alshehhi




Re: About exporting

2021-03-30 Thread Tim Cross


Martin Steffen  writes:

>
> There is one case where I do _NOT_ use org for such documents (though I
> use org basically most things I do), and that is
>
>  collaborative editing,
>
> working together on a document (maybe shared by git), at least with a
> document of some amount of complexity and typesetting requirement.
>

Yes, this is still the big unresolved challenge. The sad truth is people
think editing using word and 'track changes' is a good way to do
collaborative documents. I found it was actually pretty bad once you had
more than 2 people working on the document. It really only worked well
if the collaborators worked in serial i.e. one after the other and you
had a single file which just had track changes on it.

My 'solution', which wasn't great, but which I still preferred to
fighting word and track changes, was to send out the document exported
as ascii from org, to each collaborator and told them 'just edit it,
don't worry about formatting, I'll fix that'.

I would then use diff on the returned ascii files to combine them back
into a single ascii file, convert that back to ork and then export the
final form in whatever format was required. This had a couple of
advantages and disadvantages -

Advantages were I had control over the final document. Was actually
useful to release PDFs stamped with 'draft' until agreement was reached
and then issue a single final document. It is amazing how much confusion
can exist in large organisations because multiple versions of some
document are floating around and people lose track of which was the
final version.

Other advantage was I simply didn't have to deal with word. Even doing
all the diff combining (using Emacs of course!) and re-formatting was
faster for me with org than fighting with word and trying to get a good
looking final word document which contains heaps of conflicting styles
etc. (dig into the metadata for a Word document which has been shred and
edited by multiple people and you will know what I mean!).

Disadvantages included some people just not being able to deal with
editing a plain ascii document - just too use to word processing and
found the whole process frustrating. Also, in some situations, people
hated giving up control of the document.

The other somewhat ironic disadvantage was that the organisation was use
to ugly and badly formatted word documents which had a heap of
organisation format 'policy' which you had to comply with (type of font,
font size, margins, line spacing etc. I had to 'uglify' the latex output
in order to make the documents look like other documents produced in the
organisation. This took a bit of effort, but at least once it was done,
I could re-use the setup.

Funny thing was, whenever I produced a document which was just produced 
with un-uglified Latex, I would typically get comments about what a nicely 
formatted
document it was. Nobody ever said that with documents which complied
with the organisation's 'policy'!

-- 
Tim Cross



Re: [PATCH] org-agenda.el: Rename org-agenda-format-item parameters

2021-03-30 Thread Renato Ferreira
On Mon, 29 Mar 2021 23:20:02 -0400, Kyle Meyer  said:

> Presumably you arrived at this patch because you hit into a particular
> issue (related the lexical binding conversion in 129c33ddd).
> Could you provide a reproducer (or at least a description) for that
> problem?  That'd be useful for reviewing this patch, as well as
> assessing if the conversion has other similar issues.

Sure:

```org

* TODO Header

** TODO Subheader

* Setup
#+begin_src emacs-lisp :results none
(setq org-agenda-prefix-format '((agenda  . " %i %-12:c%?-12t% s")

 (todo  . "% l %i %-12:c")

 (tags  . " %i %-12:c")

 (search . " %i %-12:c"))
org-agenda-files (list (buffer-file-name 
(current-buffer
(org-todo-list "TODO")
#+end_src

```

Note the "% l" on the todo format to use level variable.

Evaluating this will result in "if: Symbol’s value as variable is void:
level" in commit 68db6fc06.

-- 
Att.,
Renato Ferreira



Re: About exporting

2021-03-30 Thread Juan Manuel MacĂ­as
Martin Steffen  writes:

> In my experience, ith latex, it's possible to write text together for
> well-intended people. Publishing houses tell you ``these are the classes
> and style files (among perhaps others) that you _have_ to use, and also
> do the following...''  (same possible for wisiwyg-editors, I assume),
> and if you don't mess that up (like overwriting the defaults) you have a
> chance to get a uniformely looking output (and on a halfway portable
> platform, like a CTAN compatible latex installation). I cannot imagine
> that publishers would prescibe ``this is the org-settings and features
> you as author must to use to publish with us''.

Unfortunately today the old 'division of powers' that always worked has
been broken in many scenarios: the author writes, the typesetter
composes the book and the publisher publishes it, and neither of them
interferes in the other's work, although all three live together in the
same body. The WYSIWYG word processors have had a lot to do with
distracting the author in untimely typographical concerns by imposing an
unnatural way of writing, where the format is confused with the content
and its structure. And DTP software, on the other hand, which is
intended for magazines and graphic design, have imposed a rather
negligent way of producing books.

Knuth created TeX in the '70s for his own books, because he was
disgusted with the result he was getting from an increasingly poor
publishing industry, in the transition from mechanical printing and
photocomposition to computerized editorial production. But somehow he
also reinvented the printing press of the digital age, since TeX is
first and foremost an emulator of the art and technique of ancient
linotypists, monotypists, typesetters and so on. Lamport wrote LaTeX for
his own documents, as a high-level language for TeX, since TeX only
works on the physical plane, and plainTeX was quite spartan. But time
has shown that LaTeX (and later ConTeXt) is the perfect semantic layer
of TeX. Tex and LaTeX are essentially *typographic* tools, with true
professional demands, but which authors can use on "autopilot" (a very
small part of LaTeX).

However, *I would not recommend anyone to use LaTeX for writing*. A
light markup language is more comfortable and efficient for me. Some
people prefer Markdown, but IMHO, Org Mode represents the most natural
way (aside from paper) to write. It helps me organize my ideas. And when
I write I don't worry about typographical problems at all, although I
work as a professional typesetter. Of course, with LaTeX and its
autopilot (standard classes, basic packages, no direct formatting, no
custom code, etc., etc.) you can do the same. But Org represents one
more step in confort and productivity.

Best regards,

Juan Manuel 



Re: About exporting

2021-03-30 Thread autofrettage
Martin Steffen wrote:

> I cannot imagine
> that publishers would prescibe ``this is the org-settings and features
> you as author must to use to publish with us''.

If anyone, then the IEEE. In the late 80s, their instructions to authors 
included a mindboggling number of allowable DTP-program (and other) file 
formats, and an equally mindboggling number of physical storage alternatives.

...but I acknowledge that was over 30 years ago.

Cheers
Rasmus



Re: About exporting

2021-03-30 Thread Martin Steffen
> "autofrettage" == autofrettage   writes:

autofrettage> Hi,


autofrettage> Not even the most streamlined DTP-wysiwyg-program is

I agree. I did not want to imply that. 
autofrettage> safe from this.  Far from. I even doubt typewritten
autofrettage> documents can be written colla- boratively, without
autofrettage> someone messing things up.

Also that is common (I wrote many publications collaboratively with
latex. One can mess up at every level (from the line where a revision
merge conflict occurs, to latex incompatibilities (though that's not a
big problem resp. one can get that under control) up to notational,
linguistic or ``semantic'' incompatibilities (section 4 contradicts
content-wise what has been written is section 3). None of that can (or
should) be prevented by any form of tool. it depends on communicating
with each other, using one's brain, and a few other qualities.


As far as LaTeX vs. org is concerned (for producing readable documents
in varying degree of requirements as far as the complexity of document
is concerned and the typesetting quality), in my experience it's as
follows: of course everything that can be done by latex can be done with
org (trivially). As far as collaboration is concerned, if you get more
experienced with latex (and learn from mistakes and get better making
use of it), you will somehow rely on provided classed and other things
offered (and making good use of macros etc), and not messing it up,
knowing better than latex how it should looks like. That may including
writing class files yourself or style files (and sharing them with your
collaborators), but with experience you get more "disciplined" (if you
are willing to follow that discipline).


Though one can do the same in org (to disipline oneself to avoid messing
up collaboratively working on a shared document), I simply think it's
harder.

Both latex and org gives you freedom whatever you do (and you can use it
to mess it up; and as you send, also in a restrictive DTP or a harsh
straightjacket of producing "text" by filling out many small web-forms,
each free-form text at most 200 characters, like in a web-questionnaire,
you still can mess it up).

I enjoy the freedom that editing latex (and the support given by emacs)
for the same reason I enjoy the freedom of org (and the support given
many org-packages).


The difference is, in latex I don't want to explore the freedom I have
(like messing up things that styles prepared from me, or write
{\Large\textbf{Chapter 1: \hspace{4mm} Introduction}} instead of using
the command \chapter{Introduction}. And this experience of NOT using
parts of the freedom is shared with between experienced latex users
(especially those that collaborate in a good way with latex together on
shared documents) In org, getting experienced with org for me leads me
doing more and more creative things.  I have one or two colleagues, they
do completely different things than me or do it completely differntly,
and that's fine. But it's not a basis for using org for collaboratively
writing books. Of course it's doable, but requires more
(self-)discipline. I have also seen people I collaborate with that do in
LaTeX things like {\Large\textbf{Chapter 1: \hspace{4mm} Introduction}},
though this are either beginners (if they stick to this for them
established use of how to write LaTeX, makes a text-based collaboration
not useful for me On can still talk things through etc but not write
a common text :-))

In my experience, ith latex, it's possible to write text together for
well-intended people. Publishing houses tell you ``these are the classes
and style files (among perhaps others) that you _have_ to use, and also
do the following...''  (same possible for wisiwyg-editors, I assume),
and if you don't mess that up (like overwriting the defaults) you have a
chance to get a uniformely looking output (and on a halfway portable
platform, like a CTAN compatible latex installation). I cannot imagine
that publishers would prescibe ``this is the org-settings and features
you as author must to use to publish with us''.

Org (for the discussed usecase of exporting documents) is just a way to
produce LaTeX, latex takes care of portability and can assist with
uniformity and quality of type setting, but org intends (many) other
(useful) things.

Martin










autofrettage> There should be something like pilot licences for
autofrettage> using certain computer tools, not to speak about
autofrettage> programming, but let's not sink into squabbles about
autofrettage> that...

autofrettage> cheers Rasmus



[PATCH] Remove redundant #' around lambdas

2021-03-30 Thread Stefan Kangas
Please find attached a minor cleanup patch.
From 7fcad2bd12ea1833db72494e799df64a5576c6fa Mon Sep 17 00:00:00 2001
From: Stefan Kangas 
Date: Tue, 30 Mar 2021 16:19:06 +0200
Subject: [PATCH] Remove redundant #' around lambdas

* contrib/lisp/org-choose.el (org-choose-get-highest-mark-index)
(org-choose-get-fn-map-group, org-choose-keep-sensible)
(org-choose-setup-vars):
* lisp/org-mouse.el (org-mode-hook, org-mouse-context-menu)
(org-mouse-popup-global-menu):
* lisp/ox-beamer.el (org-beamer--format-section):
* lisp/ox.el (org-export-insert-default-template): Remove redundant #'
around lambdas.
---
 contrib/lisp/org-choose.el |  36 +-
 lisp/org-mouse.el  | 130 ++---
 lisp/ox-beamer.el  |   2 +-
 lisp/ox.el |   2 +-
 4 files changed, 85 insertions(+), 85 deletions(-)

diff --git a/contrib/lisp/org-choose.el b/contrib/lisp/org-choose.el
index c791a862e..839a38b28 100644
--- a/contrib/lisp/org-choose.el
+++ b/contrib/lisp/org-choose.el
@@ -175,8 +175,8 @@ Each entry is an `org-choose-mark-data.'" )
   (pushnew (cons text tail)
 	   org-choose-mark-data
 	   :test
-	   #'(lambda (a b)
-		   (equal (car a) (car b)))
+   (lambda (a b)
+ (equal (car a) (car b)))
 
 ;;; org-choose-filter-tail
 (defun org-choose-filter-tail (raw)
@@ -347,8 +347,8 @@ setting was changed."
 		   org-todo-log-states)
 		;;Map over group
 		(funcall map-over-entries
-			 #'(lambda ()
-			 (apply func-d473 args-46k
+ (lambda ()
+   (apply func-d473 args-46k
 ;;Remove the marker
 (set-marker entry-pos nil)))
 
@@ -371,18 +371,18 @@ setting was changed."
 
 (defun org-choose-get-fn-map-group ()
   "Return a function to map over the group"
-  #'(lambda (fn)
-  (require 'org-agenda) ;; `org-map-entries' seems to need it.
-  (save-excursion
-	(unless (org-up-heading-safe)
-	  (error "Choosing is only supported between siblings in a tree, not on top level"))
-	(let
-	((level (org-reduced-level (org-outline-level
-	  (save-restriction
-	(org-map-entries
-	 fn
-	 (format "LEVEL=%d" level)
-	 'tree))
+  (lambda (fn)
+(require 'org-agenda) ;; `org-map-entries' seems to need it.
+(save-excursion
+  (unless (org-up-heading-safe)
+(error "Choosing is only supported between siblings in a tree, not on top level"))
+  (let
+  ((level (org-reduced-level (org-outline-level
+(save-restriction
+  (org-map-entries
+   fn
+   (format "LEVEL=%d" level)
+   'tree))
 
 ;;; org-choose-get-highest-mark-index
 
@@ -396,8 +396,8 @@ If there is none, return 0"
(indexes-list
 	(remove nil
 		(funcall map-over-entries
-			 #'(lambda ()
-			 (org-choose-get-entry-index keywords))
+ (lambda ()
+   (org-choose-get-entry-index keywords))
 (if
 	indexes-list
 	(apply #'max indexes-list)
diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el
index 5c222ea70..32897e6d9 100644
--- a/lisp/org-mouse.el
+++ b/lisp/org-mouse.el
@@ -501,7 +501,7 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:"
  ("Check Tags"
   ,@(org-mouse-keyword-menu
 	 (sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp)
-	 #'(lambda (tag) (org-tags-sparse-tree nil tag)))
+ (lambda (tag) (org-tags-sparse-tree nil tag)))
   "--"
   ["Custom Tag ..." org-tags-sparse-tree t])
  ["Check Phrase ..." org-occur]
@@ -511,26 +511,26 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:"
  ("Display Tags"
   ,@(org-mouse-keyword-menu
 	 (sort (mapcar 'car (org-get-buffer-tags)) 'string-lessp)
-	 #'(lambda (tag) (org-tags-view nil tag)))
+ (lambda (tag) (org-tags-view nil tag)))
   "--"
   ["Custom Tag ..." org-tags-view t])
  ["Display Calendar" org-goto-calendar t]
  "--"
  ,@(org-mouse-keyword-menu
 	(mapcar 'car org-agenda-custom-commands)
-	#'(lambda (key)
-	(eval `(org-agenda nil (string-to-char ,key
+(lambda (key)
+  (eval `(org-agenda nil (string-to-char ,key
 	nil
-	#'(lambda (key)
-	(let ((entry (assoc key org-agenda-custom-commands)))
-	  (org-mouse-clip-text
-	   (cond
-		((stringp (nth 1 entry)) (nth 1 entry))
-		((stringp (nth 2 entry))
-		 (concat (org-mouse-agenda-type (nth 1 entry))
-			 (nth 2 entry)))
-		(t "Agenda Command `%s'"))
-	   30
+(lambda (key)
+  (let ((entry (assoc key org-agenda-custom-commands)))
+(org-mouse-clip-text
+ (cond
+  ((stringp (nth 1 entry)) (nth 1 entry))
+  ((stringp (nth 2 entry))
+   (concat (org-mouse-agenda-type (nth 1 entry))
+   (nth 2 entry)))
+  (t "Agenda Command `%s'"))
+ 30
  "--"
  ["Delete Blank Lines" delete-blank-lines
   :visible (org-mouse-e

Re: About exporting

2021-03-30 Thread autofrettage
Hi,

Just a remark about what Martin Steffen wrote:

> There is one case where I do NOT use org for such documents (though I
> use org basically most things I do), and that is
>
> collaborative editing,
>
> /.../ one can easily
> mess it up (typically for novices, who start changing layout or
> typesetting, injecting manual spacing etc).
> /.../
> That's why I have not dared to write challenging (latex) documents with
> org collaboratively (complex documents alone, yes, simple documents
> jointly, but not all)

Not even the most streamlined DTP-wysiwyg-program is safe from this.
Far from. I even doubt typewritten documents can be written colla-
boratively, without someone messing things up.

There should be something like pilot licences for using certain
computer tools, not to speak about programming, but let's not sink
into squabbles about that...

cheers
Rasmus



Re: About exporting

2021-03-30 Thread Martin Steffen



Hi, here's my angle (which works for myself) how I use org-exporting in
connection with doing documents (I use in the meantime also org to
export as input for jekyll to produce HTML, but that's a different use,
the heavy lifting there is done in jekyll).


I am a LaTeX user since quite some time (also a bit TeX and texinfo)
ever since students. For LaTeX, I consider myself close to carrying a
black belt, maybe brown :-), for TeX and texi it's more dabbling (actually
for texinfo, I in the meantime use org and export to texinfo)

My (academic) environment and my field encourages use of LaTeX, that or
at least tolerates it; there are colleagues not to mention the
administration, who never would consider touching something
"unprofessional" like LaTeX, not mention org


Evern since I picked up org, I use org also to produce LaTeX. Often
diferent versions of Latex-src from the same org file. Sometimes LaTeX +
HTML side by side, sometimes ODT.

For ODT, it's often that someone forces me to ``it must be doc-file''
(or docx), because for some document and "doc-file" is synonymous.


The more the use-case for the document is proper typesetting /and
nothing else/, so the focus is on one single typeset output, the more I
simply work in LaTeX only. I have the feelinga it's faster, and the
fancy stuff (macros, enviorinments, styles, classes), I rely on LaTeX's
facilities anyway, even if I use org as pre-stage.

If I have a multi-purpose use-case, I often use org, or actually, it's a
mixure. Still the fancy stuff (typesetting specification, macros,
environments) is done in latex. By multi-purpose, I for instance
mean I do for some courses. The slides are in LaTeX, which means, beamer
mode,and org supports that reasonably. A different version of the
"slides" contains more text (sentences, expanations, etc). So I export a
different version (different export tags).

Still some portions of the overall document are native LaTeX. those are
typically included (not ``inlined''), often formulas and math
definitions, one reason being that editing LaTeX is faster in that case
than editing that in org.

And a third version could be HTML for webpages etc.  Of course one can
have conditional text in LaTeX as well, but org is quite good in that as
well. One can export latex to html, but generating it from org is
better.


There is one case where I do _NOT_ use org for such documents (though I
use org basically most things I do), and that is

 collaborative editing,

working together on a document (maybe shared by git), at least with a
document of some amount of complexity and typesetting requirement.

Even if I know that some colleagues use org (very few only, though), I
have the distinct feeling it gives too much headaches. Org would work
fine, being text, so revisioning is easy.

However, it's TOO flexible. I do quite complex documents with org
(exporting to latex), but I am not sure how sure to make it reliably
work when working together with one or more persons, and how much
``debugging'' and headache it would take.  I for instance like to test
out new packages, have the newest org. For LaTeX, that seems mostly
unproblematic, for org, not sure.

And then comes the personal habits: One great thing is that org is
flexible and one can make use of useful ``workflows'' or conventions
that profitable for oneself, and one gets used to it, one can adapt, and
then I have extra packages and adaptations. I can handle that (because I
adapt that myself), but it may conflict with other people's fiddlings.

Of course, in latex you can fiddle endlessly as well; even if one has
agreed on common macros and class files and conventios, one can easily
mess it up (typically for novices, who start changing layout or
typesetting, injecting manual spacing etc). But in LaTeX it seems more
under control, the purpose is to provide uniform typesetting of text
documents, it allows you to imposes "discipline" on the format (if you
are willing to stick to the agreed style files etc) Org, on the other
hand, is not about "uniform, classy output", it's not about
"discipline", it offers freedom and encourages playing around with, and
people who like to work with org _like_ to play around with it and to
stuff with it that others did not though of.

That's why I have not dared to write challenging (latex) documents with
org collaboratively (complex documents alone, yes, simple documents
jointly, but not all)
[
Martin














> "Ypo" == Ypo   writes:

Ypo> Hi

Ypo> After some years of using orgmode, and exporting using its
Ypo> defaults, I would like to take a quality leap and find a way of
Ypo> exporting for life. My options: LaTeX, ODT, HTML.

Ypo> LaTeX: I can see some masters here that make professional
Ypo> books, and I have some friends that publish scientific papers
Ypo> using LaTeX. But, it looks like a like a rabbit hole to me,
Ypo> since even the masters seem to have to modify the tex file
Ypo> d

Re: About exporting

2021-03-30 Thread Joost Kremers


On Tue, Mar 30 2021, Eric S Fraga wrote:
> On Tuesday, 30 Mar 2021 at 10:13, Detlef Steuer wrote:
>> Btw. I had do deliver rtf recently. Is there any documented way to generate
>> rtf from org? 
>
> Two routes that I know of:
> 1. org -> LaTeX -> rtf using latex2rtf
> 2. org -> odt -> rtf by saving as that format in LibreOffice.
> Pandoc may have similar, of course.

Yes, Pandoc can write rtf files. Since it can also read Org files, you may be
able to use it to go from Org to rtf directly.

-- 
Joost Kremers
Life has its moments



Re: About exporting

2021-03-30 Thread Juan Manuel MacĂ­as
Eric S Fraga  writes:

> On Tuesday, 30 Mar 2021 at 09:06, Tim Cross wrote:
>> The trick with Latex is to go with the flow, not against it. 
>
> +1
>
> This is the first thing I tell my students.  LaTeX knows much much more
> about how to make documents look good than any of us ever will.

If you don't know anything about typography, perhaps it is preferable to
let LaTeX do its work. With the standard classes (or non-standard ones,
like Koma) and a few packages the result it will always be better than
in a Word-style word processor. For example, TeX justifies paragraphs in
a very more intelligent way, understanding the paragraph as a whole, and
not line by line, as word processors do. In fact, the Plass-Knuth
algorithm (see:
http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf) from TeX was
implemented by Adobe for its layout software InDesign. pdfTeX
implemented, in addition, micro-typographic features (protrusion and
expansion), based on the theories of the great German typographer
Hermann Zapf (author of typefaces such as Palatino and Optima and friend
of Donald Knuth). Those properties were picked up by LuaTeX, which in
turn picked up the legacy of a TeX experimental variant (that I
used quite a bit in the early 2000), Omega, later Aleph.

So, yes, you can get very high-quality documents using LaTeX. And there
is also ConTeXt, another TeX format with a radically different
conception compared to LaTeX, more monolithic and, in certain aspects,
more avant-garde. But that does not mean that LaTeX, used as is, produce
a typographically finished result. LaTeX is the means, not the end. Of
course, through packages we can adjust many things at a high level. An
obvious example is the geometry package, but to establish good page
dimensions you have to know what you are doing... But other things can
only be adjusted by hand, visually, unless someday some AI comes to do
that job ;-)

A very typical example: the \raggedbottom option is almost never
acceptable in a book. The \flushbottom option requires that the height
of the composition box is a multiple of the line spacing. TeX also does
very good work with the vertical stretch gaps (glues), but we also want
to modify them depending on the chosen font, the main text body, etc.
And a penalty of widow and orphan lines will also be desirable. There
are many ways to do it (including packages), but the simplest is to add
a couple of TeX primitives to the preamble, with these values:

\widowpenalty=1
\clubpenalty=1

But if we have penalized widows or orphans we will get pages that have
one line less, *unacceptable* in a book. That we will have to fix
manually, probably adding a line to the paragraph (\looseness=1), but it
will depend on the context. If we use LuaTeX we can apply things like
the ones discussed in this thread:
https://tex.stackexchange.com/questions/372062/paragraph-callback-to-help-with-widows-orphans-hand-tuning

There are, in short, many things in a 'standard' LaTeX document that
require fine adjustment. Packages like lua-typo or impnattypo are
helpful in this regard. But some typography skills are required. Of
course, this knowledge is accessible to everyone. There are so many
bibliography, but I would highly recommend the writings of Stanley
Morison, author of the Times Roman and a great theorist of the modern
typography. Of course, as for TeX, the TeX Book is always an almost
obligatory (and exciting) read :-)

Best regards,

Juan Manuel 



Re: About exporting

2021-03-30 Thread Eric S Fraga
On Tuesday, 30 Mar 2021 at 10:13, Detlef Steuer wrote:
> Btw. I had do deliver rtf recently. Is there any documented way to generate
> rtf from org? 

Two routes that I know of:
1. org -> LaTeX -> rtf using latex2rtf
2. org -> odt -> rtf by saving as that format in LibreOffice.
Pandoc may have similar, of course.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-254-g37749c



Re: About exporting

2021-03-30 Thread Eric S Fraga
On Tuesday, 30 Mar 2021 at 09:01, Colin Baxter wrote:
> Very true. Unfortunately, you also have to "go with the flow" with the
> publishers who insist on receiving a docx file. 

I'm lucky in that the vast majority of the journals I deal with accept
(and prefer) LaTeX.

> Thankfully there's pandoc, but it's an annoying waste of time having
> to convert from LaTeX to some dreadful docx.

Yes.  I have had to do this a few times.  Pandoc is very useful although
even org's ODT export has often been good enough with some followup
editing in LibreOffice.  But I hate having to do anything in a word
processor...

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.4-254-g37749c



Re: About exporting

2021-03-30 Thread Detlef Steuer
Am Tue, 30 Mar 2021 09:01:33 +0100
schrieb Colin Baxter :

> Very true. Unfortunately, you also have to "go with the flow" with the
> publishers who insist on receiving a docx file. Thankfully there's
> pandoc, but it's an annoying waste of time having to convert from
> LaTeX to some dreadful docx.

Yeah.

Btw. I had do deliver rtf recently. Is there any documented way to generate
rtf from org? A quick search did not turn up an ox-rtf or similar. Does any
of you have experience with generating rtf?

Detlef



Re: About exporting

2021-03-30 Thread Colin Baxter
> Eric S Fraga  writes:

> On Tuesday, 30 Mar 2021 at 09:06, Tim Cross wrote:
>> The trick with Latex is to go with the flow, not against it.

> +1

> This is the first thing I tell my students.  LaTeX knows much much
> more about how to make documents look good than any of us ever
> will.

Very true. Unfortunately, you also have to "go with the flow" with the
publishers who insist on receiving a docx file. Thankfully there's
pandoc, but it's an annoying waste of time having to convert from LaTeX
to some dreadful docx.

Best wishes,

Colin.