Re: [O] Bug: org-paste-subtree displaces folded content [9.1.6 (9.1.6-48-gfe7619-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20180212/)]

2018-02-15 Thread Allen Li
On Thu, Feb 15, 2018 at 1:02 PM Nicolas Goaziou 
wrote:

> Hello,

> Allen Li  writes:

> > With the org file:
> >
> > * foo
> > some content
> > * bar
> > some content 1
> > some content 2
> >
> > 1. C-s foo RET
> > 2. C-c C-x C-w
> > 3. C-r some RET
> > 4. C-c C-x C-y
> >
> > Final content is
> >
> > * bar
> > some content 1
> > * foo
> > some content
> > some content 2

> I can reproduce it.

> > The behavior is insidious when the contents are folded:
> >
> > * foo...
> > * bar...
> >
> > turns into
> >
> > * bar...
> > * foo...

> IIUC, you cannot reproduce the example above when contents are folded,
> since you do not have access to the headline contents.

> > This can displace property and logbook drawers, timestamps, etc with
very
> > little visual indication.
> >
> > Is this behavior even desirable?  To me, killing and yanking subtrees
> > should keep the content with the headings and not "splice" subtrees into
> > the middle of another heading's content

> But you did yank the contents of the subtree into the middle of another
> heading's content. So, what should do Org? Decide that you don't know
> what you are doing and paste it at the end of the current section? What
> if you really want to split the current section?

I modified the example a bit and made the undesired behavior unclear.

* foo
:PROPERTIES:
:ID: a
:END:
* bar
:PROPERTIES:
:ID: b
:END:

Folded, this looks like

* foo...
* bar...

With point on the f in foo, press C-c C-x C-w.  With point on the b in bar,
press C-c C-x C-y.  Results in

* bar
* foo...

Unfolded, this looks like

* bar
* foo
:PROPERTIES:
:ID: a
:END:
:PROPERTIES:
:ID: b
:END:

I would expect C-c C-x C-y to work like C-RET rather than M-RET, that is to
always append after the heading and body rather than splitting it.



> Is there any good solution to this problem?

> Regards,

> --
> Nicolas Goaziou



Re: [O] Bug: org-paste-subtree displaces folded content [9.1.6 (9.1.6-48-gfe7619-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20180212/)]

2018-02-15 Thread Nicolas Goaziou
Hello,

Allen Li  writes:

> With the org file:
>
> * foo
> some content
> * bar
> some content 1
> some content 2
>
> 1. C-s foo RET
> 2. C-c C-x C-w
> 3. C-r some RET
> 4. C-c C-x C-y
>
> Final content is
>
> * bar
> some content 1
> * foo
> some content
> some content 2

I can reproduce it.

> The behavior is insidious when the contents are folded:
>
> * foo...
> * bar...
>
> turns into
>
> * bar...
> * foo...

IIUC, you cannot reproduce the example above when contents are folded,
since you do not have access to the headline contents.

> This can displace property and logbook drawers, timestamps, etc with very
> little visual indication.
>
> Is this behavior even desirable?  To me, killing and yanking subtrees
> should keep the content with the headings and not "splice" subtrees into
> the middle of another heading's content

But you did yank the contents of the subtree into the middle of another
heading's content. So, what should do Org? Decide that you don't know
what you are doing and paste it at the end of the current section? What
if you really want to split the current section?

Is there any good solution to this problem?

Regards,

-- 
Nicolas Goaziou



Re: [O] N tasks per week with sexp diary entries

2018-02-15 Thread Leslie Watter
Hi Gour,

What I've done is create a separate header for every time I have an
appointment on such exercise and re-enter the schedule for that week.

You can see an example at https://pastebin.com/gULUBspW.

Hope it helps.

Cheers,

LEslie

On Thu, Feb 15, 2018 at 6:08 PM, Saša Janiška  wrote:

> On Thu, 15 Feb 2018 12:42:12 +
> Eric S Fraga  wrote:
>
> > Not sure if this is possible or not with sexp entries but maybe look
> > at habits which sound like what you want to do?
>
> That is simple - there are guided programs for exercizing which are
> created by having fixed numbers of workouts per week, but not every
> day, and since my daily obligations do differ from week to week, I'd
> like to track those workouts and be sure that I'm on the track with
> predestined number per week.
>
>
> Sincerely,
> Gour
>
> --
> He who is regulated in his habits of eating, sleeping, recreation
> and work can mitigate all material pains by practicing the yoga system.
>



-- 
Leslie H. Watter


Re: [O] N tasks per week with sexp diary entries

2018-02-15 Thread Saša Janiška
On Thu, 15 Feb 2018 12:42:12 +
Eric S Fraga  wrote:

> Not sure if this is possible or not with sexp entries but maybe look
> at habits which sound like what you want to do?

That is simple - there are guided programs for exercizing which are
created by having fixed numbers of workouts per week, but not every
day, and since my daily obligations do differ from week to week, I'd
like to track those workouts and be sure that I'm on the track with
predestined number per week.


Sincerely,
Gour

-- 
He who is regulated in his habits of eating, sleeping, recreation
and work can mitigate all material pains by practicing the yoga system.


pgp0Etgsdalby.pgp
Description: OpenPGP digital signature


Re: [O] Test failure

2018-02-15 Thread Nick Dokos
Nicolas Goaziou  writes:

> It looks like I created absolute symlinks instead of relative ones.
>
> Could you confirm it is now fixed?
>

It is fixed:

Ran 790 tests, 790 results as expected (2018-02-15 11:45:03-0500)
9 expected failures


Thanks!
-- 
Nick




Re: [O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-15 Thread Eric S Fraga
On Thursday, 15 Feb 2018 at 14:44, Nicolas Goaziou wrote:
> I have the feeling that it would some trouble for little benefit.

Probably!  :-)  Thanks for considering it in any case.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-118-g134243


signature.asc
Description: PGP signature


Re: [O] Test failure

2018-02-15 Thread Nicolas Goaziou
Hello,

Nick Dokos  writes:

> Org mode version 9.1.6 (release_9.1.6-474-g58da7d @ 
> /home/nick/elisp/org-mode/lisp/)
>
> I updated to the above and got two test failures:
>
> ,
> | 2 unexpected results:
> |FAILED  test-org-publish/base-extension
> |FAILED  test-org-publish/get-project-from-filename
> `
>
> Details on the first one:
>
> ,
> | Test test-org-publish/base-extension condition:
> | (file-missing "Opening input file" "No such file or directory" 
> "/home/nick/src/emacs/org/org-mode/testing/examples/pub/link")
> `
>
> Presumably, that's because that path name is a symlink that does not resolve 
> on my system:
>
> ,
> |   /home/nick/src/emacs/org/org-mode/testing/examples/pub:
> |   total used in directory 20 available 8850228
> |   drwxrwxr-x. 3 nick nick   90 Feb 14 13:59 .
> |   drwxrwxr-x. 7 nick nick 4096 Feb 14 13:59 ..
> |   -rw-rw-r--. 1 nick nick  111 Oct 31 16:42 a.org
> |   -rw-rw-r--. 1 nick nick  104 Nov 15 16:00 b.org
> |   -rw-rw-r--. 1 nick nick5 Oct 27 09:14 file.txt
> |   lrwxrwxrwx. 1 nick nick   51 Feb 14 13:57 link -> 
> /home/ngz/dev/org-mode/testing/examples/pub-symlink
> |   -rw-rw-r--. 1 nick nick   12 Oct 27 09:14 noextension
> |   drwxrwxr-x. 2 nick nick   19 Feb 14 13:59 sub
> `
>
>
> The second one fails because of this as well: it's looking for
> .../examples/pub/link/link.org.

It looks like I created absolute symlinks instead of relative ones.

Could you confirm it is now fixed?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-15 Thread Julius Dittmar
Am 15.02.2018 um 14:44 schrieb Nicolas Goaziou:
> Hello,
> 
> Eric S Fraga  writes:
> 
>> For Nicolas or anybody else, I have a feature request.  Would it be
>> possible to shrink columns taking into account the alignment of the
>> column?  For instance, I have a right aligned column which, when shrunk
>> to a given width, appears empty except for long entries.  It would be
>> nice if the shrinking happened from the left in this case.
> 
> You would only see the end of the contents, which, in many situations,
> is only marginally better than seeing nothing at all.
> 
> Also, this would be optimal for centered columns either.
> 
> I have the feeling that it would some trouble for little benefit.

I think what the OP really would like is something like this: remove
leading whitespace until everything can be displayed or no more leading
whitespace remains, then truncate at the end if necessary. That way as
much meaningful contents as possible is displayed. At least that's what
I would wish in this situation.

Julius



Re: [O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-15 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> For Nicolas or anybody else, I have a feature request.  Would it be
> possible to shrink columns taking into account the alignment of the
> column?  For instance, I have a right aligned column which, when shrunk
> to a given width, appears empty except for long entries.  It would be
> nice if the shrinking happened from the left in this case.

You would only see the end of the contents, which, in many situations,
is only marginally better than seeing nothing at all.

Also, this would be optimal for centered columns either.

I have the feeling that it would some trouble for little benefit.

Regards,

-- 
Nicolas Goaziou



Re: [O] Keep clocktable in hours?

2018-02-15 Thread Malcolm Matalka

Eric S Fraga  writes:

> On Thursday, 15 Feb 2018 at 02:24, Malcolm Matalka wrote:
>> clocktable tries to be smart and convert hours to days, but in my
>> situation it'd actually be nicer if clocktable just kept everything in
>> hours.  Is this possible?
>
> Check out org-duration-format.  I have mine set to:
>
> (setq org-duration-format '(("h" . h:mm) ("min" . h:mm)))
>
> for avoid days being used.

Worked like a charm, thanks!



Re: [O] N tasks per week with sexp diary entries

2018-02-15 Thread Eric S Fraga
On Thursday, 15 Feb 2018 at 11:13, Gour wrote:
> Hello,
>
> I have a need to schedule some tasks to be executed several times
> within some period, e.g. 'exercise 3 times per week', no more, no
> less, so I wonder whether it's possible to do it by using sexp diary
> entries?

Not sure if this is possible or not with sexp entries but maybe look at
habits which sound like what you want to do?

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-118-g134243


signature.asc
Description: PGP signature


Re: [O] Org table columns without width cookies get shrunk on TAB

2018-02-15 Thread Eric S Fraga
On Thursday, 15 Feb 2018 at 12:05, Kaushal Modi wrote:
> That's good to know. So no inline images from now on then :)

Not really the message I was trying to convey... actually, I'm not sure
what message I was indeed trying to convey. ;-)

I like gnus because my emails are uncluttered but I still have the
functionality to display HTML messages, should I need to.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-118-g134243


signature.asc
Description: PGP signature


Re: [O] Org table columns without width cookies get shrunk on TAB

2018-02-15 Thread Kaushal Modi
On Thu, Feb 15, 2018, 4:25 AM Eric S Fraga  wrote:

On Wednesday, 14 Feb 2018 at 20:19, Nicolas Goaziou wrote:
>

> My MUA is Gnus, configured to not display images, because I usually do
> > not want to see them.
>
> My MUA is Gnus as well.  Images don't appear initially for me either but
> switching to the HTML part shows them ("b", gnus-article-view-part).  I
> am saying this for Kaushal's benefit: your email was okay as such but
> many of us will not see the images by default.
>

That's good to know. So no inline images from now on then :)

> --

Kaushal Modi


[O] N tasks per week with sexp diary entries

2018-02-15 Thread Gour
Hello,

I have a need to schedule some tasks to be executed several times
within some period, e.g. 'exercise 3 times per week', no more, no
less, so I wonder whether it's possible to do it by using sexp diary
entries?


Sincerely,
Gour

-- 
Not by merely abstaining from work can one achieve freedom
from reaction, nor by renunciation alone can one attain perfection.





Re: [O] Keep clocktable in hours?

2018-02-15 Thread Eric S Fraga
On Thursday, 15 Feb 2018 at 02:24, Malcolm Matalka wrote:
> clocktable tries to be smart and convert hours to days, but in my
> situation it'd actually be nicer if clocktable just kept everything in
> hours.  Is this possible?

Check out org-duration-format.  I have mine set to:

(setq org-duration-format '(("h" . h:mm) ("min" . h:mm)))

for avoid days being used.
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-118-g134243


signature.asc
Description: PGP signature


[O] Feature request: shrink according to alignment (was Re: Org table columns without width cookies get shrunk on TAB)

2018-02-15 Thread Eric S Fraga
On Wednesday, 14 Feb 2018 at 15:58, Kaushal Modi wrote:
> #+title: Width cookies present only on columns that need to be shrunk
> #+startup: shrink

For Nicolas or anybody else, I have a feature request.  Would it be
possible to shrink columns taking into account the alignment of the
column?  For instance, I have a right aligned column which, when shrunk
to a given width, appears empty except for long entries.  It would be
nice if the shrinking happened from the left in this case.

Thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-118-g134243


signature.asc
Description: PGP signature


Re: [O] Org table columns without width cookies get shrunk on TAB

2018-02-15 Thread Eric S Fraga
On Wednesday, 14 Feb 2018 at 20:19, Nicolas Goaziou wrote:
> Kaushal Modi  writes:
>
>> OK, I will upload the images somewhere and then paste the links next
>> time.
>>
>> Does your email client need to be configured to show images?
>
> My MUA is Gnus, configured to not display images, because I usually do
> not want to see them.

My MUA is Gnus as well.  Images don't appear initially for me either but
switching to the HTML part shows them ("b", gnus-article-view-part).  I
am saying this for Kaushal's benefit: your email was okay as such but
many of us will not see the images by default.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-118-g134243


signature.asc
Description: PGP signature


[O] Time shifting functions

2018-02-15 Thread Andrei Beliankou
Dear list members,

I wonder if Org-mode has a convinient function to shift a timestamp with
a (weekly) repeating interval by that interval.

The idea behind is to simple reschedule the ivent without going through
the state cycle and triggering logbook entries and touching the
:LAST_REPEAT: property. Setting off logging for repetitions and done
state for an item or subtree is not an option.

This shift would be effectively a cancel action for a habit.

Is there a ready solution?

Thanks in advance,

Andrei Beliankou



Re: [O] Can’t include file with babel

2018-02-15 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> I am stitching together a number of documents to produce a report.
>>
>> I though I’d be clever and include subfile headings in the right order at
>> the right place using babel.
>>
>> I do something like
>>
>> * Appendix to chapter N
>>
>> #+call: include-between(file="other-paper.org", first="appendix1", 
>> last="appendix3") :results value raw
>>
>> Producing
>>
>> #+RESULTS:
>>
>> #+include: "other-paper.org::*appendix1" :minlevel 2
>> #+include: "other-paper.org::*appendix2" :minlevel 2
>>
>> #+include: "other-paper.org::*appendix3" :minlevel 2
>>
>> This doesn’t work seem to work, I guess because #+include is expanded
>> before anything else.
>
> Correct.
>
>> Should it be possible to include stuff like this using Babel or is it too
>> circular?
>
> The latter.
>
> You can generate programmatically parts of the document with
> `org-export-before-processing-hook'.

That is what I suspected, and I’d probably agree.  It’s no issue, really.

(I also considered rearranging headings based on tags with a tree filter,
 but that is even more convoluted than the above approach).

Thanks,
Rasmus

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