emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
@ 2019-11-02 13:01 Alain.Cochard
  2019-11-03 13:50 ` Fraga, Eric
  0 siblings, 1 reply; 9+ messages in thread
From: Alain.Cochard @ 2019-11-02 13:01 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: emacs-orgmode, Alain.Cochard

Fraga, Eric writes on Wed 30 Oct 2019 14:55:

 > [...] for a number of reasons including advice from this list, I
 > have moved away from inline tasks almost completely and now use
 > drawers instead.

As far as I can see, the last discussion about that on the list
occurred in April 2018 (starting with message
https://lists.gnu.org/archive/html/emacs-orgmode/2018-04/msg00235.html).

My understanding then was that there was a significant wish from
prominent Org developers and/or users to preserve inline tasks in some
form, with a decent implementation.  So, if I am not sure what
"advice" you have in mind, I certainly do observe that my hope of some
near future progress has not been fulfilled so far :-)

I wouldn't mind using drawers instead, though, hence avoiding all the
problems tied to current inline tasks, but can I?  You said at that
time that my use of inline tasks was appropriate whereas drawers would
not be.  You also said that you had "already moved to using drawers
for a large number of [your] inline task use cases, the ones that
weren't really tasks!".  Is this consistent with your "almost
completely" above?  This leads me to the question of what precisely
_defines_ a "task"; what is important to me is that such inline
"stuff" has an equivalent of the TODO keyword, and an equivalent of
tags for searching, both being integrated transparently with regular
TODOs and tags.

If you (or someone else) can show me how to perform this, I'll start
the switch immediately!

Regards

-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-02 13:01 How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?] Alain.Cochard
@ 2019-11-03 13:50 ` Fraga, Eric
  2019-11-04 20:14   ` John Kitchin
  0 siblings, 1 reply; 9+ messages in thread
From: Fraga, Eric @ 2019-11-03 13:50 UTC (permalink / raw)
  To: Alain.Cochard; +Cc: emacs-orgmode

On Saturday,  2 Nov 2019 at 14:01, Alain.Cochard@unistra.fr wrote:
> You also said that you had "already moved to using drawers for a large
> number of [your] inline task use cases, the ones that weren't really
> tasks!".  Is this consistent with your "almost completely" above?
> This leads me to the question of what precisely _defines_ a "task";

Good question!  I guess, for me, a task is one that will appear in my
agenda so has a TODO state (possibly) and/or scheduling/deadline
information.  But the distinction is rather blurry.

So, in fact, when I am working on a long document, I have tasks of the
"must improve this section" type which are not tasks for scheduling (the
whole document is itself a task) or "notes" for processing later (by
myself or by others involved in the same document).  I use drawers for
these types of activities.  I then use the export formatting options to
make the pseudo-tasks and notes appear differently in the exported
output, whether for sharing or for printing/display.  So, for instance,
I look for ":todo:" and ":note:" drawers.

If the document I am working on is a coursework or test, I use drawers
for storing the solutions, e.g. a drawer called ":solution:"!  For this,
for instance, I have the following elisp in the document that is invoked
when I open the document:

#+begin_src emacs-lisp
  (setq-local org-latex-format-drawer-function
              (lambda (name contents)
                (cond ((string= name "solution")
                       (format "\\begin{mdframed}\\paragraph{Solution.} %s\\end{mdframed}" contents))
                      (t (format "\\textbf{%s}: %s" name contents))
                      )))
#+end_src 

together with

#+latex_header: \usepackage[backgroundcolor=yellow!10!white]{mdframed}

to make the solution stand out clearly.

The nice thing about drawers is I can turn them on or off for exporting
via the "d:" document option:

HTH,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-03 13:50 ` Fraga, Eric
@ 2019-11-04 20:14   ` John Kitchin
  2019-11-04 20:30     ` Samuel Wales
  2019-11-05  8:59     ` Fraga, Eric
  0 siblings, 2 replies; 9+ messages in thread
From: John Kitchin @ 2019-11-04 20:14 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Alain.Cochard

I have been exploring the use of something I call editmarks for this
(https://github.com/jkitchin/scimax/blob/master/scimax-editmarks.org).
They are light-weight markups I usually use for commenting org
documents, and they look like this.

{>~ @jk this is a comment~<}

{>*This is a task*<}

with the minor mode enabled, these are syntax highlighted, and when I
export a document they come out as todo notes in latex. I can run a
command to see a list of all of these in a document, and for a big
document like a proposal or report, there would be none at the end when
it is done.

It is a work in progress, and probably the 3rd such annotation solution
I have tried. It is the best so far though, and I feel is pretty close
to what I want.


Fraga, Eric <e.fraga@ucl.ac.uk> writes:

> On Saturday,  2 Nov 2019 at 14:01, Alain.Cochard@unistra.fr wrote:
>> You also said that you had "already moved to using drawers for a large
>> number of [your] inline task use cases, the ones that weren't really
>> tasks!".  Is this consistent with your "almost completely" above?
>> This leads me to the question of what precisely _defines_ a "task";
>
> Good question!  I guess, for me, a task is one that will appear in my
> agenda so has a TODO state (possibly) and/or scheduling/deadline
> information.  But the distinction is rather blurry.
>
> So, in fact, when I am working on a long document, I have tasks of the
> "must improve this section" type which are not tasks for scheduling (the
> whole document is itself a task) or "notes" for processing later (by
> myself or by others involved in the same document).  I use drawers for
> these types of activities.  I then use the export formatting options to
> make the pseudo-tasks and notes appear differently in the exported
> output, whether for sharing or for printing/display.  So, for instance,
> I look for ":todo:" and ":note:" drawers.
>
> If the document I am working on is a coursework or test, I use drawers
> for storing the solutions, e.g. a drawer called ":solution:"!  For this,
> for instance, I have the following elisp in the document that is invoked
> when I open the document:
>
> #+begin_src emacs-lisp
>   (setq-local org-latex-format-drawer-function
>               (lambda (name contents)
>                 (cond ((string= name "solution")
>                        (format "\\begin{mdframed}\\paragraph{Solution.} %s\\end{mdframed}" contents))
>                       (t (format "\\textbf{%s}: %s" name contents))
>                       )))
> #+end_src
>
> together with
>
> #+latex_header: \usepackage[backgroundcolor=yellow!10!white]{mdframed}
>
> to make the solution stand out clearly.
>
> The nice thing about drawers is I can turn them on or off for exporting
> via the "d:" document option:
>
> HTH,
> eric


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-04 20:14   ` John Kitchin
@ 2019-11-04 20:30     ` Samuel Wales
  2019-11-05  8:59     ` Fraga, Eric
  1 sibling, 0 replies; 9+ messages in thread
From: Samuel Wales @ 2019-11-04 20:30 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode, Alain.Cochard

i use comments, sometimes with self-highlighted /emphasis/ or
self-highlighted fixme, or demote to a standard "x" task and use tasks
one level above.

if it is exportable, then i use non-task entries as the thing to
export and do not export any tasks.  this works pertty well.

on rare occasions i use inline tasks, but i have not gotten used tot
hem.  a long time ago, i catalogued a bunch ofthings needing fixing in
inline tasks tomaket hem more complete as an org feture, but couldn't
fix them so didn't post.

i guess i sort of didn't develop the habit becuase i didnt' remember
which features can be relied on.  maybe they have all been fixed by
now.  idk.


On 11/4/19, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> I have been exploring the use of something I call editmarks for this
> (https://github.com/jkitchin/scimax/blob/master/scimax-editmarks.org).
> They are light-weight markups I usually use for commenting org
> documents, and they look like this.
>
> {>~ @jk this is a comment~<}
>
> {>*This is a task*<}
>
> with the minor mode enabled, these are syntax highlighted, and when I
> export a document they come out as todo notes in latex. I can run a
> command to see a list of all of these in a document, and for a big
> document like a proposal or report, there would be none at the end when
> it is done.
>
> It is a work in progress, and probably the 3rd such annotation solution
> I have tried. It is the best so far though, and I feel is pretty close
> to what I want.
>
>
> Fraga, Eric <e.fraga@ucl.ac.uk> writes:
>
>> On Saturday,  2 Nov 2019 at 14:01, Alain.Cochard@unistra.fr wrote:
>>> You also said that you had "already moved to using drawers for a large
>>> number of [your] inline task use cases, the ones that weren't really
>>> tasks!".  Is this consistent with your "almost completely" above?
>>> This leads me to the question of what precisely _defines_ a "task";
>>
>> Good question!  I guess, for me, a task is one that will appear in my
>> agenda so has a TODO state (possibly) and/or scheduling/deadline
>> information.  But the distinction is rather blurry.
>>
>> So, in fact, when I am working on a long document, I have tasks of the
>> "must improve this section" type which are not tasks for scheduling (the
>> whole document is itself a task) or "notes" for processing later (by
>> myself or by others involved in the same document).  I use drawers for
>> these types of activities.  I then use the export formatting options to
>> make the pseudo-tasks and notes appear differently in the exported
>> output, whether for sharing or for printing/display.  So, for instance,
>> I look for ":todo:" and ":note:" drawers.
>>
>> If the document I am working on is a coursework or test, I use drawers
>> for storing the solutions, e.g. a drawer called ":solution:"!  For this,
>> for instance, I have the following elisp in the document that is invoked
>> when I open the document:
>>
>> #+begin_src emacs-lisp
>>   (setq-local org-latex-format-drawer-function
>>               (lambda (name contents)
>>                 (cond ((string= name "solution")
>>                        (format "\\begin{mdframed}\\paragraph{Solution.}
>> %s\\end{mdframed}" contents))
>>                       (t (format "\\textbf{%s}: %s" name contents))
>>                       )))
>> #+end_src
>>
>> together with
>>
>> #+latex_header: \usepackage[backgroundcolor=yellow!10!white]{mdframed}
>>
>> to make the solution stand out clearly.
>>
>> The nice thing about drawers is I can turn them on or off for exporting
>> via the "d:" document option:
>>
>> HTH,
>> eric
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>


-- 
The Kafka Pandemic

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-04 20:14   ` John Kitchin
  2019-11-04 20:30     ` Samuel Wales
@ 2019-11-05  8:59     ` Fraga, Eric
  2019-11-05 12:49       ` John Kitchin
  1 sibling, 1 reply; 9+ messages in thread
From: Fraga, Eric @ 2019-11-05  8:59 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode, Alain.Cochard

On Monday,  4 Nov 2019 at 15:14, John Kitchin wrote:
> I have been exploring the use of something I call editmarks for this

Out of curiousity, what do these give you that drawers would not?  I use
:todo: and :note: drawers.

For syntax highlighting, I use hi-lock-mode with, for instance, this
pattern to highlight todo drawers:

# Hi-lock: (("^:todo:" (0 'hi-yellow prepend)))

thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-05  8:59     ` Fraga, Eric
@ 2019-11-05 12:49       ` John Kitchin
  2019-11-05 13:07         ` Fraga, Eric
  0 siblings, 1 reply; 9+ messages in thread
From: John Kitchin @ 2019-11-05 12:49 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: emacs-orgmode, Alain.Cochard

I use it when editing papers mostly. The main difference is I can put
them inline {>~ @jk here is a comment.~<} in a paragraph. I use them to
mark {>.tpyos.<}, text for {>-deletion-<} removal, or {>+insertion+<},
{y>highlighted text <y}, etc. There is some reasonable export code for
these in html and latex. They are like a generalization of an org-link
in a sexp like form, so you can include metadata like an author name, or
other things.

These have a track change kind of functionality (that turns out to be
quite hard to fully replicate) so you can accept or reject each
editmark. Similar to org-links, each editmark can have a variety of
other actions, e.g. a typo has an action to spell check it, and a
file/audio mark can open or play the file.

I also have some diff functions to generate diffs with these markups
from versions of files, including git versions for integration latex
diff, etc.

It does most of what I want well now, but there are still some corners I
don't go into where it doesn't do exactly everything yet, or where I
haven't tested it very fully (e.g. the diffs).


Fraga, Eric <e.fraga@ucl.ac.uk> writes:

> On Monday,  4 Nov 2019 at 15:14, John Kitchin wrote:
>> I have been exploring the use of something I call editmarks for this
>
> Out of curiousity, what do these give you that drawers would not?  I use
> :todo: and :note: drawers.
>
> For syntax highlighting, I use hi-lock-mode with, for instance, this
> pattern to highlight todo drawers:
>
> # Hi-lock: (("^:todo:" (0 'hi-yellow prepend)))
>
> thanks,
> eric


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-05 12:49       ` John Kitchin
@ 2019-11-05 13:07         ` Fraga, Eric
  2019-11-05 13:28           ` John Kitchin
  0 siblings, 1 reply; 9+ messages in thread
From: Fraga, Eric @ 2019-11-05 13:07 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode, Alain.Cochard

On Tuesday,  5 Nov 2019 at 07:49, John Kitchin wrote:
> I use it when editing papers mostly. The main difference is I can put
> them inline {>~ @jk here is a comment.~<} in a paragraph. 

Very interesting.  The inline aspect can be quite useful.  Thanks for
the description!

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-05 13:07         ` Fraga, Eric
@ 2019-11-05 13:28           ` John Kitchin
  2019-11-05 13:45             ` Fraga, Eric
  0 siblings, 1 reply; 9+ messages in thread
From: John Kitchin @ 2019-11-05 13:28 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: emacs-orgmode, Alain.Cochard

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

The other aspects I find very useful are: 1) there is a display list so I
can see all the editmarks and jump to them. That way, in a proposal for
example I can see if there are any residual marks that should be removed.
2) when I make a pdf, they are converted to a list of todo items at the
front, and as margin notes. This reminds me that they are there, and is
useful for non-org users to see what I need and where.

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Tue, Nov 5, 2019 at 8:07 AM Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> On Tuesday,  5 Nov 2019 at 07:49, John Kitchin wrote:
> > I use it when editing papers mostly. The main difference is I can put
> > them inline {>~ @jk here is a comment.~<} in a paragraph.
>
> Very interesting.  The inline aspect can be quite useful.  Thanks for
> the description!
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
>

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

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

* Re: How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?]
  2019-11-05 13:28           ` John Kitchin
@ 2019-11-05 13:45             ` Fraga, Eric
  0 siblings, 0 replies; 9+ messages in thread
From: Fraga, Eric @ 2019-11-05 13:45 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode, Alain.Cochard

Again, very impressive.

I do some of this with drawers but there could indeed be much more
support built-in for such aspects.  Navigating drawers in org mode
should be easier.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78

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

end of thread, other threads:[~2019-11-05 13:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-02 13:01 How to move from inline tasks to drawers? [was: How to change the width of a latex exported inlinetask?] Alain.Cochard
2019-11-03 13:50 ` Fraga, Eric
2019-11-04 20:14   ` John Kitchin
2019-11-04 20:30     ` Samuel Wales
2019-11-05  8:59     ` Fraga, Eric
2019-11-05 12:49       ` John Kitchin
2019-11-05 13:07         ` Fraga, Eric
2019-11-05 13:28           ` John Kitchin
2019-11-05 13:45             ` Fraga, Eric

Code repositories for project(s) associated with this 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).