Re: Checkbox dependencies - Discern between DONE and CANCELED

2021-09-15 Thread Christoph Groth
Nathan Neff wrote in August 2019:

> I have org-enforce-todo-checkbox-dependencies set to t, and I would
> like to simply mark some tasks as canceled without needing to mess
> with the checkboxes.
> 
> I can press C-u C-u C-u C-c C-t which will override dependencies.
> However, I was wondering if there's a way for org-mode to
> automatically not enforce checkbox dependencies when canceling
> a parent task?

I just stumbled over this as well and I wonder whether someone has found
a solution by now.

One way would be to inhibit the check when passing to the canceled
state.  Another way would be not to count CANCELED among the done
states, but to inhibit it being displayed in the agenda.  I am unsure
which approach would be preferable philosophically.

Thanks
Christoph



orgmode and electric-quote-mode

2020-01-08 Thread Christoph Groth
Hello,

On Emacs 26, I like to enable electric-quote-mode.  That provides me
“proper quotes” when writing text.

Org files are mostly text, so it’s nice that electric-quote-mode is
active there as well.  However, there can be source code blocks where
I would like the “electric” functionality disabled (just like in
programming modes it is enabled only for the comments).

Has anyone found a solution to this problem already?

Thanks
Christoph



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Christoph Groth
Nicolas Goaziou wrote:
> Christoph Groth  writes:
>
> > I understand now that Org does what it should.  However, I find this
> > behavior quite dangerous.  It caught me after more than 10 years of
> > using Org.  If there's a list of long-term issues with Org
> > somewhere, this problem may deserve being added to it.
>
> I don't think there is much to fix here. In any case, the command
> `org-lint' warns you about this kind of error.

Thanks for mentioning 'org-lint'.  I just ran it on my agenda files, and
it found multiple errors in most of my (very long) files.  So at least
for me (and likely for other Org users as well), the risk of missing
TODO items is real - that's a rather serious problem for a task manager!

My agenda files are populated using 'org-capture'.  Do you have
suggestions how to best integrate org-lint transparently into everyday
org usage?  For example, files could be linted automatically before they
are saved, or before a new item is captured.



Re: [O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Christoph Groth
Nicolas Goaziou wrote:

> Planning information (SCHEDULED, DEADLINE and CLOSED keywords) must
> appear right after the headline, per Org syntax. This is specified at
> the first paragraph in (info "(org) Deadlines and Scheduling").
>
> Elswhere, only the timestamp is meaningful to Org.

Thanks for the quick clarification!  I didn't see the relevant line in
the documentation since my Emacs from Debian shows only the info
documentation for the (outdated) Org that is bundled with Emacs [1].

I understand now that Org does what it should.  However, I find this
behavior quite dangerous.  It caught me after more than 10 years of
using Org.  If there's a list of long-term issues with Org somewhere,
this problem may deserve being added to it.

Cheers
Christoph

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=725408



[O] Bug? SCHEDULED lines treated differently when text precedes them

2019-09-05 Thread Christoph Groth
Dear org mode experts,

I have noticed the following behavior that (after reading the relevant
documentation) I find at least surprising and error-prone.

With Org 9.2.3, the following two TODO items behave differently:

** TODO Something
blabla
SCHEDULED: <2019-09-01 Sun>
[2019-09-05 Thu 14:39]
** TODO Something else
SCHEDULED: <2019-09-01 Sun>
foobar
[2019-09-05 Thu 14:40]

The first one behaves as expected, i.e. it appears in today's
(2019-09-05) agenda, since it's not done yet.

The second one does appear in today's agenda, but it is visible for the
day 2019-09-01.

Is this behavior by design?  If yes, could someone please explain the
rationale or point me to relevant documentation or discussions?

Thanks!
Christoph



Re: [O] Temporarily setting agenda files list, cleaning up

2019-05-28 Thread Christoph Groth
Many thanks to John and Thomas for their suggestions! 

Thomas Plass wrote:

> This will use a private set of 'org-agenda-files and kill their
> buffers after executing `org-agenda-list':
>
> (...)

This function is a very good prototype of what I had in mind.  The
details like it closing buffers that were already open before do not
matter for now.  (John's post offers a solution to this particular
problem.)  I replaced the call to org-agenda-list with one to
org-agenda, in order to get the full thing, and this works.

The prototype reveals a problem with the approach: if the buffers with
the agenda files are closed immediately (to avoid cluttering the buffer
list with possibly hundreds of buffers), most of the agenda
functionality no longer works.  It's not possible to jump to entries,
reschedule them, etc.

I guess that modifying orgmode so that agenda buffers open files as
needed would by rather complicated.  The simpler alternative should be
to keep the buffers open and only kill them when the associated agenda
buffer itself gets killed.

I suppose that this can be done by using kill-buffer-hook.  It seems
that the buffer killing can be made smarter by storing the
buffer-modified-tick at the time of the agenda construction for all the
buffers that are to be closed.  This information can then be used later
to only kill buffers that haven't been touched since.  Ideally, one
should also check whether it is still the *same* buffer, because it
might have been closed and reopened on purpose by the user.  (I have no
good idea how to check for that, other than storing opening times of org
buffers using some hook and using that.)

By the way, the function directory-files-recursively takes 1.5 s to
search my (huge) work directory for org files.  Using
shell-command-to-string to launch the 'find' shell command takes only
0.2 s.

Christoph


signature.asc
Description: PGP signature


[O] Temporarily setting agenda files list, cleaning up

2019-05-27 Thread Christoph Groth
Hello,

I would like to expand my use of Org for notes, and to this end spread
project-specific org files across my home directory (currently I'm using
a central directory with one agenda file per year).  For obvious
reasons, I can't possibly include all these org files in
org-agenda-files permanently and have them open in Emacs all the time.

Instead, I'm thinking of a setup as follows: I'll reserve
org-agenda-files for active projects only.  But there will be many other
org files (for projects that are finished or dormant, general notes,
etc.), that I would like to be able to search as well.

I saw that some people have solved this problem with a custom search
solution, even using a database [1], but I think that for my purposes a
simpler solution mostly using Org's built-in functionality will do.  I'm
also aware of org-agenda-text-search-extra-files, keeping all my extra
files there is not satisfactory, because the search possibilities are
limited (and otherwise it poses the same questions that I will ask
further below).

Instead, I imagine a custom Emacs command to launch an agenda with
org-agenda-files that is temporarily set to a list of files that depends
on the current context.  For starters, this list could contain all the
org files under the current directory:

(split-string (shell-command-to-string "find `pwd`/* -name '*.org' -type f") 
"\n" t)

This way, I could easily explore the org files that belong to specific
subsets of my activities and interests.  I could also search *all* my
notes, when needed (for now the time this takes should not be a
problem).

I wonder if anyone has tried a similar setup and would be willing to
share his experience and ideas.  Specifically, I wonder about the
following points:

* Do you see any obvious problems with the above idea?

* In Elisp, what is the best way to temporarily set org-agenda-files and
  later reset it back to the standard value?

* How to automatically close unneeded org buffers that were opened for
  the temporarily agenda?  The command org-agenda-exit is not
  satisfactory, because it also kills the buffers that one has just
  found due to the search, and also it's not automatic.  Perhaps one
  could close the buffers immediately once the agenda view has been
  created?

Thanks
Christoph

[1] 
https://kitchingroup.cheme.cmu.edu/blog/2017/01/03/Find-stuff-in-org-mode-anywhere/


signature.asc
Description: PGP signature


[O] Bug: Capturing an entry without final endline modifies heading structure [9.1.14 (9.1.14-dist @ /usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)]

2018-09-02 Thread Christoph Groth
Hello,

I'm using org's capture functionality to file new entries for my agenda.
I noticed a problem when capturing entries to be placed in the middle of
a file (for example, I have a subtree for "notes" that comes before
"miscellaneous"): when the captured text ends without a trailing endline
character, it will be inserted as such into the org file and thus modify
the overall heading structure.  For example, inserting a note may lead
to the following situation:

** Note without trailing endline
[2018-09-02 Sun 13:10]
example text* miscellaneous

IMHO this qualifies as a bug, because it's easy to accidentally corrupt
the heading structure of a file.

Cheers,
Christoph

Emacs  : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-11, modified by Debian
Package: Org mode version 9.1.14 (9.1.14-dist @ 
/usr/share/emacs/25.2/site-lisp/elpa/org-9.1.11/)

current state (relevant excerpt):

(setq
 org-capture-templates '(("u" "unscheduled" entry
  (file+headline "" "miscellaneous") "* TODO %?\n%U")
 ("U" "" entry (file+headline "" "miscellaneous")
  "* TODO %?\n%a\n%U")
 ("s" "scheduled" entry
  (file+headline "" "miscellaneous")
  "* TODO %?\nSCHEDULED: %^t\n%U")
 ("S" "" entry (file+headline "" "miscellaneous")
  "* TODO %?\nSCHEDULED: %^t\n%a\n%U")
 ("m" "maybe" entry (file+headline "" "miscellaneous")
  "* MAYBE %?\n%U")
 ("M" "" entry (file+headline "" "miscellaneous")
  "* MAYBE %?\n%a\n%U")
 ("d" "deadline" entry
  (file+headline "" "miscellaneous")
  "* TODO %?\nDEADLINE: %^t\n%U")
 ("D" "" entry (file+headline "" "miscellaneous")
  "* TODO %?\nDEADLINE: %^t\n%a\n%U")
 ("a" "appointment" entry
  (file+headline "" "miscellaneous") "* %?\n%^t\n%U")
 ("A" "" entry (file+headline "" "miscellaneous")
  "* %?\n%^t\n%a\n%U")
 ("r" "reply" entry (file+headline "" "miscellaneous")
  "* TODO Reply to %:fromname%?\nSCHEDULED: 
%^t\n%a\n%U")
 ("n" "note" entry (file+headline "" "notes")
  "* %?\n%U")
 ("i" "interruption" entry
  (file+headline "" "interruptions") "* %? :work:\n%U"
  :clock-in t :clock-resume t)
 )
 )



Re: [O] [Orgmode] Slow speed of week and month views

2017-08-04 Thread Christoph Groth

Carsten Dominik wrote in 2010:

I am afraid I don't see any major speed improvements that could 
make this happen. Yes, one could parse all the files once, build 
a table in memory and get the entries for each day from there - 
but that comes down to a complete rewrite of the parser, maybe 
even to switching to an internal representation model for 
Org-mode.



I don't see that happening, I am afraid.


Computing the agenda month view takes 20 seconds in my case. 
That's perhaps the most serious problem with orgmode as I (and I 
suppose others as well) use it.  It would be great if this issue 
could be solved after all.


Would it be really so difficult to do?  The actual parsing seems 
to be done in the function org-agenda-get-day-entries as called by 
org-agenda-list.  Inside org-agenda-get-day-entries the crucial 
bit seems to be (org-agenda-today-p date).  If that bit got 
replaced by something that matches more than a single day, 
wouldn't this mostly do the trick?


This is much easier than "rewriting the parser", so it seems that 
I'm overlooking some problems.




Re: [O] Keeping metadata/notes about files and directories

2014-09-23 Thread Christoph Groth
Darlan Cavalcante Moreira wrote:

> See the custom commands for the agenda in the manual. You can create a
> command to do a search in specific files.

Indeed!  That’s great, I didn’t know that this is possible.  The custom
agenda commands of type “search” also support more complex searches like
“-{author:.*burkov} semimetal”.  This solves my searching problem rather
well.

Does org mode support such advanced searches also in other places?  It
doesn’t seem to be possible for “sparse tree” views of a single file.

> Of course you would need to change this custom command definition if
> you add more files, but with the idea of using one file per year from
> the other thread that means updating the custom command only once an
> year.

This is no problem at all, it could be even automatized.

> I didn't test this so see how searching in all of these files scale
> when compared to searching in one big file, but I imagine it would be
> faster.

If speed ever becomes a problem, I’ll see what can be done about it.




[O] Keeping metadata/notes about files and directories

2014-09-23 Thread Christoph Groth

Dear all,

I just wrote under the subject “Re: Managing articles in org mode 
and collaboration”.  This posting puts the other one in a broader 
context.


While thinking about organizing articles, I asked myself: Wouldn’t 
it be useful to keep metadata/notes about *various* kinds of 
files/sub-directories/projects inside org-mode (or something 
similar)?


One example is a collection of programming projects.  Just like 
for articles, it would be useful to add notes and metadata to each 
project.  The same is true for many other archive-like collections 
of things that grow over time.  The same problems appear as 
described in the other posting (namely scaling and searching).


I know that there have been discussions about this in the past, 
and I know that there’s org-annotate-file.  Is there anyone who 
uses a scheme like this (for >1000 items, say) in practice?


Christoph




Re: [O] Managing articles in orgmode and collaboration

2014-09-23 Thread Christoph Groth

Jorge A. Alfaro-Murillo wrote:

Perhaps I am biased because I learned LaTeX and BibTeX before 
Org, but I think that for references BibTeX (plus a little bit 
of emacs configuration) has everything I could need. I guess if 
you are more used to Org, it might be worth to invest time and 
come up with a org-based solution. Please keep us posted, I find 
this a very interesting thread.


This is an update about my experiments so far.  Please comment! 
This is my current setup:


All the articles (mostly PDF files) are kept in one directory. 
There’s also an index.org file in there with headlines like this


--8<---cut here---start->8---
** 
  [[file:vazifeh13-electromagnetic_response_weyl.pdf][Electromagnetic 
  Response of Weyl Semimetals]]

:PROPERTIES:
:TITLE:Electromagnetic Response of Weyl Semimetals
:BTYPE:article
:ID:   vazifeh13-electromagnetic_response_weyl
:AUTHOR:   Vazifeh, M. M. and Franz, M.
:JOURNAL:  Phys. Rev. Lett.
(…)
:END:
Some comments/notes with links and in-line formulas.
--8<---cut here---end--->8---

These entries are created by org-bibtex-yank, Emacs’ bibtex is 
configured to generate the unique IDs (authorYY-three_first_words 
should be sufficiently unique in practice).


This setup works pretty well:

- Adding new articles is easy (there's still ample room for 
 improvement).
- Opening associated the associated article files and other links 
 works well.
- It’s easy to add notes (with in-line maths!) and do simple 
 searches.
- Linking from and to other org files (agenda, project-specific 
 notes) is possible.
- Additional attachment files (e.g. whiteboard photos from a 
 discussion) can added with org-attach.
- org-bibtex provides support to put entries into project-specific 
 bibtex files (org-bibtex-export-to-kill-ring).
- Thanks to the non-random unique IDs, it’s possible to jump to 
 articles in the library from references in latex files, even if 
 the key scheme in the latex file differs from the one used in 
 index.org.


But not all is good:

- Scaling: Some simple tests seem to indicate that org mode 
 becomes too sluggish with files of about 50k lines.  This is a 
 dimension that could be easily reached over 10 years if the file 
 grows by 20 lines per day on average.  This is not a problem in 
 the beginning, but if the scheme does not scale to a few 
 thousand entries, this renders the whole idea way less 
 interesting.


- More advanced searching is lacking: AFAIK org mode currently 
 does not support searching for articles of a given author that 
 also contain a given keyword in the notes.


Any insights about these two problems?  Perhaps the scaling could 
be managed by splitting index.org into several files (by year for 
example).  But how to search then?  It's probably not a good idea 
to add all the bibliography org-files into the agenda.  (Is there 
a way to have a secondary list of agenda files?)  Perhaps the 
solution for both problems would be to write a fast commandline 
query tool for such org-databases?  The tool could even use a fast 
cache if necessary.





Re: [O] Cooperating with oneself using the cloud?

2014-09-22 Thread Christoph Groth
If at least one of your computers can be reached from all the others via
ssh, or you can reach all the other computers from one (i.e. there’s a
star topology), you could use unison to synchronize all kinds of files.
This works very reliably and handles modifications in both directions.

I use git for my programming projects, but I find that version control
is not really ideal for simple file synchronization.  This is why I
think that DVCs (and specifically git) are not a good solution for sync
(In case that someone is interested in a discussion of these things):

Keeping everything in a single repo is not handy, and solutions (like
“myrepos”) are kludges.  Another serious problem with using git for
synchronization is that it’s not able to synchronize git repositories,
as AFAIK it’s not possible/reasonable to keep git repositories under git
themselves.  Just imagine the case where you are in the middle of some
work with a git repo (an interactive rebase, for example), and you’d
like to sync and continue on another machine.

With unison this works like a charm, you there’s no automatic resolution
of conflicts.  This is not a problem if you run unison at the beginning
and at the end of each session.




Re: [O] Managing articles in orgmode and collaboration

2014-09-10 Thread Christoph Groth
Jorge A. Alfaro-Murillo wrote:

> Thomas S. Dye writes: 
>
>> I don't manage my bibliography references in Org mode.  I am used to
>> managing a bibtex database and have never found the need to move
>> everything to Org.
>
> Same here.

My motivation for keeping bibliography in org was to keep all local
information about a paper (including notes and comments) in one place.
This should make it easier to find it.

Meanwhile I found org-bibtex.  It seems to implement just what I had in
mind and is even included in orgmode by default.  The following function
can be used to save a org-bibtex headline into the kill-ring in bib
format, so that it can be yanked into a project-specific .bib-file:

(defun my-org-bibtex-kill-ring-save-headline ()
  (interactive)
  (kill-new (org-bibtex-headline)))

>> Either a separate bibtex file for each article, or separate bibtex
>> files for each co-author.
>
> Or better do both...
>
> #+BEGIN_SRC latex 
>   \bibliography{/home/you/references/articles.bib}
>   % \bibliography{/home/collaborator_1/references/articles.bib}
>   % \bibliography{/home/collaborator_2/references/articles.bib}
>   ...
>   \bibliography{references}
>  
> #+END_SRC
>
> When a collaborator_i is working on the file she/he comments the first
> line and uncomments the i-th line AND everybody runs
> reftex-create-bibtex-file (or copy paste the new references for the
> unfortunate non-emacs user) after adding new references and finishing
> editing. Everybody shares a current version of the .tex file and the
> references.bib file.

I like to keep papers under version control, and the commenting that you
suggest does not seem to fit this way of working very well.




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Christoph Groth
Thorsten Jolitz wrote:

> do you have a function that automatically fetches bibtex entries for
> books from the web, given some info (title, year, author or so)?

I haven’t yet started to manage literature with org mode, so I do not
have anything so far.

It’s usually easy to find BibTeX records on the web.  For books and
articles in my field (physics) google scholar works quite fine.  For
articles only, arXiv offers powerful search capabilities.

It shouldn’t be too difficult to write a “capture” function in emacs
that turns such records into entries in an org file.  That would be
automatic enough for me.




Re: [O] Managing articles in orgmode and collaboration

2014-09-09 Thread Christoph Groth

Hi again,

I’m replying to myself, as I think I’ve found a possible solution 
to my

problem.

Most publications have some kind of unique ID that can be present 
in
BibTeX: a DOI number, a ISBN, a preprint ID, or an URL.  One could 
use

one these fields as an org-id unique ID for the publication’s
org-mode-entry.  (If several such fields are present, priorities 
could

be used to choose one.)  Then, org-id can be used to find article
entries by unique ID.

This way, even if a reference has been added to a project-specific
.bib-file by a collaborator (with some label of his choice), it 
should
be possible to find the relevant org-mode-entry if the paper is 
already
anywhere in the library.  In the worst case, a missing DOI id will 
have

to be added to the .bib-file-entry.

The org entry on the article would contain links and notes.  The 
BibTeX

data could be kept in a :BIBTEX: drawer.

Any comments?

Christoph




[O] Managing articles in orgmode and collaboration

2014-09-08 Thread Christoph Groth
Hello,

I’d like to keep my library of scientific articles in orgmode, along
with notes, links to external files (mostly PDF), etc.  This has been
discussed repeatedly on this list, for example in the recent thread
http://thread.gmane.org/gmane.emacs.orgmode/78983.

Most solutions seem to be based around a central BibTeX file and take
advantage of RefTeX to navigate between citations to articles (in LaTeX
or org files), the BibTeX file, related entries in an org-file, and
linked external files.  Often the key that connects the various items is
a unique label (in LastnameYear format, for example).  This key is used
as label when citing and in BibTeX, as orgmode CUSTOM_ID, and as the
filename of an associated external file.

This seems to work well for people who have complete control over the
articles they write.  But what about articles with co-authors?  These
must be self-contained, so one needs a separate BibTeX file for each
article project.  Let’s say that a co-author adds a new reference to a
common project, but the cited paper is already in my database under a
different label.  Maybe that very paper is already cited in an older
article with different co-authors using a different \cite label?

Does anyone have a solution that handles such cases nicely?  Perhaps
something along these lines: My (own, i.e. controlled by myself) library
of articles lives in one/several org files.  Each entry there contains
links to external files, URLs, DOIs, etc. and enough information to
create a BibTeX record.  (Such entries could be generated almost
automatically from .bib files found on the internet.)  A custom Emacs
function allows to create BibTeX records for use in project-specific
.bib-files from the orgfile-entries.  Now the last missing piece is to
connect things also in the other direction: allow to jump to the related
org-entry for a paper from a \cite{} in a paper, even if the reference
has been added to the .bib file by a colleague.

This last piece is the most difficult to realize.  It would require
either a rather smart search, or a robust CUSTOM_ID (Perhaps
LastnameYearPagenr would be unique and robust enough?).

I’m interested in discussing these issues.




Re: [O] temporarily un-ignoring scheduled tasks in global todo list

2014-05-22 Thread Christoph Groth
> Christoph Groth  writes:
>
>> There doesn't seem to be an easy way to make a custom agenda view
>> that only shows todo items that are scheduled for the future.  Or am
>> I wrong?
>
> Use a TODO agenda view, and set `org-agenda-todo-ignore-scheduled' to
> past within this custom agenda view.

Thanks, the following now works as one element of
org-agenda-custom-commands:

("f" "List TODO entries scheduled for the future"
 todo ""
 ((org-agenda-todo-ignore-scheduled 'past)
  (org-agenda-skip-function
   '(org-agenda-skip-entry-if 'notscheduled

I see now that this is mentioned in Appendix 7 in the manual... With
orgmode, the problem seems to be not whether some functionality is
implemented, but where to find it.




Re: [O] temporarily un-ignoring scheduled tasks in global todo list

2014-05-22 Thread Christoph Groth
Bastien  writes:

>> There doesn't seem to be an easy way to make a custom agenda view
>> that only shows todo items that are scheduled for the future.  Or am
>> I wrong?
>
> Use a TODO agenda view, and set `org-agenda-todo-ignore-scheduled' to
> past within this custom agenda view.

This shows entries scheduled for the future together with unscheduled
entries (many in my case).  I am looking for a way to temporarily hide
the unscheduled entries.




Re: [O] temporarily un-ignoring scheduled tasks in global todo list

2014-05-21 Thread Christoph Groth
Thanks Bastien, this works!

There doesn't seem to be an easy way to make a custom agenda view that
only shows todo items that are scheduled for the future.  Or am I wrong?

Christoph




[O] temporarily un-ignoring scheduled tasks in global todo list

2014-05-20 Thread Christoph Groth
Hi,

I like to have

(setq org-agenda-todo-ignore-scheduled 'all)
(setq org-agenda-todo-ignore-deadlines 'all)
(setq org-agenda-tags-todo-honor-ignore-options t)

but sometimes I would like to search for some item that I know that is
scheduled somewhere into the future.  Or I want to verify whether some
item exists.

What would be the best way to temporarily show all tasks?  I am thinking
of writing a function that calls org-agenda with the above variables
temporarily set to the default values.  (That should be possible in
elisp, but I do not yet know how.)  Is there a better way?

Alternatively, one could always show all items in the global todo list,
but somehow mark the already scheduled ones.  Orgmode does not seem to
allow for something like this out-of-the-box, though.

Thanks,
Christoph




Re: [O] babel and long-running computations

2014-04-19 Thread Christoph Groth
Thank you, John, for your detailed reply.

> we routinely do this, in the following way. We run jobs that may take
> up to a week to finish, and they are usually run on a cluster. Our
> setup relies on the following behavior for a script.
>
> 1. you can run the script anytime you want, and it can tell the state
> of the calculation by some means. If the script has never been run
> before, it submits the job to a queue and exits. If the job is still
> in the queue, it exits, and if the job is done, it gives you the
> result.

Returning immediately with whatever state the long-running computation
is in currently seems indeed to be a good solution.  I think I will
setup something similar.  Would you share your experience on the
following issues?

- How do you interface such jobs from orgmode?  With org-babel, do
  you execute Python code, or do you run shell commands?

- Do you run your Emacs on the master node of the cluster?  Or does your
  setup involve running emacs on the machine you are working on and
  talking to the cluster over the network?

Cheers,
Christoph




Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Eric Schulte  writes:

> Currently Babel does not have support for long-running computations,
> however this feature has been discussed and there are previous
> messages on the mailing list and even some comments in the code
> outlining a potential implementation strategy.  So this may change
> if/when someone finds the time and drive to tackle the implementation.

Hmm, I searched the list archives before asking of course, but I didn’t
find any previous discussion.  Could you please provide some references?

Thanks,
Christoph




Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Thorsten Jolitz  writes:

>> I’d love to hear about any frameworks or workflows that fulfill these
>> requirements.
>
> here is a link about that topic:
>
> ,---
> | http://draketo.de/english/emacs/parallel-babel
> `---

Thanks.  I had found this one myself - this way of working does not seem
to allow to capture the results of the calculation in orgmode.

So probably a better way is to have some caching machinery in the
background.  I see that babel has built-in caching but there seems to be
no way to support dependencies.

Christoph




Re: [O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Hi Julian,

> Generally, org-babel is suited for long running computations.  Its
> caching can help you avoid rerunning code chunks.  And long runtime does
> not conflict with the idea of reproducible research, it just may be not
> very comfortable for the user.

I agree of course that it’s generally a good idea to structure the
analysis in small logical steps and to save intermediate results.  Let
me narrow down my question then: does org-babel support working with
tasks that take several minutes to execute?  By this I mean (most
important first):

- Not freezing the editor during the execution of a task
- Being able to execute multiple independent tasks in parallel
- Being able to interrupt a running task
- Being able to inspect the incomplete output of a running task

I’d love to hear about any frameworks or workflows that fulfill these
requirements.

Cheers

Christoph


PS.

I’m using ipython notebooks but I’m not happy with them because of the
freezing problem and the complete lack of isolation of tasks within a
single notebook (they live in a common mutable namespace).  I think a
useful framework must be “functional” at the highest level for caching
and dependencies to be useful.




Re: [O] total time spent on a task

2014-04-17 Thread Christoph Groth

Hi Bastien,

Thank you for looking into this.

Bastien  writes:


In fact, times were shown for the other headlines as well, but
white-on-yellow!  I've modified the org-clock-overlay so the 
problem

is now fixed for me.

Is this a bug?  (It appears for me in bleeding edge orgmode.) 
The
original org-clock-overlay only specifies the background color 
as
yellow.  How to find out from which face the white foreground 
was
inherited?  The command describe-face does not seem to help for 
this.


I can't reproduce the problem here, it probably depends on the 
Emacs

version you use.  Can you tell more about your setup?


I'm running Emacs 24.3.1 and org-mode 8.2.4, both from Debian 
testing.
By bisecting my Emacs configuration I've found out that the 
culprit is


(setq org-startup-indented t)

When indented mode is disabled, the overlays appear with brown 
text on

yellow background.  Can you reproduce this?

Christoph




[O] babel and long-running computations

2014-04-17 Thread Christoph Groth
Dear all,

I’m considering the use of org-babel for “reproducible science”.  Is
anyone successfully using org-babel for research that involves
calculations that typically take a few minutes up to several hours on a
single CPU (i.e. up to a few minutes on a cluster)?  It seems to me that
currently org-babel is not well suited for such an usage profile, but
I’d love to be taught otherwise.

Many thanks,
Christoph




Re: [O] total time spent on a task

2014-04-15 Thread Christoph Groth
Sacha Chua  writes:

> Hmm, mine shows clock overlays for all headings with clock entries,
> including TODO headings. I'm on Org 8.2.5h. By any chance, could those
> overlays have invisible text? You can customize-face
> org-clock-overlay.  I remember that had been a problem for some people
> before.

In fact, times were shown for the other headlines as well, but
white-on-yellow!  I've modified the org-clock-overlay so the problem is
now fixed for me.

Is this a bug?  (It appears for me in bleeding edge orgmode.)  The
original org-clock-overlay only specifies the background color as yellow.
How to find out from which face the white foreground was inherited?  The
command describe-face does not seem to help for this.

Christoph




Re: [O] total time spent on a task

2014-04-14 Thread Christoph Groth
Hello Sacha,

Thanks for your quick reply.

Sacha Chua  writes:

> C-c C-x C-d (org-clock-display) will show the task times as overlays
> on the headings.

That seems to be exactly what I need.  It works, but only shows times
for top-level headings (i.e. for example "miscellaneous" but not the
TODO items underneath).  Is this the way this is supposed to work?

I can see that overlays are added for all the headings that were clocked
on lower levels as well, but that overlays contain only spaces.

Best,
Christoph




[O] total time spent on a task

2014-04-14 Thread Christoph Groth
Hello,

I’m looking for a quick way to check the total time spent on a task.  I
bet I’m missing something obvious.  (I have set
org-clock-mode-line-total to today, so I do not see the total time of a
clocked-in task in the mode line.)

Many thanks,
Christoph




Re: [O] org-capture: keeping window visible during date entry

2012-07-07 Thread Christoph Groth
Samuel Wales  writes:

> On 7/7/12, Christoph Groth  wrote:
>> I would say that a proper solution would be to reserve
>> delete-other-windows for interactive use and to replace it by
>> something more sensible which ensures that a given window is well
>> visible but tries to preserve the visibility and arrangement other
>> windows if possible.  That hypothetical function could be given the
>> minimum required height for the current window.
>
> This is something that needs to be under user control.  We cannot
> force a regression on an accessibility issue.  Not all screen sizes
> are large and not all fonts are small.

My proposal is not about reducing accessibility but increasing
usability.

What's the point of deleting all the other windows to show a buffer
containing only five lines of text (a typical capture buffer) and
unlikely to grow much?  If the user wants to type a lot into the new
buffer, he can press C-x 1 himself.

By "something more sensible" I meant functionality which would do the
right thing both for small and large emacs frames.  In many cases a
reasonable minimum size for the new window to be displayed can be
estimated.

My font is actually not small and my screen typical.  Still, my emacs
frame is 70 lines high.




Re: [O] org-capture: keeping window visible during date entry

2012-07-07 Thread Christoph Groth
Eric Abrahamsen  writes:

> On Thu, Jun 14 2012, Christoph Groth wrote:

>> How to ensure that the buffer which was active when org-capture was
>> executed remains visible during date entry?

> I've had the same annoyance. The attached patch is *not* a real
> solution to the problem, as it still produces some weird windowing,
> and I have no idea if it will wreck other uses of capture, but it does
> preserve gnus windows so you can see the information you're trying to
> capture. It's at least a pointer in the right direction…

Yes, the problems are mostly due to calls to delete-other-windows which
is used quite often in org (19 times) and other emacs packages as well.

I would say that a proper solution would be to reserve
delete-other-windows for interactive use and to replace it by something
more sensible which ensures that a given window is well visible but
tries to preserve the visibility and arrangement other windows if
possible.  That hypothetical function could be given the minimum
required height for the current window.

Does anyone know of such functionality already existing anywhere in the
emacs world?  If not, I believe it would be useful to think of something
like this.  Given current screen sizes, it would be good to replace most
uses of delete-other-windows by something more gentle.  But this is a
topic for the general emacs mailing list.




[O] org-capture: keeping window visible during date entry

2012-06-14 Thread Christoph Groth
Hello,

I recently switched from remember to org's new capture facility which
seems to work fine.  However, an issue I already had with remember is
still bothering me, perhaps someone knows a good solution:

I often call org-capture from within a buffer containing some relevant
context, for example an e-mail message displayed by gnus.  The emacs
window created by org-capture that allows to choose a template is
created below the two Gnus windows showing the group and the message.
My org-capture templates require entering a date.  During the subsequent
date entry, the gnus windows are not visible anymore (I only see the
nascent buffer with the entry to be captured and a window showing the
emacs calendar).  This is impractical, because the e-mail message often
contains the very date I would like to enter.

How to ensure that the buffer which was active when org-capture was
executed remains visible during date entry?

Thanks,
Christoph




[Orgmode] Re: [PATCH] org-bbdb: allow anniversaries with unknown years

2011-02-09 Thread Christoph Groth
Thomas Baumann  writes:

> Christoph Groth  writes:
>
>> Anniversaries in BBDB can be now also specified in the format MM-DD
>> next to -MM-DD.

> The ChangeLog should mention that any customized
> "org-bbdb-anniversary-format-alist" has to be updated, otherwise there
> will be an "Bad sexp at line 637 in /home/tb/org/diary.org:
> (org-bbdb-anniversaries)" error with the new format.

Yes, this patch breaks compatibility, so this should be documented in
the proper place.  I didn't as I'm not sure about the policies of
orgmode here.

Christoph


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] org-bbdb: allow anniversaries with unknown years

2011-02-07 Thread Christoph Groth
Anniversaries in BBDB can be now also specified in the format MM-DD
next to -MM-DD.
---
 doc/org.texi |   11 ++-
 lisp/org-bbdb.el |   27 ++-
 2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index b406d29..bfcef06 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -7098,14 +7098,15 @@ following to one your your agenda files:
 
 You can then go ahead and define anniversaries for a BBDB record.  Basically,
 you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB
-record and then add the date in the format @code{-MM-DD}, followed by a
-space and the class of the anniversary (@samp{birthday} or @samp{wedding}, or
-a format string).  If you omit the class, it will default to @samp{birthday}.
-Here are a few examples, the header for the file @file{org-bbdb.el} contains
-more detailed information.
+record and then add the date in the format @code{-MM-DD} or @code{MM-DD},
+followed by a space and the class of the anniversary (@samp{birthday} or
+@samp{wedding}, or a format string).  If you omit the class, it will default to
+@samp{birthday}. Here are a few examples, the header for the file
+@file{org-bbdb.el} contains more detailed information.
 
 @example
 1973-06-22
+06-22
 1955-08-02 wedding
 2008-04-14 %s released version 6.01 of org-mode, %d years ago
 @end example
diff --git a/lisp/org-bbdb.el b/lisp/org-bbdb.el
index 4155f58..c04b7ff 100644
--- a/lisp/org-bbdb.el
+++ b/lisp/org-bbdb.el
@@ -136,12 +136,12 @@
   '(("birthday" lambda
  (name years suffix)
  (concat "Birthday: [[bbdb:" name "][" name " ("
-(number-to-string years)
+(format "%s" years); handles numbers as well as strings
 suffix ")]]"))
 ("wedding" lambda
  (name years suffix)
  (concat "[[bbdb:" name "][" name "'s "
-(number-to-string years)
+(format "%s" years)
 suffix " wedding anniversary]]")))
   "How different types of anniversaries should be formatted.
 An alist of elements (STRING . FORMAT) where STRING is the name of an
@@ -239,11 +239,16 @@ italicized, in all other cases it is left unchanged."
 
 (defun org-bbdb-anniv-extract-date (time-str)
   "Convert -MM-DD to (month date year).
-Argument TIME-STR is the value retrieved from BBDB."
-  (multiple-value-bind (y m d) (values-list (bbdb-split time-str "-"))
-(list (string-to-number m)
- (string-to-number d)
- (string-to-number y
+Argument TIME-STR is the value retrieved from BBDB.  If - is omitted
+it will be considered unknown."
+  (multiple-value-bind (a b c) (values-list (bbdb-split time-str "-"))
+(if (eq c nil)
+(list (string-to-number a)
+  (string-to-number b)
+  nil)
+  (list (string-to-number b)
+(string-to-number c)
+(string-to-number a)
 
 (defun org-bbdb-anniv-split (str)
   "Split multiple entries in the BBDB anniversary field.
@@ -326,8 +331,12 @@ This is used by Org to re-create the anniversary hash 
table."
 class org-bbdb-anniversary-format-alist t))
class)) ; (as format string)
  (name (nth 1 rec))
- (years (- y (car rec)))
- (suffix (diary-ordinal-suffix years))
+ (years (if (eq (car rec) nil)
+"unknown"
+  (- y (car rec
+ (suffix (if (eq (car rec) nil)
+ ""
+   (diary-ordinal-suffix years)))
  (tmp (cond
((functionp form)
 (funcall form name years suffix))
-- 
1.7.2.3


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-bbdb: anniversaries with unknown years

2010-10-10 Thread Christoph Groth
Hello,

I'd like to keep birthdays and similar dates in bbdb and have them shown
in my org mode agenda views.  Often, however, I do not know the year of
an anniversary, and in the case of my acquaintances the year of a
personal anniversary is often not meaningful (e.g. name days, popular in
some countries).

The solution that came to my mind was to update org-bbdg.el to also
accept dates in the format MM-DD.  org-bbdb-anniv-extract-date would
then substitute nil for unknown years.  The remaining code would make
sure that "unknown" is substituted for unknown `years'.

That solution seems fine, however it would break compatibility with the
old format of org-bbdb-anniversary-format-alist, as this assumes that a
numerical value of `years' is always defined.

Before writing a patch, I would like to ask for opinions on this.

Cheers
Christoph


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Beamer support in Org-mode

2009-11-26 Thread Christoph Groth
Nice idea to create LaTeX-presentations using orgmode.  Though, whenever
using beamer, I always find myself having to tweak some spaces on a
fairly low level.  I'm curious whether it will work out to create
non-trivial presentations by using orgmode only.

Carsten Dominik  writes:

> If the frame title contains the string "\\", the line will be split at
> that location, and the second half become the frame /subtitle/.

Sometimes one might have a frame title which is too wide for one line.
Then one might want to split the title at a specific place -- and that
is done by inserting a \\ there.  Therefore, I suggest to use some other
magic string.  What about an unquoted ampersand ("&")?  This character is
already used in LaTeX to split things and its unquoted use in a
frame title is actually an error.

Christoph



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: bug: only first item gets refiled via remember

2009-11-25 Thread Christoph Groth
Carsten Dominik  writes:

> On Nov 25, 2009, at 11:36 PM, Christoph Groth wrote:
>
>> I think this is a bug.  It is certainly present in org 6.32b:
>>
>> * Run org-remember
>> * Enter more then one item, e.g. two TODOs
>> * Refile somewhere using C-1 C-c C-c
>>
>> result: only the first item ends up at the intended destination, the
>> others are lost.
>
> Remember is only for single entries, not for multiple ones.

This is certainly not a big issue, but is such a restriction necessary?
I often find it useful to enter several related TODO items into a single
remember buffer.  And if one then presses C-c C-c (as opposed to C-1 C-c
C-c) the entries following the first are not lost.

Christoph



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] bug: only first item gets refiled via remember

2009-11-25 Thread Christoph Groth
I think this is a bug.  It is certainly present in org 6.32b:

* Run org-remember
* Enter more then one item, e.g. two TODOs
* Refile somewhere using C-1 C-c C-c

result: only the first item ends up at the intended destination, the
others are lost.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [PATCH] org-agenda-filter-by-tag: Do not ignore argument CHAR.

2009-11-25 Thread Christoph Groth
---
 lisp/org-agenda.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 846e4b0..cf748f0 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5130,7 +5130,7 @@ to switch to narrowing."
 (effort-prompt "")
 (inhibit-read-only t)
 (current org-agenda-filter)
-char a n tag)
+a n tag)
 (unless char
   (message
"%s by tag [%s ], [TAB], %s[/]:off, [+-]:narrow, [>=http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: agenda: storing searches _really_

2009-11-25 Thread Christoph Groth
I found a solution to my problem:

Christoph Groth  writes:

> I'm using org 6.29c.  To view all items tagged with :work: in my
> agenda I can type
>
> C-c a a  (to view the current agenda)
> / TAB work RET   (to restrict the display)
>
>
> Now I would like to get the same with typing
>
> C-c a w

(defun my-org-agenda-list-with-filter (filter)
  (org-agenda-list)
  (org-agenda-filter-by-tag-show-all)
  (org-agenda-filter-apply filter))

(setq org-agenda-custom-commands
  '(("w" "Agenda for work"
 my-org-agenda-list-with-filter ("+work"



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] agenda: storing searches _really_

2009-11-04 Thread Christoph Groth
I'm using org 6.29c.  To view all items tagged with :work: in my agenda
I can type

C-c a a  (to view the current agenda)
/ TAB work RET   (to restrict the display)


Now I would like to get the same with typing

C-c a w

but I cannot figure out how to do that.

I've RTFM and tried setting `org-agenda-custom-commands' in various
ways, also using `org-agenda-skip-function', but my solutions either
keep ignoring inheritance of tags (the skip-function-solution)
or
do not allow to switch between day and week view like the "C-c a a"
agenda does.

So, is there a way to make a custom-agenda with the effect of:

C-c a a / TAB work RET

thank you in advance,

Christoph



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] no mark when rescheduling in agenda buffer

2009-09-21 Thread Christoph Groth
In org-mode 6.29c, when using S- or S- or the new "bulk
action" to reschedule tasks in the agenda buffer, a mark is left on the
rescheduled tasks with their new date.

However, when using '>' or C-c C-s to reschedule, there is no mark.

In my opinion it would be useful to always have a mark.  This topic has
been discussed in the past:

http://article.gmane.org/gmane.emacs.orgmode/3450

Perhaps this issue should be put on the todo-list?

Cheers,
Christoph



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: DONE in Org-Agenda mode has org-todo face

2008-09-19 Thread Christoph Groth
Hi Carsten,

> do you have something like
>
> #+TODO: TODO DONE | CANCELED
>
> in your buffer?

No, I just did the following to test again:

(1) Created a file `test.org':

* DONE something!
  SCHEDULED: <2008-09-19 Fri>

(2) Started emacs with 'emacs -q' to ignore my own configuration.

(3) Opened test.org (here DONE appears bold green)

(4) C-c [

(5) M-x org-agenda a

The result is: DONE appears in bold red (the rest of the line is normal green)

Maybe the Debian package is to blame?

Christoph



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] DONE in Org-Agenda mode has org-todo face

2008-09-18 Thread Christoph Groth
Dear list,

Yesterday I discovered org-mode and I like it very much.  I'm using the version
which comes with Debian Testing (8.05).

When in Org-Agenda mode, the word `DONE' for DONE tasks has the same face
(org-todo) as the word TODO.  I find it a bit disturbing to see DONE written in
a bold red font.  This occurs also when no variables related to org are set in
my .emacs.

I tried to solve the problem by setting org-todo-keyword-faces to
`(("DONE" . org-done))'
This has the effect that upon entering the agenda mode with `M-x org-agenda a'
already existing DONE words are bold green (as I would like them to be).
However, when an task is switched from TODO to DONE by pressing `t' it stays
red.

thanks

Christoph



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode