Re: [O] Capturing, refiling, archiving

2015-05-17 Thread Nicolas Goaziou
Titus von der Malsburg malsb...@posteo.de writes:

 The reason why I think this would be useful is that some simple things
 are currently not possible.  Consider the following document structure:

   * Office
   ** To do
   ** Finished
   * Home
   ** To do
   ** Finished

 If I want to archive things under the “Agenda/Finished,” there is no way
 to achieve this (correct me if I’m wrong).  I could try this

   (setq org-archive-location ::** Finished)

 but that is ambiguous.  It doesn’t indicate which of the two “Finished”
 nodes should be the target.

 Similar problems exist for refile targets: if I want to have the first
 “Finished” in my targets but not the second, how would I achieve that?
 None of the available facilities allows me to do this (without changing
 the document structure).

 Using the capture template way of specifying targets, both problems
 would be easy to solve because that mechanism allows me to specify the
 complete path in the document tree leading to the node of interest
 (among other things, file+regexp, etc.)

Capture and Refile are two very different concepts. In the former, you
define a static, or a set of static, accurate location that may not
exist yet. In the latter, you pile up existing locations that you filter
interactively, depending on the situation.

In your example above, it is possible to refile under any Finished
headline by choosing the right path.

Archiving may indeed lack a way to specify a full path in a document.
But supporting the full capture template elements doesn't make sense
either. You cannot archive into a table, an item...


Regards,



Re: [O] New Citation syntax on the master branch?

2015-05-17 Thread Nicolas Goaziou
Vaidheeswaran C vaidheeswaran.chinnar...@gmail.com writes:

 1. New citation syntax is concerned with ORG SYNTAX

 2. oc.el is concerned with EDITING org files.

 3. ox-jabref.el (and others) is concerned with DOCUMENT CREATION.

True.

 It seems like your plan is to put 1, 2  3 ALL TOGETHER in
 trunk. i.e., ALL or NONE.

Correct. Org syntax is expected to be supported out of the box.

 How about making (1) a configurable option -- disabled by default --
 and moving it to trunk?

I don't want syntax to be configurable.

 I believe the answer depends MORE on how stable you think the new
 citation syntax is (in so far as it is implemented) and LESS on
 whether the whole ecosystem is in place.

We can add oc-jabref (not ox-jabref, which is reserved for export
back-ends) in a branch and have some users test it. This is the only way
to know if the syntax is sufficient.

WDYT?


Regards,



Re: [O] [PATCH] org-attach.el: fix check for git annex

2015-05-17 Thread Nicolas Goaziou
Erik Hetzner e...@e6h.org writes:

 * lisp/org-attach.el (org-attach-commit): Check for .git/annex dir in
 addition to annex dir in root git dir to ensure that git annex is used

Applied. Thank you.

I added TINYCHANGE at the end of the commit message since you don't
appear to have signed FSF papers. Please correct me if I'm wrong.

Regards,



Re: [O] [PATCH] Fix message format in org-notmuch-search-open

2015-05-17 Thread Nicolas Goaziou
Hello,

Christopher League lea...@contrapunctus.net writes:

 * org-notmuch.el (org-notmuch-search-open): Bug fix
 When opening a notmuch-search link, we use =message= to display the
 path at the bottom of the screen.  This would signal Not enough
 arguments for format string when the path contained %-signs, as it is
 likely to when the query contains spaces:
 [[notmuch-search:tag:inbox%2520not%2520tag:bulk%2520org]]

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] org-delete-indentation

2015-05-17 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Due to recent controversy about Org being lacking Microsoftesque detail I
 finally implemented org-delete-indentation, which is a function I have
 been missing forever.

Thank you.

 +(defun org-delete-indentation (optional ARG)
 +  Join this line to previous and fix up whitespace at join.
 +
 +If previous row is a headline add to headline text.

You need to describe what ARG does.

 +  (interactive *P)
 +  (if (save-excursion (if ARG
 +   (beginning-of-line)
 + (forward-line -1))
 +   (looking-at org-complex-heading-regexp))
 +  ;; At headline.
 +  (let ((string (concat   (prog2 (and ARG (forward-line 1))
 + (org-trim (delete-and-extract-region 
 (line-beginning-position)
 +  
 (line-end-position)))
 + (when (eq (preceding-char) ?\n) (delete-region (point) (1- (point

  (unless (bobp) (delete-region ))

Also, shouldn't the final (delete-indentation ARG) be in the else part
of the `if'?

 +(ert-deftest test-org-delete-indentation ()
 +  Test M-^ (`org-delete-indentation') specification.

I suggest to omit binding in the description. That's one thing less we
have to keep up-to-date if it ever changes.


Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] org-delete-indentation

2015-05-17 Thread Nicolas Goaziou
 +  (let ((string (concat   (prog2 (and ARG (forward-line 1))
 +(org-trim (delete-and-extract-region 
 (line-beginning-position)
 + 
 (line-end-position)))

Also,

  (concat   
  (progn (when ARG (forward-line))
 (org-trim ...)))
   



Re: [O] New Citation syntax on the master branch?

2015-05-17 Thread Vaidheeswaran C
On Sunday 17 May 2015 01:48 PM, Nicolas Goaziou wrote:

 How about making (1) a configurable option -- disabled by default --
  and moving it to trunk?
 I don't want syntax to be configurable.

Ok.

  I believe the answer depends MORE on how stable you think the new
  citation syntax is (in so far as it is implemented) and LESS on
  whether the whole ecosystem is in place.

 We can add oc-jabref (not ox-jabref, which is reserved for export
 back-ends) in a branch and have some users test it. This is the only way
 to know if the syntax is sufficient.
 
 WDYT?

I will rename the module as you suggest.  I would also like to polish
a few more things.  Unlike other contrib modules, I want this module
to be changed only by FSF-approved authors so that I can put it on GNU
ELPA.

(My future assignment is through, so the route is clear.)



While we are on this...

I would like to submit some patches to ox-odt.el.  I have plenty of
local changes (that were made on a older version of trunk).

As part of preparation for submitting my changes to Org repo,

1. I have reverted patches applied to the trunk since my change.
2. Applied my patches to (1).
3. Re-play (1) on top of 3.

Since my dis-appearance couple of months ago, there have been more
changes to ox-odt.el (which I need to replay again).

Here is a snapshot of my workarea:
http://repo.or.cz/w/org-mode/org-cv.git/shortlog. Step (1) above
corresponds to this
commit.
(http://repo.or.cz/w/org-mode/org-cv.git/commit/739ddc3b27a5a2f0b05b576f671069c868835a21)


a) I haven't updated the ODT nodes of Info manual.  I would prefer to
   update the manual AFTER the merge of elisp code.

b) Bugs if any introduced by my merge are going to be minor and IMHO,
   they could be taken up AFTER the merge.

I hope the above arrangement for merging my changes is agreeable to
the maintainers.  (Let me know what you think)

This message is more of a heads-up.  I will let you know once I am
done with (3).  Meanwhile, I would encourage the current ODT exporter
users to try out my new private repo and report any issues.



[O] Org maintainance

2015-05-17 Thread Bastien
Dear all,

I have not been able to be active as a maintainer since more than
half a year now.

I have been reading the mailing list, though, and Nicolas daily
commitment has been key in me being relaxed about tons of issues,
if not about the lack of a maintainer itself.  I have only dealt
with private requests like adding public keys.

My plan was to find more time and to come back, and this is still
my plan, but we need a deadline to tell whether the plan is alive
or dead.

So here is it: if I realize I cannot spent enough time on Org by
July, 17th then I'll step back as a maintainer and become a happy
contributor.

Thanks for your patience and for all the constructive discussions.

All best,

-- 
 Bastien




Re: [O] New Citation syntax on the master branch?

2015-05-17 Thread Rasmus
Hi,

Vaidheeswaran C vaidheeswaran.chinnar...@gmail.com writes:

 (My future assignment is through, so the route is clear.)

Can you clarify on this?  My understanding was that it was retracted a
while back under much fuss.

 I hope the above arrangement for merging my changes is agreeable to
 the maintainers.  (Let me know what you think)

Copyright assignment AND good behavior towards all users, developers and
maintainers of Org is all that is asked.

—Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers







Re: [O] Capturing, refiling, archiving

2015-05-17 Thread Titus von der Malsburg

On 2015-05-17 Sun 01:13, Nicolas Goaziou wrote:
 Capture and Refile are two very different concepts. In the former, you
 define a static, or a set of static, accurate location that may not
 exist yet. In the latter, you pile up existing locations that you filter
 interactively, depending on the situation.

I understand that.  But in principle it would be possible to use the
same or at least a very similar specification language for targets.  But
nevermind, it’s not exactly important.

 In your example above, it is possible to refile under any Finished
 headline by choosing the right path.

You mean I can specify a path by typing it in when prompted by
`org-refile'?  Because the documentation of `org-refile-targets' doesn’t
mention the possibility to specify paths as far as I can see.

 Archiving may indeed lack a way to specify a full path in a document.
 But supporting the full capture template elements doesn't make sense
 either. You cannot archive into a table, an item...

Good point.

  Titus



signature.asc
Description: PGP signature


[O] Bug: Inlinetask bodies begun with a link (or other invisible elements) are not folded correctly

2015-05-17 Thread Anders Johansson

Hi,
I had an inlinetask that started with a link, like this:

 Inlinetask heading
[[file:filename][link desc]] some text. Some more text.
 END

It didn't fold on TAB. Looking into org-inlinetask-toggle-visibility I see

;; Inlinetask was folded: expand it.
 ((get-char-property (1+ start) 'invisible)

which is true for all kind of chars that are invisible I guess (even if 
the value of the 'invisible property is 'org-link)


A quick test showed that adding a test for if the hiding is outline 
worked:


;; Inlinetask was folded: expand it.
 ((eq 'outline (get-char-property (1+ start) 'invisible))

I don't know if this has any unwanted side-effects though. Or if this 
should be avoided for some reason.


This is using the latest org from git.

Cheers,
Anders Johansson

Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.9)
 of 2015-03-21 on kissel, modified by Debian
Package: Org-mode version 8.2.10 (release_8.2.10-417-g0e5069 @ 
/home/aj/kodat/elisp/org-mode/)




Re: [O] Bug: Inlinetask bodies begun with a link (or other invisible elements) are not folded correctly

2015-05-17 Thread Nicolas Goaziou
Hello,

Anders Johansson mejlaande...@gmail.com writes:

 I had an inlinetask that started with a link, like this:

  Inlinetask heading
 [[file:filename][link desc]] some text. Some more text.
  END

 It didn't fold on TAB. Looking into org-inlinetask-toggle-visibility I see

 ;; Inlinetask was folded: expand it.
  ((get-char-property (1+ start) 'invisible)

 which is true for all kind of chars that are invisible I guess (even
 if the value of the 'invisible property is 'org-link)

Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Display :PROPERTIES: drawers?

2015-05-17 Thread Thomas S. Dye
Lawrence Bottorff borg...@gmail.com writes:

 Sorry, but I can't find any reference to org-export-with-properties . Where
 might it be mentioned?

See 12.3 Export settings,

,
| ‘prop:’ Toggle inclusion of property drawers, or list properties to 
include
|  (‘org-export-with-properties’).  
 
`

hth,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Display :PROPERTIES: drawers?

2015-05-17 Thread Thomas S. Dye
Then it might be a version issue.  I'm looking at Org-mode version
8.3beta (release_8.3beta--gf8d1d3 @
/Users/dk/.emacs.d/src/org-mode/lisp/).

What version are you using?

All the best,
Tom

Lawrence Bottorff borg...@gmail.com writes:

 Sorry, not seeing any

 prop: Toggle inclusion of property drawers, or list properties to include
 (‘org-export-with-properties’).

 in 12.3 (online manual). Tried

 #+OPTIONS: prop:t

 in my buffer and it didn't work either.

 On Sun, May 17, 2015 at 7:08 PM, Thomas S. Dye t...@tsdye.com wrote:

 Lawrence Bottorff borg...@gmail.com writes:

  Sorry, but I can't find any reference to org-export-with-properties .
 Where
  might it be mentioned?

 See 12.3 Export settings,


 ,
 | ‘prop:’ Toggle inclusion of property drawers, or list properties to
 include
 |  (‘org-export-with-properties’).

 `

 hth,
 Tom

 --
 Thomas S. Dye
 http://www.tsdye.com

 Sorry, not seeing any 

 prop: Toggle inclusion of property drawers, or list properties to
 include (‘org-export-with-properties’).

 in 12.3 (online manual). Tried 

 #+OPTIONS: prop:t

 in my buffer and it didn't work either.

 On Sun, May 17, 2015 at 7:08 PM, Thomas S. Dye t...@tsdye.com wrote:

 Lawrence Bottorff borg...@gmail.com writes:
 
  Sorry, but I can't find any reference to
 org-export-with-properties . Where
  might it be mentioned?
 
 See 12.3 Export settings,
 
 
 ,

 | ‘prop:’ Toggle inclusion of property drawers, or list properties
 to include
 | (‘org-export-with-properties’).
 
 `

 
 hth,
 Tom
 
 --
 Thomas S. Dye
 http://www.tsdye.com
 



-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Display :PROPERTIES: drawers?

2015-05-17 Thread Lawrence Bottorff
Sorry, not seeing any

prop: Toggle inclusion of property drawers, or list properties to include
(‘org-export-with-properties’).

in 12.3 (online manual). Tried

#+OPTIONS: prop:t

in my buffer and it didn't work either.

On Sun, May 17, 2015 at 7:08 PM, Thomas S. Dye t...@tsdye.com wrote:

 Lawrence Bottorff borg...@gmail.com writes:

  Sorry, but I can't find any reference to org-export-with-properties .
 Where
  might it be mentioned?

 See 12.3 Export settings,


 ,
 | ‘prop:’ Toggle inclusion of property drawers, or list properties to
 include
 |  (‘org-export-with-properties’).

 `

 hth,
 Tom

 --
 Thomas S. Dye
 http://www.tsdye.com



Re: [O] A Microsoftesque detail in org

2015-05-17 Thread Thomas S. Dye
Titus von der Malsburg malsb...@posteo.de writes:

  While that may be a valid solution for some people, it is
 certainly not the Emacs way of doing things.

That's right.  It is the Org mode way of doing things in Emacs.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] A Microsoftesque detail in org

2015-05-17 Thread Titus von der Malsburg

On 2015-05-17 Sun 14:15, Rasmus wrote:
 Hi Jarmo,

 Jarmo Hurri jarmo.hu...@iki.fi writes:

 Rasmus ras...@gmx.us writes:

 With your behavior you can (i) break the TODO tag; (ii) break the cookie;
 (iii) break the tag.  At least (i) and (ii) are quite destructive.

 I am not sure what you mean, since a single undo will always heal the
 line again, regardless of where you break it.

 Sure.  But that seems orthogonal to the problem at hand.  Re (i): Assume
 TODO is keyword.  We don't know that TO is.  Re (ii): [#B] is a cookie.
 [#B is not.  (iii) iii :tag: is a tag :ta is not.  The editor should not
 easily produce invalid syntax.

I disagree with that last statement.  I’m not aware of any Emacs mode
(or any other text editor for that matter) that prevents me from
producing invalid syntax.  A text editor preventing invalid syntax is
actually not even desirable because the path from one syntactically
valid state of the document to the next often leads through invalid
states.  If you really want to prevent temporarily invalid documents,
the result is going to be some kind of GUI application, not a text
editor.  While that may be a valid solution for some people, it is
certainly not the Emacs way of doing things.

  Titus

 In any case it's very easy to rebind keys in a hook.  If you write a
 org.texi patch on how to get purist keybindings we can add it.

 I am a BIG fan of the Org mode slogan Your life in plain text. The
 power of plain text has been demonstrated over and over again. You can
 run text manipulating commands on it, you can process it with a large
 array of different programming languages.

 Nobody is disputing that.

 An undo is a basic text editing feature that everyone should
 know. Reassigning non-standard behaviour to the return key is - in my
 opinion - against the ideology.

 I see that you use Gnus.  Did you by any change use RET to open the
 article?  It's bound to gnus-summary-scroll-up.

 In Emacs25, or maybe even before, RET in at least lisp mode started to
 indent automatically via electric-indent-mode.  Are you against this?

 What I will agree on is that it would be better if Org used more
 standard mechanism and e.g. cleverly hooked newline.  However, Org
 targets a number of versions of Emacs (ATM: 23-25), making this hard.

 The attached patch re-enables breaks in region four of
 org-complex-heading-regexp, i.e. from the cookie up to tags.  A quick
 test suggests it works nicely.

 WDYT?

 Given enough time, I could come up with a situation where I would run a
 keyboard macro in which I would expect the return key to break the line,
 regardless of where I was on that line (in a tag or whatever).

 In that case there's C-o C-e or M-x newline...

 I am a very minor player in this game, but I would really, _really_ like
 Org to remain as true to it's slogan as possible.

 I'm still don't see this point.  There's Org, the format, which should
 ideally be easy to use in any editor (I wrote a basic syntax parser for
 texworks).  It's plaintext.  Then there's org-mode, the principal editor
 of Org.  It supposed to be a nice environment for composing text.

 —Rasmus



signature.asc
Description: PGP signature


Re: [O] Display :PROPERTIES: drawers?

2015-05-17 Thread Nicolas Goaziou
Hello,

Lawrence Bottorff borg...@gmail.com writes:

 Okay, after sifting through the reference I did see something about how
 properties can never be exported;

See `org-export-with-properties'.


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 You shouldn't use `org-next-visible-heading' as statistics cookie
 updates shouldn't depend on current visibility.

 That's why I used org-with-wide-buffer.

This is orthogonal. `o-w-w-b' is about narrowing. `o-n-v-h' ignores
inlinetasks.

 But perhaps a better solution would be an org-next-heading or
 whatever, that considered inlinetasks.

I'm not sure what you mean. `outline-next-heading'?

 Also, the problem is more subtle: you have to check if you're within an
 inlinetask, in which case you don't want to use
 `org-with-limited-levels' or not.

 Is that saying that org-with-wide-buffer is no good here?

I'm saying `org-next-visible-heading', or, more precisely,
`org-with-limited-levels' is no good here. See `org-get-property-block'
for an example.


Regards,



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Nicolas Goaziou
Rasmus ras...@gmx.us writes:

 FWIW, I did not like the syntax Nicolas suggested in that thread.  It
 reminded me too much of *XML (which is also true with inlinetasks
 BTW).

Well, that's sad. It brings interesting features you cannot have with
link-like syntax.


Regards,



Re: [O] Display :PROPERTIES: drawers?

2015-05-17 Thread Lawrence Bottorff
Sorry, but I can't find any reference to org-export-with-properties . Where
might it be mentioned?

On Sun, May 17, 2015 at 5:51 PM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Lawrence Bottorff borg...@gmail.com writes:

  Okay, after sifting through the reference I did see something about how
  properties can never be exported;

 See `org-export-with-properties'.


 Regards,

 --
 Nicolas Goaziou



[O] Is there a new method to set no line break when export to plain text

2015-05-17 Thread windy
Hi, everyone,
 Start from Org-mode 8, the plain text export is fixed width with line 
break and it is very unconvenient to show in the text edit like libreoffice and 
so on.

 I also try (setq org-ascii-text-width 10) in my .emacs but the title 
and the author align to the middle in 10, it is very ugly and .

I don't know why org-mode 8 start to fix width of plain text with line 
break, How I  conquer it ? Is there anyone have good idea?


Re: [O] A Microsoftesque detail in org

2015-05-17 Thread Jarmo Hurri

Rasmus ras...@gmx.us writes:

Greetings Rasmus.

 I would suggest that the original interpretation of Enter would not
 be messed with. Messing with Alt-Enter and such is fine, but Enter,
 please no.

 I disagree.  Consider the more complete example:

 * TODO [#A] foo bar:tag:

 With your behavior you can (i) break the TODO tag; (ii) break the cookie;
 (iii) break the tag.  At least (i) and (ii) are quite destructive.

I am not sure what you mean, since a single undo will always heal the
line again, regardless of where you break it.

I am a BIG fan of the Org mode slogan Your life in plain text. The
power of plain text has been demonstrated over and over again. You can
run text manipulating commands on it, you can process it with a large
array of different programming languages.

An undo is a basic text editing feature that everyone should
know. Reassigning non-standard behaviour to the return key is - in my
opinion - against the ideology.

 The attached patch re-enables breaks in region four of
 org-complex-heading-regexp, i.e. from the cookie up to tags.  A quick
 test suggests it works nicely.

 WDYT?

Given enough time, I could come up with a situation where I would run a
keyboard macro in which I would expect the return key to break the line,
regardless of where I was on that line (in a tag or whatever).

I am a very minor player in this game, but I would really, _really_ like
Org to remain as true to it's slogan as possible.

Keeping it real,

Jarmo




Re: [O] Display :PROPERTIES: drawers?

2015-05-17 Thread Lawrence Bottorff
Okay, after sifting through the reference I did see something about how
properties can never be exported; however, drawers can be (general)
exported -- unless you tell org-mode to hide them. But drawers don't allow
any key:value sub-categories like properties do, right? Any way for me to
have my cake and eat it too?

On Sun, May 17, 2015 at 2:05 PM, Lawrence Bottorff borg...@gmail.com
wrote:

 I want to display all my :PROPERTIES: drawers in a Latex/HTML export.
 Couldn't find anything in the documentation to toggle the default hide
 behavior off. Anyone know how to do this?

 LB



Re: [O] A Microsoftesque detail in org

2015-05-17 Thread Rasmus
Hi Jarmo,

Jarmo Hurri jarmo.hu...@iki.fi writes:

 Rasmus ras...@gmx.us writes:

 With your behavior you can (i) break the TODO tag; (ii) break the cookie;
 (iii) break the tag.  At least (i) and (ii) are quite destructive.

 I am not sure what you mean, since a single undo will always heal the
 line again, regardless of where you break it.

Sure.  But that seems orthogonal to the problem at hand.  Re (i): Assume
TODO is keyword.  We don't know that TO is.  Re (ii): [#B] is a cookie.
[#B is not.  (iii) iii :tag: is a tag :ta is not.  The editor should not
easily produce invalid syntax.

In any case it's very easy to rebind keys in a hook.  If you write a
org.texi patch on how to get purist keybindings we can add it.

 I am a BIG fan of the Org mode slogan Your life in plain text. The
 power of plain text has been demonstrated over and over again. You can
 run text manipulating commands on it, you can process it with a large
 array of different programming languages.

Nobody is disputing that.

 An undo is a basic text editing feature that everyone should
 know. Reassigning non-standard behaviour to the return key is - in my
 opinion - against the ideology.

I see that you use Gnus.  Did you by any change use RET to open the
article?  It's bound to gnus-summary-scroll-up.

In Emacs25, or maybe even before, RET in at least lisp mode started to
indent automatically via electric-indent-mode.  Are you against this?

What I will agree on is that it would be better if Org used more
standard mechanism and e.g. cleverly hooked newline.  However, Org
targets a number of versions of Emacs (ATM: 23-25), making this hard.

 The attached patch re-enables breaks in region four of
 org-complex-heading-regexp, i.e. from the cookie up to tags.  A quick
 test suggests it works nicely.

 WDYT?

 Given enough time, I could come up with a situation where I would run a
 keyboard macro in which I would expect the return key to break the line,
 regardless of where I was on that line (in a tag or whatever).

In that case there's C-o C-e or M-x newline...

 I am a very minor player in this game, but I would really, _really_ like
 Org to remain as true to it's slogan as possible.

I'm still don't see this point.  There's Org, the format, which should
ideally be easy to use in any editor (I wrote a basic syntax parser for
texworks).  It's plaintext.  Then there's org-mode, the principal editor
of Org.  It supposed to be a nice environment for composing text.

—Rasmus

-- 
This is the kind of tedious nonsense up with which I will not put




[O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Eric S Fraga
Hello,

I often use checkbox lists for particular tasks.  If any of the list
items has an inline task (whether a task or not), the updating of the
[/] cookie in the headline does not work.  Attached is an example.

Backtrace is also attached.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069
#+TITLE: examplebug.org
#+AUTHOR:Eric S Fraga
#+options: tex:dvipng
* TODO [0/2] to do cookies not updating
- [ ] the first task
  
*** This is something to note
*** END

- [ ] another list of tasks
Debugger entered--Lisp error: (error Invalid search bound (wrong side of 
point))
  re-search-forward(^[ ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[
]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][   ]*\\)?\\(\\[[- 
X]\\]\\) 141 move)
  funcall(re-search-forward ^[ 
]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[
]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][   ]*\\)?\\(\\[[- 
X]\\]\\) 141 move)
  (if (funcall search re bound noerr) nil (throw (quote exit) (and (goto-char 
(if (memq noerr (quote (t nil))) origin bound)) nil)))
  (while t (if (funcall search re bound noerr) nil (throw (quote exit) (and 
(goto-char (if (memq noerr (quote ...)) origin bound)) nil))) (if 
(org-list-in-valid-context-p) (progn (throw (quote exit) (point)
  (let ((origin (point))) (while t (if (funcall search re bound noerr) nil 
(throw (quote exit) (and (goto-char (if (memq noerr ...) origin bound)) nil))) 
(if (org-list-in-valid-context-p) (progn (throw (quote exit) (point))
  (catch (quote exit) (let ((origin (point))) (while t (if (funcall search re 
bound noerr) nil (throw (quote exit) (and (goto-char (if ... origin bound)) 
nil))) (if (org-list-in-valid-context-p) (progn (throw (quote exit) 
(point)))
  org-list-search-generic(re-search-forward ^[ 
]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[
]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][   ]*\\)?\\(\\[[- 
X]\\]\\) 141 move)
  org-list-search-forward(^[   ]*\\([-+*]\\|\\([0-9]+\\|[A-Za-z]\\)[.)]\\)[
]+\\(?:\\[@\\(?:start:\\)?\\([0-9]+\\|[A-Za-z]\\)\\][   ]*\\)?\\(\\[[- 
X]\\]\\) 141 move)
  (while (org-list-search-forward box-re backup-end (quote move)) (let* 
((struct (org-list-struct)) (bottom (org-list-get-bottom-point struct))) (setq 
structs-bak (cons struct structs-bak)) (goto-char bottom)))
  (cond ((and (org-at-heading-p) (string-match \\todo\\ (downcase (or 
(org-entry-get nil COOKIE_DATA)  (throw (quote skip) nil)) ((and 
(org-at-heading-p) (= (save-excursion (outline-next-heading) (point)) 
backup-end)) (funcall count-boxes nil structs-bak recursivep)) 
((org-at-heading-p) (setq backup-end (save-excursion (outline-next-heading) 
(point)) structs-bak nil) (while (org-list-search-forward box-re backup-end 
(quote move)) (let* ((struct (org-list-struct)) (bottom 
(org-list-get-bottom-point struct))) (setq structs-bak (cons struct 
structs-bak)) (goto-char bottom))) (funcall count-boxes nil structs-bak 
recursivep)) ((and (org-at-item-p) ( (point-at-bol) backup-end) (not (nth 2 
(org-list-context (funcall count-boxes (point-at-bol) structs-bak 
recursivep)) ((org-at-item-p) (let ((struct (org-list-struct))) (setq 
backup-end (org-list-get-bottom-point struct) structs-bak (list struct))) 
(funcall count-boxes (point-at-bol) structs-bak recursivep)) (t (throw (quote 
skip) nil)))
  (list (match-beginning 1) (match-end 1) (match-string 2) (cond ((and 
(org-at-heading-p) (string-match \\todo\\ (downcase (or (org-entry-get nil 
COOKIE_DATA)  (throw (quote skip) nil)) ((and (org-at-heading-p) (= 
(save-excursion (outline-next-heading) (point)) backup-end)) (funcall 
count-boxes nil structs-bak recursivep)) ((org-at-heading-p) (setq backup-end 
(save-excursion (outline-next-heading) (point)) structs-bak nil) (while 
(org-list-search-forward box-re backup-end (quote move)) (let* ((struct 
(org-list-struct)) (bottom (org-list-get-bottom-point struct))) (setq 
structs-bak (cons struct structs-bak)) (goto-char bottom))) (funcall 
count-boxes nil structs-bak recursivep)) ((and (org-at-item-p) ( 
(point-at-bol) backup-end) (not (nth 2 (org-list-context (funcall 
count-boxes (point-at-bol) structs-bak recursivep)) ((org-at-item-p) (let 
((struct (org-list-struct))) (setq backup-end (org-list-get-bottom-point 
struct) structs-bak (list struct))) (funcall count-boxes (point-at-bol) 
structs-bak recursivep)) (t (throw (quote skip) nil
  (cons (list (match-beginning 1) (match-end 1) (match-string 2) (cond ((and 
(org-at-heading-p) (string-match \\todo\\ (downcase (or ...  (throw 
(quote skip) nil)) ((and (org-at-heading-p) (= (save-excursion 
(outline-next-heading) (point)) backup-end)) (funcall count-boxes nil 
structs-bak recursivep)) ((org-at-heading-p) (setq backup-end (save-excursion 
(outline-next-heading) (point)) structs-bak nil) (while 
(org-list-search-forward box-re backup-end (quote move)) (let* ((struct ...) 
(bottom 

[O] Display :PROPERTIES: drawers?

2015-05-17 Thread Lawrence Bottorff
I want to display all my :PROPERTIES: drawers in a Latex/HTML export.
Couldn't find anything in the documentation to toggle the default hide
behavior off. Anyone know how to do this?

LB


Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Can you try the attached patch?  It seems to work on my system, but
 probably more cleanup should be made wrt the old outline-functions.
 +   (org-with-wide-buffer
 +(org-next-visible-heading 1)
 +(point)

You shouldn't use `org-next-visible-heading' as statistics cookie
updates shouldn't depend on current visibility. Also, the problem is
more subtle: you have to check if you're within an inlinetask, in which
case you don't want to use `org-with-limited-levels' or not.

Anyway, we could fix it in another way. Eric's example,

  - [ ] the first task

  *** This is something to note
  *** END

  - [ ] another list of tasks

is misleading because it's really the same list, i.e., inlinetasks are
allowed in items, so This is something to note belongs to the first
task.

So, our option is to simply dis-allow inlinetasks in plain lists. That
would also solve the issue.

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] Capturing, refiling, archiving

2015-05-17 Thread Nicolas Goaziou
Titus von der Malsburg malsb...@posteo.de writes:

 You mean I can specify a path by typing it in when prompted by
 `org-refile'?  Because the documentation of `org-refile-targets' doesn’t
 mention the possibility to specify paths as far as I can see.

See `org-refile-use-outline-path'.

Regards,



Re: [O] [bug, org-table] new hline doesn't update formula

2015-05-17 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Consider this example:

 |---+---+---|
 | a | b | c |
 | d | e | f |
 |---+---+---|
 | 1 | 2 | 3 |
 | 4 | 5 | 6 |
 |---+---+---|
 | 5 | 7 | 9 |
 #+TBLFM: @5=vsum(@II..@III)

 Insert a hline after |a|b|c|. The formula is now broken.

What should happen to the formula if hline is inserted between |1|2|3|
and |4|5|6|?

 Expected behavior: org-table-insert-hline should call
 org-table-fix-formulas, though this does not currently support hlines, it
 seems.

 I have no idea how trivial or hard this is to fix this...  But hints or
 fixes are appreciated.

It doesn't seem too hard to fix. I think we just need to extend
`org-table-fix-formulas' to handle @I parts and call it from
`org-table-insert-hline'.

Anyway, actual fix depends on the answer to my initial question.


Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Rasmus ras...@gmx.us writes:

 Can you try the attached patch?  It seems to work on my system, but
 probably more cleanup should be made wrt the old outline-functions.
 +  (org-with-wide-buffer
 +   (org-next-visible-heading 1)
 +   (point)

 You shouldn't use `org-next-visible-heading' as statistics cookie
 updates shouldn't depend on current visibility.

That's why I used org-with-wide-buffer.  But perhaps a better solution
would be an org-next-heading or whatever, that considered inlinetasks.

 Also, the problem is more subtle: you have to check if you're within an
 inlinetask, in which case you don't want to use
 `org-with-limited-levels' or not.

Is that saying that org-with-wide-buffer is no good here?

 Anyway, we could fix it in another way. Eric's example,

   - [ ] the first task
 
   *** This is something to note
   *** END

   - [ ] another list of tasks

 is misleading because it's really the same list, i.e., inlinetasks are
 allowed in items, so This is something to note belongs to the first
 task.

 So, our option is to simply dis-allow inlinetasks in plain lists. That
 would also solve the issue.

It solves the problem, unless Eric wants inlinetasks in his list.  The
solution in my other patch recognized both checkboxes.

 WDYT?

I haven't needed inlinetasks in lists.  So I don't care much.  Better wait
for Eric's opinion.

—Rasmus

-- 
I feel emotional landscapes they puzzle me



Re: [O] [bug, org-table] new hline doesn't update formula

2015-05-17 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Rasmus ras...@gmx.us writes:

 Consider this example:

 |---+---+---|
 | a | b | c |
 | d | e | f |
 |---+---+---|
 | 1 | 2 | 3 |
 | 4 | 5 | 6 |
 |---+---+---|
 | 5 | 7 | 9 |
 #+TBLFM: @5=vsum(@II..@III)

 Insert a hline after |a|b|c|. The formula is now broken.

 What should happen to the formula if hline is inserted between |1|2|3|
 and |4|5|6|?

Good question.  I'm not sure.  While not necessarily the most obvious I
think in that case the formula should be unchanged.  But it's not obvious.

 Expected behavior: org-table-insert-hline should call
 org-table-fix-formulas, though this does not currently support hlines, it
 seems.

 I have no idea how trivial or hard this is to fix this...  But hints or
 fixes are appreciated.

 It doesn't seem too hard to fix. I think we just need to extend
 `org-table-fix-formulas' to handle @I parts and call it from
 `org-table-insert-hline'.

I guess something like that.

 Anyway, actual fix depends on the answer to my initial question.

Yeah...

—Rasmus

-- 
. . . The proofs are technical in nature and provides no real understanding




Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Eric S Fraga
On Sunday, 17 May 2015 at 20:51, Nicolas Goaziou wrote:

[...]

 Anyway, we could fix it in another way. Eric's example,

   - [ ] the first task
 
   *** This is something to note
   *** END

   - [ ] another list of tasks

 is misleading because it's really the same list, i.e., inlinetasks are
 allowed in items, so This is something to note belongs to the first
 task.

I'm not sure I understand what is misleading about the above?  The note
is indeed intended to belong to the first item on the list.

 So, our option is to simply dis-allow inlinetasks in plain lists. That
 would also solve the issue.

I wouldn't be too keen on this option at the moment.  I use inline tasks
in lists all the time.

However, we are starting to see that inline tasks are indeed a bit of
kludge and impact on org structures significantly so maybe we can remove
this capability once inline annotations, as discussed in another thread,
are implemented?

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Eric S Fraga
On Sunday, 17 May 2015 at 15:51, Rasmus wrote:
 Hi Eric,

[...]

 Can you try the attached patch?  It seems to work on my system, but
 probably more cleanup should be made wrt the old outline-functions.

Hi Rasmus,

your patch eems to work just fine.  I haven't done exhaustive testing
but no error is encountered and the count is updated correctly.

Thanks!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Eric S Fraga
eems -- seems

(must learn to read my emails before I C-c C-c... ;-)
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069



[O] New papers published on using org-mode in scientific publishing

2015-05-17 Thread John Kitchin
Hi All,

I recently had two perspectives published on using org-mode to write
scientific papers, and on reusing the data that is embedded in them! One
was published in an American Chemical Society journal:

http://kitchingroup.cheme.cmu.edu/blog/2015/05/17/New-publication-in-ACS-Catalysis-on-data-sharing-practices/

and another in an Elsevier journal:

http://kitchingroup.cheme.cmu.edu/blog/2015/05/17/New-publication-in-Surface-Science-on-data-sharing/

This is pretty exciting for me, and a testament to what org-mode
enables! Thanks to everyone who has contributed to this great project.
This makes about a dozen peer-reviewed papers we have written in
org-mode now.

--
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



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Rasmus
Eric S Fraga e.fr...@ucl.ac.uk writes:

 I'm not sure I understand what is misleading about the above?  The note
 is indeed intended to belong to the first item on the list.

The misleading part, IMO, is that it is not obvious whether the
inlinetasks belong to the list item or not.  Normally something that
belong to the item in indented, which is not possible here.

 However, we are starting to see that inline tasks are indeed a bit of
 kludge and impact on org structures significantly so maybe we can remove
 this capability once inline annotations, as discussed in another thread,
 are implemented?

FWIW, I did not like the syntax Nicolas suggested in that thread.  It
reminded me too much of *XML (which is also true with inlinetasks BTW).
[I, did, however, only add a star to the thread rather than replying].

—Rasmus

-- 
I hear there's rumors on the, uh, Internets. . .



Re: [O] New Citation syntax on the master branch?

2015-05-17 Thread Vaidheeswaran C
On Wednesday 13 May 2015 04:32 PM, Nicolas Goaziou wrote:
 Vaidheeswaran C vaidheeswaran.chinnar...@gmail.com writes:
 
 On Sunday 10 May 2015 12:44 PM, Nicolas Goaziou wrote:

 It will land in the trunk once a library using it for Org core is
 implemented. I put it in a separate branch so that such a library can be
 built, discussed and tested.

 1. Do you, as a maintainer, have any specific plans for this library?

1. New citation syntax is concerned with ORG SYNTAX

2. oc.el is concerned with EDITING org files.

3. ox-jabref.el (and others) is concerned with DOCUMENT CREATION.

It seems like your plan is to put 1, 2  3 ALL TOGETHER in
trunk. i.e., ALL or NONE.

How about making (1) a configurable option -- disabled by default --
and moving it to trunk?  I believe the answer depends MORE on how
stable you think the new citation syntax is (in so far as it is
implemented) and LESS on whether the whole ecosystem is in place.

Just checking one last time, before I shut up ...



Re: [O] org-babel for prolog

2015-05-17 Thread Bjarte Johansen

 On 16 May 2015, at 15:31, Lawrence Bottorff borg...@gmail.com wrote:
 
 No worries. I can wait. Thanks again for your efforts.

I had some spare time today that I didn’t expect. I believe I have fixed the 
bug.

Kind regards,
Bjarte



Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Eric S Fraga
Please ignore my bug report for the moment.  org works if I don't invoke
any of my customisations.  I have obviously set something that makes the
updating of the cookie fail.  Not sure what, mind you... Any suggestions
welcome, of course.

Sorry for the noise.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069



[O] Bug: Blocks spill their background color [8.3beta (release_8.3beta-1145-g45555d @ /home/simen/src/org-mode/lisp/)]

2015-05-17 Thread Simen Heggestøyl

When positioned at the end of an outline node, blocks will spill their
background color (defined by the `org-block-end-line' face) when the
node is folded.

To see this, paste the following lines into an Org buffer, and make
sure that a background color is set for `org-block-end-line':


* One
#+BEGIN_SRC
#+END_SRC
This is OK, it won't spill.
* Two
This will spill.
#+BEGIN_SRC
#+END_SRC
* Three
Spill is gone now.


When the node Two is folded, the background color will still be
painted all the way to the right fringe (as can be viewed here:
http://folk.uio.no/simenheg/org-spill.png). This becomes especially
prominent when using a theme that sets a background color for
`org-block-end-line', for instance the built-in Leuven theme.

Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
of 2015-03-07 on trouble, modified by Debian
Package: Org-mode version 8.3beta (release_8.3beta-1145-g4d @ 
/home/simen/src/org-mode/lisp/)


Re: [O] [patch] org-delete-indentation

2015-05-17 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Also, shouldn't the final (delete-indentation ARG) be in the else part
 of the `if'?

It was, at least on my disk.  I did not check the patch.

 +(ert-deftest test-org-delete-indentation ()
 +  Test M-^ (`org-delete-indentation') specification.

 I suggest to omit binding in the description. That's one thing less we
 have to keep up-to-date if it ever changes.

OK.

The attached patch is updated and seems pretty good.  It also handles tags
and entities according to org-auto-align-tags.

The second patch (0003) adds support for tables in the sense that

| a | c |
| b | d |

can be made into

| a b | c |
| | d |

using M-^.

While this is pretty nice since it's hidden away in a uncommon key, one
thing that bothers me about it is that there's no natural key to go back
to the first situation.

While RET could be made to move content between, it may be too annoying.
Personally. I never use RET in tables for movement commands so it would
not bother me.  I wrote a preliminary patch for this, but there's many
open questions on supposed behavior IMO.

I can work more on M-^ and tables if desirable (primarily it should be
moved to org-table, I guess).  I can also work more on RET in tables, if
desirable.  Another quirk that I noticed is that RET works differently
when next row is a hline (insert new row) and a row (move to next row).
This is completely illogical to me.

—Rasmus

-- 
. . . The proofs are technical in nature and provides no real understanding
From 6f2a4d4f02680fae95c2e799db2ae455a06aa115 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Sat, 16 May 2015 17:19:03 +0200
Subject: [PATCH 2/3] org.el: New function org-delete-indentation

* org.el (org-delete-indentation): New function.
  (org-mode-map): Bind org-delete-indentation to M-^.
* test-org.el (test-org-delete-indentation): Test org-delete-indentation.
* ORG-NEWS: Add entry on org-delete-indentation.
---
 etc/ORG-NEWS |  3 +++
 lisp/org.el  | 31 +++
 testing/lisp/test-org.el | 30 ++
 3 files changed, 64 insertions(+)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index a3e1ae2..91e30f8 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -377,6 +377,9 @@ for details.
 Calling ~org-edit-footnote-reference~ (C-c ') on a footnote reference
 allows to edit its definition, as long as it is not anonymous, in
 a dedicated buffer.  It works even if buffer is currently narrowed.
+*** New function ~org-delete-indentation~ bound to ~M-^~
+Work as ~delete-indentation~ unless at heading, in which case text is
+added to headline text.
 ** Miscellaneous
 *** Strip all meta data from ITEM special property
 ITEM special property does not contain TODO, priority or tags anymore.
diff --git a/lisp/org.el b/lisp/org.el
index a46cb86..6db69c1 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19832,6 +19832,7 @@ boundaries.
 (org-defkey org-mode-map [remap comment-dwim] 'org-comment-dwim)
 (org-defkey org-mode-map [remap forward-paragraph] 'org-forward-paragraph)
 (org-defkey org-mode-map [remap backward-paragraph] 'org-backward-paragraph)
+(org-defkey org-mode-map \M-^ 'org-delete-indentation)
 (org-defkey org-mode-map \C-m 'org-return)
 (org-defkey org-mode-map \C-j 'org-return-indent)
 (org-defkey org-mode-map \C-c?'org-table-field-info)
@@ -20976,6 +20977,36 @@ This command does many different things, depending on context:
 (let ((org-note-abort t))
   (funcall org-finish-function
 
+(defun org-delete-indentation (optional ARG)
+  Join this line to previous and fix up whitespace at join.
+
+If previous line is a headline add to headline text.  Otherwise
+the function calls `delete-indentation'.
+
+With argument, join this line to following line.
+  (interactive *P)
+  (if (save-excursion
+	(if ARG (beginning-of-line)
+	  (forward-line -1))
+	(looking-at org-complex-heading-regexp))
+  ;; At headline.
+  (let ((tags-column (when (match-beginning 5)
+			   (save-excursion (goto-char (match-beginning 5))
+	   (current-column
+	(string (concat   (progn (when ARG (forward-line 1))
+   (org-trim (delete-and-extract-region
+		  (line-beginning-position)
+		  (line-end-position)))
+	(unless (bobp) (delete-region (point) (1- (point
+	(goto-char (or (match-beginning 5)
+		   (match-end 0)))
+	(skip-chars-backward  \t)
+	(save-excursion (insert string))
+	;; Adjust alignment of tags.
+	(when tags-column
+	  (org-align-tags-here (if org-auto-align-tags org-tags-column tags-column
+(delete-indentation ARG)))
+
 (defun org-open-line (n)
   Insert a new row in tables, call `open-line' elsewhere.
 If `org-special-ctrl-o' is nil, just call `open-line' everywhere.
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 2f21c8e..04e0843 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -833,6 +833,36 @@
 
 ;;; Editing
 
+(ert-deftest 

Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Eric S Fraga
Mind you, having played around with emacs -Q and my test file, I have
run into another bug.  If I specify org-indent in the startup options, I
get a very strange indentation.  See attached screenshot.  I wonder if
this is related to my problem?

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1147-g0e5069


Re: [O] A Microsoftesque detail in org

2015-05-17 Thread Rasmus
Titus von der Malsburg malsb...@posteo.de writes:

 One minor cosmetic issue:

 * TODO foo bar   :test:

 When I RET between foo and bar, the tag moves to the left.  I think it
 would be nicer if it would stay where it was.

In the attached patch current column of tags is used if
org-auto-align-tags is nil.  Otherwise org-tags-column is used.

I'll push this unless any other undesirable behaviors are found.

Thanks,
Rasmus

-- 
⠠⠵
From 112b91cdc2887b1cc4451549dd4dd0c2e6a370ac Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Fri, 15 May 2015 13:08:11 +0200
Subject: [PATCH 1/3] org.el: RET breaks headline text

* org.el (org-return): RET breaks headline text.
* test-org.el (test-org/return): Test org-return on headline text.
* ORG-NEWS: Add entry on new org-return behavior.
---
 etc/ORG-NEWS |   4 +
 lisp/org.el  | 222 +++
 testing/lisp/test-org.el |  31 ++-
 3 files changed, 61 insertions(+), 196 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 3803060..a3e1ae2 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -93,6 +93,10 @@ functions.  The Org version of these functions skips over inline tasks
 *** ~org-element-context~ no longer return objects in keywords
 ~org-element-context~ used to return objects on some keywords, i.e.,
 =TITLE=, =DATE= and =AUTHOR=.  It now returns only the keyword.
+*** Behavior of ~org-return~ changed
+If point is before or after the true headline text, insert newline
+without changing the text.  If point is on headline text preserve
+tags.
 ** Removed functions
 *** Removed function ~org-translate-time~
 Use ~org-timestamp-translate~ instead.
diff --git a/lisp/org.el b/lisp/org.el
index 4b44a94..a46cb86 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19845,189 +19845,6 @@ boundaries.
 (org-defkey org-mode-map \C-c|'org-table-create-or-convert-from-region)
 (org-defkey org-mode-map [(control ?#)] 'org-table-rotate-recalc-marks)
 (org-defkey org-mode-map \C-c~'org-table-create-with-table.el)
-(org-defkey org-mode-map \C-c\C-a 'org-attach)
-(org-defkey org-mode-map \C-c}'org-table-toggle-coordinate-overlays)
-(org-defkey org-mode-map \C-c{'org-table-toggle-formula-debugger)
-(org-defkey org-mode-map \C-c\C-e 'org-export-dispatch)
-(org-defkey org-mode-map \C-c:'org-toggle-fixed-width)
-(org-defkey org-mode-map \C-c\C-x\C-f 'org-emphasize)
-(org-defkey org-mode-map \C-c\C-xf'org-footnote-action)
-(org-defkey org-mode-map \C-c\C-x\C-mg'org-mobile-pull)
-(org-defkey org-mode-map \C-c\C-x\C-mp'org-mobile-push)
-(org-defkey org-mode-map \C-c@ 'org-mark-subtree)
-(org-defkey org-mode-map \M-h 'org-mark-element)
-(org-defkey org-mode-map [?\C-c (control ?*)] 'org-list-make-subtree)
-;;(org-defkey org-mode-map [?\C-c (control ?-)] 'org-list-make-list-from-subtree)
-
-(org-defkey org-mode-map \C-c\C-x\C-w 'org-cut-special)
-(org-defkey org-mode-map \C-c\C-x\M-w 'org-copy-special)
-(org-defkey org-mode-map \C-c\C-x\C-y 'org-paste-special)
-
-(org-defkey org-mode-map \C-c\C-x\C-t 'org-toggle-time-stamp-overlays)
-(org-defkey org-mode-map \C-c\C-x\C-i 'org-clock-in)
-(org-defkey org-mode-map \C-c\C-x\C-x 'org-clock-in-last)
-(org-defkey org-mode-map \C-c\C-x\C-z 'org-resolve-clocks)
-(org-defkey org-mode-map \C-c\C-x\C-o 'org-clock-out)
-(org-defkey org-mode-map \C-c\C-x\C-j 'org-clock-goto)
-(org-defkey org-mode-map \C-c\C-x\C-q 'org-clock-cancel)
-(org-defkey org-mode-map \C-c\C-x\C-d 'org-clock-display)
-(org-defkey org-mode-map \C-c\C-x\C-r 'org-clock-report)
-(org-defkey org-mode-map \C-c\C-x\C-u 'org-dblock-update)
-(org-defkey org-mode-map \C-c\C-x\C-l 'org-toggle-latex-fragment)
-(org-defkey org-mode-map \C-c\C-x\C-v 'org-toggle-inline-images)
-(org-defkey org-mode-map \C-c\C-x\C-\M-v 'org-redisplay-inline-images)
-(org-defkey org-mode-map \C-c\C-x\\   'org-toggle-pretty-entities)
-(org-defkey org-mode-map \C-c\C-x\C-b 'org-toggle-checkbox)
-(org-defkey org-mode-map \C-c\C-xp'org-set-property)
-(org-defkey org-mode-map \C-c\C-xP'org-set-property-and-value)
-(org-defkey org-mode-map \C-c\C-xe'org-set-effort)
-(org-defkey org-mode-map \C-c\C-xE'org-inc-effort)
-(org-defkey org-mode-map \C-c\C-xo'org-toggle-ordered-property)
-(org-defkey org-mode-map \C-c\C-xi'org-insert-columns-dblock)
-(org-defkey org-mode-map [(control ?c) (control ?x) ?\;] 'org-timer-set-timer)
-
-(org-defkey org-mode-map \C-c\C-x.'org-timer)
-(org-defkey org-mode-map \C-c\C-x-'org-timer-item)
-(org-defkey org-mode-map \C-c\C-x0'org-timer-start)
-(org-defkey org-mode-map \C-c\C-x_'org-timer-stop)
-(org-defkey org-mode-map \C-c\C-x,'org-timer-pause-or-continue)
-
-(define-key org-mode-map \C-c\C-x\C-c 'org-columns)
-
-(define-key org-mode-map \C-c\C-x! 'org-reload)
-
-(define-key org-mode-map \C-c\C-xg 'org-feed-update-all)
-(define-key org-mode-map \C-c\C-xG 'org-feed-goto-inbox)
-
-(define-key 

Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Rasmus
Eric S Fraga e.fr...@ucl.ac.uk writes:

 Mind you, having played around with emacs -Q and my test file, I have
 run into another bug.  If I specify org-indent in the startup options, I
 get a very strange indentation.  See attached screenshot.  I wonder if
 this is related to my problem?

Probably 'cause you havne't loaded org-inlinetask.  Or you toggled
org-indent-mode before.  Perhaps org-inlinetasks should be intelligently
loaded if it seems like an inlinetaks is present.

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




Re: [O] [bug] TODO [/] cookie not updating if list has inline task

2015-05-17 Thread Rasmus
Hi Eric,

Eric S Fraga e.fr...@ucl.ac.uk writes:

 I often use checkbox lists for particular tasks.  If any of the list
 items has an inline task (whether a task or not), the updating of the
 [/] cookie in the headline does not work.  Attached is an example.

 Backtrace is also attached.

Thanks.

Can you try the attached patch?  It seems to work on my system, but
probably more cleanup should be made wrt the old outline-functions.

—Rasmus

-- 
This space is left intentionally blank
From 965aa17b30fd511fbd2f4415104878c52c245550 Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Sun, 17 May 2015 15:48:40 +0200
Subject: [PATCH 4/4] Fix cookie counter bug

* org.el (org-update-statistics-cookies):
* org-list.el (org-update-checkbox-count): Do not use
  outline-next-heading.

Reported-by: Eric S Fraga e.fr...@ucl.ac.uk
http://permalink.gmane.org/gmane.emacs.orgmode/97594
---
 lisp/org-list.el | 12 
 lisp/org.el  |  8 
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index d18dff1..4950e05 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2476,7 +2476,9 @@ With optional prefix argument ALL, do this for the whole buffer.
 		  (cons (point-min) (point-max))
 		(cons (or (ignore-errors (org-back-to-heading t) (point))
 			  (point-min))
-			  (save-excursion (outline-next-heading) (point)
+			  (org-with-wide-buffer
+			   (org-next-visible-heading 1)
+			   (point)
 	  (count-boxes
 	   (function
 	;; Return number of checked boxes and boxes of all types
@@ -2534,15 +2536,17 @@ With optional prefix argument ALL, do this for the whole buffer.
 	   ;; in STRUCTS-BAK.  This should only happen when
 	   ;; heading has more than one cookie on it.
 	   ((and (org-at-heading-p)
-		 (= (save-excursion (outline-next-heading) (point))
+		 (= (org-with-wide-buffer (org-next-visible-heading 1)
+	   (point))
 			 backup-end))
 		(funcall count-boxes nil structs-bak recursivep))
 	   ;; Cookie is at a fresh heading.  Grab structure of
 	   ;; every list containing a checkbox between point and
 	   ;; next headline, and save them in STRUCTS-BAK.
 	   ((org-at-heading-p)
-		(setq backup-end (save-excursion
-   (outline-next-heading) (point))
+		(setq backup-end (org-with-wide-buffer
+  (org-next-visible-heading 1)
+  (point))
 		  structs-bak nil)
 		(while (org-list-search-forward box-re backup-end 'move)
 		  (let* ((struct (org-list-struct))
diff --git a/lisp/org.el b/lisp/org.el
index 0c3e61c..996b9d6 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12867,10 +12867,10 @@ This should be called with the cursor in a line with a statistics cookie.
 	(if (not (org-at-heading-p))
 	(org-update-checkbox-count)
 	  (setq l1 (org-outline-level))
-	  (setq end (save-excursion
-		  (outline-next-heading)
-		  (if (org-at-heading-p) (setq l2 (org-outline-level)))
-		  (point)))
+	  (setq end (org-with-wide-buffer
+		 (org-next-visible-heading 1)
+		 (if (org-at-heading-p) (setq l2 (org-outline-level)))
+		 (point)))
 	  (if (and (save-excursion
 		 (re-search-forward
 		  ^[ \t]*\\([-+*]\\|[0-9]+[.)]\\) \\[[- X]\\] end t))
-- 
2.4.1