[O] Bug: Small error in [[info:org#The clock table]] [9.1.3 (9.1.3-10-gadfbfd-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20171127/)]

2017-11-29 Thread Jorge Morais Neto
The mentioned manual section says:
`C-c C-c  or  C-c C-x C-u (`org-dblock-update')'
 Update dynamic block at point.  The cursor needs to be in the
 `#+BEGIN' line of the dynamic block.

However, the docstring only says
User command for updating dynamic blocks.
Update the dynamic block at point.  With prefix ARG, update all dynamic
blocks in the buffer.

It does not say that the cursor must be in the #+BEGIN line.  And
according to my one quick test, it does not need to.

I verified this error also occurs in Master.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Bug? Encoding trouble in org-id-locations-load

2017-11-03 Thread Jorge Morais Neto
On 3 November 2017 at 12:11, Anders Johansson  wrote:
> I use org-id and got some surprising reports of duplicate IDs. It seems that
> the issue is that one of my files containing IDs has a filename consisting
> of some non-ascii characters (a Swedish ä).

This may be related to two problems I had with
~org-icalendar-combine-agenda-files~.  When I invoked that command,
Emacs created some duplicates of buffers for Org files with names
containing non-ASCII Latin-1 characters.  In the names of the
duplicates, each non-ASCII Latin-1 character was replaced by two octal
escape sequences (probably the character code in UTF-8).

The second problem was Emacs interrupting the export to ask me which
character encoding to use for certain "problematic characters".
Strangely, the "problematic characters" were octal escape sequences
which I verified to be correct UTF-8 codes of non-ASCII Latin-1
characters.  Emacs was apparently trying to "reencode" "text" that was
actually UTF-8 code.  Each time I invoked
~org-icalendar-combine-agenda-files~ and Emacs asked that, I chose raw
text encoding so the UTF-8 codes would be left as is.

I finally decided to investigate and traced both problems to some id
links pointing to headlines in files with names containing non-ASCII
Latin-1 characters.  I worked around by setting Org Mode not to export
those links.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Ediff org files starts folded

2017-10-25 Thread Jorge Morais Neto
On 25 October 2017 at 12:04, Alex Branham  wrote:
> Whenever I ediff an org file, the three windows start with the content folded 
> and out of site. I have to navigate to windows A, B, and C and hit S- 
> until everything is visible. Does anyone know a way to start org mode files 
> unfolded when ediffing them?

Spacemacs automatically unfolds both buffers when ediff’ing Org Mode.  I
suppose the mechanism is the presence of ~'show-all~ in
~ediff-prepare-buffer-hook~.  The downside is that, when you finish
ediff’ing, the affected Org buffers are still completely unfolded.

If you want this behavior, perhaps you should use the new function name
– ~outline-show-all~ – instead, because ~show-all~ is an obsolete alias
since GNU Emacs 25.1.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Is it possible to repeat tasks only a certain amount of times?

2017-09-13 Thread Jorge Morais Neto
How about a diary-style sexp entry, with org-class?  That is, something
like ~<%%(org-class 2017 7 31 2018 3 23 1)>~.  That example would appear
on the agenda on every Monday between 2017-07-31 and 2018-03-23.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Automatic mtime and ctime on all or select group of trees?

2017-09-05 Thread Jorge Morais Neto
[unfortunately the first email went only to Adam Porter; now I address the list]
On 2 September 2017 at 22:10, Adam Porter  wrote:
> Thanks for sharing that, I didn't even remember org-expiry.  Very clever
> use of it!  You seem to know more about elisp than you give yourself
> credit for.  :)
Thank you for the encouragement!

>> Suggestions welcome.  It currently
>> gives compile warnings, which I ignore for now:
>>
>> J-org.el:18:1:Warning: defcustom for ‘J-insert-created’ fails to specify
>> containing group
>
> You can fix that by adding e.g. ":group 'org" to the defcustom.
> Normally the defcustom would pick up whatever group was last defined in
> the same file.

Thank you for the tip.  But instead of adding precisely what you
suggested, I have added “:group 'org-expiry”.  The warning is gone and
the option does show up when I invoke customize-group and type
“org-expiry”.  I have run some other minimal tests and it seems to be
working.

Regards

--
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Automatic mtime and ctime on all or select group of trees?

2017-09-02 Thread Jorge Morais Neto
On 31 August 2017 at 08:55, Tim Visher  wrote:
> I would like to track the time I created a tree and the last time it was
> edited, like ctime and mtime on a filesystem. Is that possible to have
> happen automatically?

To insert a creation timestamp I use org-expiry.  I have added ~(require
'org-expiry)~ to my Org Mode setup file.  I could then have enabled
automatic CREATED property insertion by adding ~(org-expiry-insinuate)~.
However, that would make Org insert CREATED not only on heading
creation, but also whenever I performed certain actions – such as
scheduling or deadlining – on headings that lacked CREATED.  I do not
want that.  I want CREATED to reflect the actual creation time.  Old
headlines (from before I enabled org-expiry) are better off without
CREATED than with an inaccurate CREATED timestamp.  Also, I want to be
able to disable on certain files the automatic CREATED insertion.  So
instead of ~(org-expiry-insinuate)~, I added this:

;; HACK?
(defcustom J-insert-created t
  "Whether to automatically add CREATED property (org-expiry) on
heading creation"
  :type 'boolean :safe #'booleanp)

(defun J-insert-created ()
  (when J-insert-created
(org-expiry-insert-created)))

(add-hook 'org-insert-heading-hook #'J-insert-created)

(add-hook 'org-capture-prepare-finalize-hook
  (lambda () (org-map-entries #'org-expiry-insert-created)))

So the CREATED timestamp is always added on capture, and also added on
headline creation except for manually typed headings and buffers where
option ~J-insert-created~ is nil.  I created that option as an option
(instead of a simple variable) so it could be file-local.  This works,
but I'm not sure it's correct and elegant.  I know little Elisp and very
little about defining Emacs options.  Suggestions welcome.  It currently
gives compile warnings, which I ignore for now:

J-org.el:18:1:Warning: defcustom for ‘J-insert-created’ fails to specify
containing group

Org-expiry can also add an EXPIRY property, so it can expire entries
after they become irrelevant with time.  And for entries without EXPIRY,
it can use a (customizable) default time span.  It is documented via
comments on ~org-expiry.el~.  That file comes with org-plus-contrib.

I also customized the following options:
- org-expiry-handler-function
- org-expiry-inactive-timestamps
- org-expiry-wait

Beware that org-expiry interacts badly with the
~org-clone-subtree-with-time-shift~ command.  It messes with org-expiry
timestamps on the clones.  For example, if the original entry is:

* Meeting
:PROPERTIES:
:CREATED:  [2017-09-02 Sáb 20:10]
:EXPIRY:   [2017-12-31]
:END:
<2017-09-04 Seg 10:00-11:00>

and one invokes ~org-clone-subtree-with-time-shift~, asking for one
clone and a ~+1w~ shift, the clone will be:

* Meeting
:PROPERTIES:
:CREATED:  [2017-09-09 Sáb 20:10]
:EXPIRY:   [2018-01-07 Dom]
:END:
<2017-09-11 Seg 10:00-11:00>

which is clearly wrong.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Org mode version 9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/); Org lost my state change note during idle clock resolution

2017-07-02 Thread Jorge Morais Neto
On 1 July 2017 at 13:58, Nicolas Goaziou  wrote:
> Even if the window configuration is lost, I cannot see how the "*Org
> Note*" buffer could be closed. Are you certain it was not accessible
> anymore from the buffer list?
I do not remember and unfortunately I do not have the time to test it
this week.  I intend to test it next week.

Regards

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Org mode version 9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/); Org lost my state change note during idle clock resolution

2017-06-29 Thread Jorge Morais Neto
On 29 June 2017 at 17:11, Jorge Morais Neto <jorge13...@gmail.com> wrote:
> In two days this is the second time Org loses a TODO state change note
> draft.  I guess that, if I realize the note will take time to compose, I
> am supposed to compose it in some file and, only when it is ready,
> change state and yank it.
A correction: the previous draft loss was on Monday, not yesterday.
Still, I had two draft losses in four days.

Regards
-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



[O] Org mode version 9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/); Org lost my state change note during idle clock resolution

2017-06-29 Thread Jorge Morais Neto
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


I changed the TODO state and started composing a state change note.
Later I clocked in a certain task (automatically clocking out of the
previous) and left the computer.  When I returned, some 32 min later,
Org was showing clock idle time resolution.  I typed "i" to consider the
idle time as clock time.  The clock idle time resolution did its job,
but Org lost my note draft and the window configuration from before the
TODO state change.  winner-undo could not restore the window
configuration and AFAIK I had no way to recover the note.

In two days this is the second time Org loses a TODO state change note
draft.  I guess that, if I realize the note will take time to compose, I
am supposed to compose it in some file and, only when it is ready,
change state and yank it.

This time I do not have time to reproduce it in ~emacs -q~.  It happened
in the latest Spacemacs in holy mode.  Unfortunately
M-x org-submit-bug-report failed to collect my Org and Outline
configuration as I requested.

Regards

Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-06-07
Package: Org mode version 9.0.9 (9.0.9-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/)

current state:
==


-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free (as in free speech) software for Android: https://f-droid.org/



[O] Bug: Org loses data if the user types C-u C-c C-c while composing a state change note [9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/)]

2017-06-26 Thread Jorge Morais Neto
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


1. emacs -q
2. M-x package-initialize
3. M-x org-version
   - Just to confirm we are running Org 9.0.9.
4. M-x customize-option RET org-todo-keywords RET
5. Add "(@)" to DONE and set it for current session (C-c C-c)
6. C-x C-f /tmp/bug.org
7. C-S-RET
8. C-c C-t
   - This should change to DONE and prompt for a note.
9. In the note, type "- " to start a plain list
10. Hit C-u C-c C-c to add an empty checkbox

In step 10, the user made a mistake; he wanted to add a checkbox and,
from muscle memory, typed C-u C-c C-c.  However, he was composing a
note, so C-c C-c has different behavior.  The problem is that in this
situation Org discards the note.  When this happened to me, I had spent
at least 15 minutes gathering data and writing it in the note buffer.
This data was lost.  Luckily I can gather the same data a second time,
so I just lost some 15 minutes of my time (plus more than an hour to
report this bug), but it could have been worse.

I am not good at usability design and I do not know precisely how Org
should respond to C-u C-c C-c in this situation, but clearly there are
better options than losing data.  A very simple alternative would be to,
when C-c C-c is given any prefix argument, do nothing except warn that
C-c C-c in that situation closes the note and does not accept a prefix
argument.  Probably this measure also applies to analogous situations in
which valuable data could be lost.

While we are at it, there may be other situations in which the user
might discard a note by accident.  Perhaps Org should prompt before
discarding, or make it reversible.

Regards

Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-06-07
Package: Org mode version 9.0.9 (9.0.9-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/)

-- 
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM, 7z.
- Free (as in free speech) software for Android: https://f-droid.org/.



Re: [O] adjustment of schedules in org

2017-03-10 Thread Jorge Morais Neto
On 9 March 2017 at 14:17, Eric Abrahamsen  wrote:
> You're probably looking for the `org-log-reschedule' option: that will
> let you leave a stamp or take a note if you change the scheduled date of
> an option.
>
> I know that would end up doubling the size of my org files. :)

Also org-log-redeadline, of course.

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Bug: org-agenda-skip-deadline-prewarning-if-scheduled as pre-scheduled has no effect [9.0.5 (9.0.5-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170210/)]

2017-03-05 Thread Jorge Morais Neto
On 5 March 2017 at 15:03, Nicolas Goaziou  wrote:
> It has an effect, but you are enforcing a pre-warning delay of 6 days.
> in the time stamp above.
>
> I think local syntax overrides global settings. IOW, I don't think this
> qualifies as a bug.

It would have been useful for me if 'pre-scheduled would override the
timestamp-specific lead time.  I don't know if this would be useful
widely enough (I myself don't remember having wished it in other
occasions) to justify changing the behavior of 'pre-scheduled or
adding another value (like 'pre-scheduled-override-local) that does
override.

Perhaps we should at least explicitly document the current situation
in the docstring?  Just add an observation at the end:
Note that an eventual explicit lead time in the timestamp
overrides the effect of setting this option to 'pre-scheduled or a
number.

"eventual" above means "if it exists"; "eventual" has this meaning
(among others) in Portuguese; I am not sure if it also does in
English.

Regards
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



[O] Bug: org-agenda-skip-deadline-prewarning-if-scheduled as pre-scheduled has no effect [9.0.5 (9.0.5-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170210/)]

2017-03-02 Thread Jorge Morais Neto
1. Write a file named agenda_bug.org with the following content
(remove indentation):
  *** TODO Dummy
  SCHEDULED: <2017-03-06 Seg> DEADLINE: <2017-03-07 Ter ++1m -6d>

2. Start GNU Emacs 25.2.1 (25.2-rc2) with an empty init.el.
3. (require 'org-agenda)
4. Customize org-agenda-skip-deadline-prewarning-if-scheduled to
   'pre-scheduled
5. Visit agenda_bug.org and type C-c [
6. M-x org-agenda a 
7. The warning of deadline "Dummy" appears under today.  According to the
   docstring of org-agenda-skip-deadline-prewarning-if-scheduled, it should
   not appear before the scheduled date.

Regards

Emacs  : GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2017-02-22
Package: Org mode version 9.0.5 (9.0.5-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20170210/)

current state:
==
(setq
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-shell-link-function 'yes-or-no-p
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-show-block-all append local] 5]
#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
org-babel-result-hide-spec org-babel-hide-all-hashes org-eldoc-load)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
 org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("id" :follow org-id-open)
  ("rmail" :follow org-rmail-open :store org-rmail-store-link)
  ("mhe" :follow org-mhe-open :store org-mhe-store-link)
  ("irc" :follow org-irc-visit :store org-irc-store-link)
  ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
  ("gnus" :follow org-gnus-open :store org-gnus-store-link)
  ("docview" :follow org-docview-open :export org-docview-export :store
org-docview-store-link)
  ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
  ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store org-bbdb-store-link)
  ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
  ("doi" :follow org--open-doi-link) ("elisp" :follow org--open-elisp-link)
  ("file" :complete org-file-complete-link)
  ("ftp" :follow (lambda (path) (browse-url (concat "ftp:" path
  ("help" :follow org--open-help-link)
  ("http" :follow (lambda (path) (browse-url (concat "http:" path
  ("https" :follow (lambda (path) (browse-url (concat "https:" path
  ("mailto" :follow (lambda (path) (browse-url (concat "mailto:; path
  ("message" :follow (lambda (path) (browse-url (concat "message:" path
  ("news" :follow (lambda (path) (browse-url (concat "news:; path
  ("shell" :follow org--open-shell-link))
 org-agenda-files '("/tmp/agenda_bug.org")
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Release 9.0.5

2017-02-10 Thread Jorge Morais Neto
On 10 February 2017 at 11:53, Bastien  wrote:
> Org 9.0.5, a minor bugfix release, is out.
In Org 9.0.5, clock out notes are again stored below the corresponding
clock line, restoring the behavior of an earlier release.  There were
interim releases, up to 9.0.4, that stored the clock out notes /above/
the clock line. Users should be warned to fix clock out notes taken by
affected Org releases.  Existing important data following the interim
convention need to be fixed, transposing each affected clock out note
with the clock line.  If both conventions are mixed, then, to identify
which clock line corresponds to each clock out note, either the user
will need to remember the time period when they used an affected
release, or remember directly which clock out line corresponds to each
ambiguous note, or analise the version history of their Org files.  So
the longer the user takes to address the problem, the greater the
chance of data loss.  I think this issue is important.

Could we provide an Elisp function to fix this semi-automatically?

Regards
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



[O] I have org-plus-contrib from ELPA. How do I temporarily test Org from git?

2017-02-04 Thread Jorge Morais Neto
Hi.  I wanted to temporarily run git Org so I could test a fix by Nicolas
Goaziou.  I have pulled the master branch and adapted local.mk.  In that
file, I set:
  prefix = ~/.emacs.d/locally_built_org

  # Where local lisp files go.
  # $(prefix)/emacs/site-lisp/org
  lispdir= $(prefix)/site-lisp

  # Where local data files go.
  # $(prefix)/emacs/etc/org
  datadir = $(prefix)/etc

  # Where info files go.
  # infodir = $(prefix)/info
  infodir = /usr/local/emacs/share/info

I have built and run ‘make test’ (there were two unexpected test failures, but
they regard functionality I don’t use).  In init.el I added
  (add-to-list 'load-path
   (concat user-emacs-directory
   "locally_built_org/site-lisp"))

At that point (just before ‘sudo make install’), [1] scared me with the
warning "We strongly recommend to stick to a single installation method".
Does that mean I cannot install Org from git if I already have it from ELPA?
I wanted Org from git to just override Org from ELPA.
1: http://orgmode.org/org.html#Installation

As a precaution, I have uninstalled ELPA org-plus-contrib before
‘sudo make install’.  After testing, I installed ELPA org-plus-contrib
again.  Was that really necessary?

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Bug: Log mode shows the wrong clock note [9.0.4 (9.0.4-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170124/)]

2017-02-04 Thread Jorge Morais Neto
On 3 February 2017 at 20:01, Nicolas Goaziou  wrote:
> The fix for the other issue you reported about CLOCK and notes probably
> has also fixed this one. Could you confirm it?

According to my very brief test, yes it fixed.

Thank you!

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



[O] Bug: Log mode shows the wrong clock note [9.0.4 (9.0.4-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170124/)]

2017-02-03 Thread Jorge Morais Neto
Hi.

In log mode, after each clock line the agenda should show the corresponding
clock note.  Instead, it shows the clock note for the previous clock line.
For example, with the entry

  *** Espe2016 exp
  :PROPERTIES:
  :CREATED:  [2017-01-27 Sex 16:50]
  :CATEGORY: ponto exp
  :END:
  :LOGBOOK:
  CLOCK: [2017-02-03 Sex 08:16]--[2017-02-03 Sex 08:28] =>  0:12
  - Saindo agora para o almoço.
  CLOCK: [2017-01-27 Sex 10:28]--[2017-01-27 Sex 11:13] =>  0:45
  CLOCK: [2017-01-26 Qui 13:45]--[2017-01-26 Qui 14:44] =>  0:59
  :END:

The agenda for [2017-02-03 Sex] shows:

  ponto exp:   8:16- 8:28 Clocked:   (0:12) Espe2016 exp - Saindo
agora para o almoço.

(I trimmed some irrelevant tags)  Note that the 08:16-08:28 clock line is
followed by the note corresponding to the /previous/ clock line.

Regards

Emacs  : GNU Emacs 25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-12-31
Package: Org mode version 9.0.4 (9.0.4-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20170124/)

current state:
==
(setq
 org-capture-prepare-finalize-hook '(J-insert-created-and-id-all)
 org-clocktable-defaults '(:maxlevel 2 :lang "en" :scope file :block nil
  :wstart 1 :mstart 1 :tstart nil :tend nil :step nil
  :stepskip0 nil :fileskip0 nil :tags nil :emphasize
  nil :link nil :narrow 40! :indent t :formula nil
  :timestamp nil :level nil :tcolumns nil :formatter nil)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-log-note-clock-out t
 org-footnote-section "Notas de rodapé"
 org-icalendar-combined-agenda-file "~/org/org.ics"
 org-insert-heading-hook '(org-expiry-insert-created)
 org-habit-preceding-days 0
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-special-ctrl-k t
 org-agenda-entry-text-maxlines 3
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-priority-faces '((65 :slant italic :weight bold :foreground "red"
  :background "black")
 (66 :slant italic :weight bold :foreground "red"
  :background "cyan")
 (67 :slant italic :weight bold :foreground "red") (68
:slant italic :weight bold) (69 . italic)
 (70 . default) (71 :foreground "gold") (72 :foreground "yellow"))
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-clock-mode-line-total 'current
 org-confirm-shell-link-function 'yes-or-no-p
 org-id-link-to-org-use-id 'create-if-interactive
 org-finalize-agenda-hook '(J-org-agenda-to-appt-refresh)
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-icalendar-use-deadline '(event-if-not-todo event-if-todo todo-due)
 org-export-default-language "pt_BR"
 org-agenda-sticky t
 org-list-allow-alphabetical t
 org-email-link-description-format "Email %c: %s"
 org-special-ctrl-a/e t
 org-ascii-text-width 77
 org-agenda-custom-commands '(("J" "Now, agenda and TODOs (week)"
  ((tags "now" nil)
(agenda "" ((org-agenda-span (quote week))
   (org-agenda-time-grid (quote (nil nil nil)
(tags-todo "-@GYNO"
((org-agenda-todo-ignore-deadlines (quote
all)) (org-agenda-todo-ignore-scheduled (quote all))
 (org-agenda-todo-ignore-timestamp
  org-deadline-warning-days))
)
)
  ((org-agenda-compact-blocks t)
(org-agenda-tags-todo-honor-ignore-options t)
(org-agenda-tag-filter-preset (quote
  ("-hide"
  )
 ("j" "Now, agenda and TODOs (two days)"
  ((tags "now" nil) (agenda "" ((org-agenda-span
 2) (org-agenda-time-grid (quote (nil nil nil)
(tags-todo "-@GYNO"
((org-agenda-todo-ignore-deadlines (quote
all)) (org-agenda-todo-ignore-scheduled (quote all))
 (org-agenda-todo-ignore-timestamp
  org-deadline-warning-days))
)
)
  ((org-agenda-compact-blocks t)
(org-agenda-tags-todo-honor-ignore-options t)
(org-agenda-tag-filter-preset (quote
  ("-hide"
  )
 ("n" "Entradas a memorizar" tags "mem-hide"
  ((org-agenda-hide-tags-regexp
"\\`\\(mem\\|not_ical\\|h\\|gagá\\)\\'")
(org-agenda-start-with-follow-mode t))
  )
 )
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-expiry-handler-function 'org-toggle-archive-tag
 org-expiry-inactive-timestamps t
 org-todo-keyword-faces '(("DGTD" . "#00FF10") ("FBCK_" . "#A0A0FF") ("FBCK"
 . "blue") ("FIX_COMM" . "#00FF10")
 ("CNTN_" . "#FFA0A0"))
 org-habit-following-days 0
 org-icalendar-use-scheduled '(event-if-todo todo-start)
 org-startup-indented t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-clock-x11idle-program-name "xprintidle"
 org-from-is-user-regexp
"\\\\|\\"
 org-use-tag-inheritance "[^_]$"
 org-icalendar-timezone 

[O] Bug: Org separates clock out note from the clock line [9.0.4 (9.0.4-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170124/)]

2017-01-31 Thread Jorge Morais Neto
Hi.  I have started this instance of GNU Emacs 25.1.91.1 with an empty init
file and then I customized org-log-note-clock-out to t.  Then I created a
new Org buffer with a single level 1 headline, and set property
CLOCK_INTO_DRAWER to nil.  I then clocked in and then out, adding a note.
The note was stored outside any drawer (as requested) and above the clock
line.  Then I clocked in and out again, adding a second note.  The result
was:

  * Teste
:PROPERTIES:
:CLOCK_INTO_DRAWER: nil
:END:
- Teste 2.
- Teste 1.
CLOCK: [2017-01-31 Tue 14:12]--[2017-01-31 Tue 14:13] =>  0:01
CLOCK: [2017-01-31 Tue 14:12]--[2017-01-31 Tue 14:12] =>  0:00

"teste" is Portuguese for "test".

I expected the "Teste 1" line to stay in its place above the corresponding
clock line, like this:

  * Teste
:PROPERTIES:
:CLOCK_INTO_DRAWER: nil
:END:
- Teste 2.
CLOCK: [2017-01-31 Tue 14:12]--[2017-01-31 Tue 14:13] =>  0:01
- Teste 1.
CLOCK: [2017-01-31 Tue 14:12]--[2017-01-31 Tue 14:12] =>  0:00


This bug occurred in my config.  My workaround was to configure Org to add
logs and clock lines into the LOGBOOK drawer.  Then the bug does not
materialize and I get correct result (except that I cannot configure Org the
way I want).

Regards

Emacs  : GNU Emacs 25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-12-31
Package: Org mode version 9.0.4 (9.0.4-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20170124/)

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



[O] How to specify APPT_WARNTIME for entire files?

2017-01-18 Thread Jorge Morais Neto
Hi.  I have set appt-message-warning-time to 10.  However, there are two
files where I would like the warning time to be 0.  Is there a quick way to
do it?  Which?  I do not want to add APPT_WARNTIME properties to each entry
because, if I did that, then:
1. Every time I added a new entry to one of the affected files, I would need
   to remember setting APPT_WARNTIME to the correct value.
2. To later change the warning time for the affected files, I would need to
   change APPT_WARNTIME in each of their entries.
3. There are many such entries, so it would be space-inefficient to have
   APPT_WARNTIME in each.

I have tried to specify "#+PROPERTY: APPT_WARNTIME 5" and enable inheritance
of it through org-use-property-inheritance, but it did not work.  I have
also searched the web and the Org mailing list archives.

I am using Org mode version
9.0.3 (9.0.3-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20161224/)
on GNU Emacs
25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-12-31

Regards
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] org-agenda-filter-effort and "invalid face reference"

2017-01-03 Thread Jorge Morais Neto
On 3 January 2017 at 14:16, Nicolas Goaziou  wrote:
> I cannot reproduce it with, e.g.
>
>   * TODO test
>   :PROPERTIES:
>   :Effort:   2:00
>   :END:
>
> and a bare configuration. Could you double-check you're really using Org
> 9.0.3?
I reproduce it (the behavior and the message in *Messages*) with my own
files and configuration.  I have not tested with a bare configuration.  I have
tested org-agenda-filter-by-effort with both operator = and operator <.

org-version reports
  Org mode version 9.0.3 (9.0.3-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20161224/)

emacs-version reports
  GNU Emacs 25.1.91.1 (x86_64-unknown-linux-gnu, GTK+ Version
3.18.9) of 2016-12-31

Regards
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Disable consistency graphs for some habits

2016-12-12 Thread Jorge Morais Neto
On 9 December 2016 at 21:31, Nicolas Goaziou  wrote:
>> I set them up as org-habit habits for the following desirable features:
>> - Only show on the agenda for today, not for other days.
>> - Appear at the end of the agenda for today.
>> - Hide when I type K.
>
> What about using a regular repeater for that instead of an habit? For
> example, first point is solved using
> `org-agenda-repeating-timestamp-show-all' (or
> `org-agenda-show-future-repeats' in master).

But org-agenda-show-future-repeats affects /all/ repeaters.  I want some
important repeaters (such as regular meetings) to appear on every matching date
as normal.

> You may simply use another agenda view to remove them (last point).
But toggling with K is more practical because it preserves current filters.

Regards

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] org-depend: dependencies between TODO entries in different files

2016-12-12 Thread Jorge Morais Neto
On 8 December 2016 at 08:16, Jorge Morais Neto <jorge13...@gmail.com> wrote:
> On 8 December 2016 at 04:44, Carsten Dominik <domi...@uva.nl> wrote:
>> One additional point is, of course, that org-depend is not part of the core,
>> but was written as a proof of concept.  Is anyone besides Karl using it
>> regularly?  I don't want to break anything by changing it.
> I use it (in a very small number of entries).
I would like to add that, AFAIK, currently I only use org-depend to depend on
entries in the same Org document.  But someday I will probably want to depend
on entries in a different document.

Regards
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] org-depend: dependencies between TODO entries in different files

2016-12-08 Thread Jorge Morais Neto
On 8 December 2016 at 04:44, Carsten Dominik  wrote:
> One additional point is, of course, that org-depend is not part of the core,
> but was written as a proof of concept.  Is anyone besides Karl using it
> regularly?  I don't want to break anything by changing it.
I use it (in a very small number of entries).

Regards
-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Bug: second batch of small documentation problems [9.0 (9.0-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20161102/)]

2016-11-12 Thread Jorge Morais Neto
On 11 November 2016 at 22:47, Nicolas Goaziou  wrote:
> `org-tag-persistent-alist' is about "characters". I think it is clear
> that characters are case-sensitive already.
Currently, the docstring of org-tag-alist says "SELECT is a case-sensitive
letter" and the docstring of org-tag-persistent-alist says "SELECT is a
character".  I thought I should point this out, but it is your call whether this
inconsistency needs to be fixed.

> AFAICT any character is allow, but how could we formulate this?.
Any Emacs character is allowed?  If so, perhaps we could just say "SELECT is an
Emacs character (this includes all Unicode characters)".  But beware that I
know little Org and very little Elisp, so please take my suggestion with a
grain of salt.

Regards

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Bug: second batch of small documentation problems [9.0 (9.0-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20161102/)]

2016-11-07 Thread Jorge Morais Neto
I have some observations about your fixes:

1. Tag keys (for fast selection)
   1) When clarifying that tag keys are case-sensitive letters, we
forgot to adjust
  org-tag-persistent-alist’s docstring.  Please adjust it.
   2) And now that I think of it, is it appropriate to write "a-zA-Z" in
  [[info:org#Setting tags]]?  Are only these characters allowed
and no others?

2. Your changes to [[info:org#The very busy C-c C-c key]]:
   #+BEGIN_QUOTE
   -If the current buffer is a capture buffer, close the note and file it.
   -With a prefix argument, file it, without further interaction, to the
   -default location.
   +If the current buffer is a capture buffer, close the note and file it.  With
   +a prefix argument, jump to the target location, without capturing anything.
   #+END_QUOTE
   The last added sentence seems to actually describe "C-u C-c c" instead of
   "C-u C-c C-c".
3. The new docstring of org-startup-folded
   #+BEGIN_QUOTE
   Set `org-agenda-inhibit-startup' to a non-nil value so as to ignore this
   option when Org opens agenda files for the first time.
   #+END_QUOTE
   The way that excerpt is written, it seems to me that it actively recommends
   setting org-agenda-inhibit-startup to a non-nil value.  We could replace "so
   as to" → "if you want to".  But maybe this is me misunderstanding English –
   my second language – or just being pedantic, I don’t know.

And thank you very much for helping Org!  When the Brazilian real gains a little
more value, I intend to make a donation.  And when I become less overloaded, I
intend to study Emacs Lisp and start writing some patches.

Regards.

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



[O] Bug: second batch of small documentation problems [9.0 (9.0-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20161102/)]

2016-11-06 Thread Jorge Morais Neto
Finally the second batch I promised.  Sorry for having taken this long.


- org-table-convert-region docstring is less complete than the manual\\
  The docstring contains the line:
  #+BEGIN_QUOTE
  integer  When a number, use that many spaces as field separator
  #+END_QUOTE

  [[info:org#Built-in table editor]] says:
  #+BEGIN_QUOTE
  a numeric argument N indicates that at least N consecutive spaces, or
  alternatively a TAB will be the separator.
  #+END_QUOTE
  In the latter, notice the "or alternatively a TAB".  I believe the docstring
  should be complete, so please add this information.
- org-archive-to-archive-sibling ARCHIVE_TIME property\\
  org-archive-to-archive-sibling adds an ARCHIVE_TIME property.  This should be
  documented in the docstring and probably also in the manual.
- [[info:org#The very busy C-c C-c key]]
  #+BEGIN_QUOTE
  − If the current buffer is a capture buffer, close the note and file it.
  With a prefix argument, file it, without further interaction, to the
  default location.
  #+END_QUOTE
  Actually, according to [[info:org#Using capture]] and to my quick test,
  C-c C-c restores the original window configuration, /and the effect of C-u is
  to make it also jump to the captured item/.
- org-match-sparse-tree’s docstring omits it can also match properties.
- [[info:org#Setting tags]] should inform that tag letters for the single-key
  interface are case-sensitive.  In "For this to work well you should assign
  unique letters to most of your commonly used tags.", replace "assign unique
  letters" → "assign unique letters (case-sensitive)".  After "In this
  interface, you can use the following keys:", please write "a-zA-Z" instead of
  "a-z".  Finally, in the docstring of org-tag-alist, please replace "SELECT is
  a character" → "SELECT is a case-sensitive letter".
- org-capture’s docstring could mention ID creation\\
  org-capture creates an ID property if org-id-link-to-org-use-id is set to t.
  This is already documented in that option’s docstring, but perhaps it should
  also be documented in org-capture’s docstring and [[info:org#Using capture]].
  The reason is that if a user is surprised that org-capture created an ID
  property, he will look in org-capture’s docstring or perhaps in the manual
  section.  He may not remember to check org-id-link-to-org-use-id’s docstring.
- org-startup-folded’s docstring misreports the default value of
  org-agenda-inhibit-startup.  The docstring’s last paragraph need changing.
- org-agenda-todo-ignore-deadlines’ docstring about ’far
  The documentation of 'far says:
  #+BEGIN_QUOTE
  Don’t show TODO entries where a deadline has been defined, but the deadline
  is not near.  This is useful if you don’t want to use the todo list to figure
  out what to do now.
  #+END_QUOTE
  I do not understand this reasoning.
- I believe that many people use .emacs.d/init.el instead of .emacs.  To better
  reflect this reality, should not Org’s manual use the expression "Emacs init
  file" instead of ".emacs"?
- Typos and small corrections:
  - Docstring of org-agenda-show-inherited-tags
#+BEGIN_QUOTE
when the value of ‘org-agenda-use-tag-inheritance’ has been taken into
account.
#+END_QUOTE
"has been taken into account." → "enables tag inheritance for the given
agenda type."
  - Docstring of org-agenda-week-view\\
In "Switch to daily view for agenda", "daily" → "weekly".


Emacs  : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-09-18
Package: Org mode version 9.0 (9.0-elpaplus @
/home/jorge/.emacs.d/elpa/org-plus-contrib-20161102/)

current state:
==
(setq
 org-capture-prepare-finalize-hook '(J-insert-created-and-id-all)
 org-clocktable-defaults '(:maxlevel 2 :lang "en" :scope file :block nil
  :wstart 1
  :mstart 1 :tstart nil :tend nil :step nil :stepskip0
  nil
  :fileskip0 nil :tags nil :emphasize nil :link nil
  :narrow 40!
  :indent t :formula nil :timestamp nil :level nil
  :tcolumns nil
  :formatter nil)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-footnote-section "Notas de rodapé"
 org-icalendar-combined-agenda-file "~/org/org.ics"
 org-insert-heading-hook '(org-id-get-create t)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-special-ctrl-k t
 org-agenda-entry-text-maxlines 3
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-priority-faces '((65 :slant italic :weight bold :foreground "red"
  :background
  "black")
 (66 :slant italic :weight bold :foreground "red"
  :background "cyan")
 (67 :slant italic :weight bold :foreground "red")
 (68 :slant italic :weight bold) (69 . italic) (70
. default)
 (71 :foreground "gold") (72 :foreground "yellow")
 (73 :foreground "#50"))
 org-latex-format-inlinetask-function

Re: [O] Bug: org-refile, org-archive-subtree and footnotes [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)]

2016-10-05 Thread Jorge Morais Neto
On 5 October 2016 at 19:24, Nicolas Goaziou  wrote:
> You gave a recipe to reproduce the example. I was being lazy and
> expected the complete (final) example. Anyway, I did my homework.
>
> This should be fixed: the message is slightly less frightening now.
>
> Regards,

Thank you!  Regards

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



Re: [O] Bug: org-refile, org-archive-subtree and footnotes [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)]

2016-10-05 Thread Jorge Morais Neto
On 5 October 2016 at 06:44, Nicolas Goaziou  wrote:
>
> OOC, could you show the footnote section triggering this warning? Org
> Lint ignores property drawers there (i.e., it shouldn't raise an error),
> so I'm wondering how is inserted this timestamp.

I don't understand.  Have I not already given an example in the original email?

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/



[O] Is it generally better practice to specify local variables at the first line for Org files?

2016-10-04 Thread Jorge Morais Neto
Hi.  In most of my Emacs files, I set any file local variables using a local
variables list near the end of the file.  However I just realized a pitfall.
Emacs, according to its manual, only recognizes this local variables list if
its location fulfills two criteria:
1. It starts no more than 3000 characters from the end of the file.
2. It is on the last page if the file is divided into pages.

This means that if I refile some Org subtree to another Org file, and the
refile target is below the local variables list (e. g. if I refile to the top
level, so that Org chooses the end of the file) then the local variables list
may start failing one of the criteria and thus silently stop working.  There
may be other problematic scenarios.

Therefore it seems that, for Org files, it is good practice to avoid this
pitfall by specifying any file local variables via the other method, i.e. on
the first line.  I ask for confirmation that this is a general Org Mode good
practice before I adopt it for all my existing Org files and any future ones.

And if this is in fact a general Org Mode good practice, I propose documenting
it in both manuals: the Emacs manual at [[info:emacs#Specifying File Variables]]
and the Org manual somewhere.

Regards

-- 
• I am Brazilian.  I hope my English is correct and I welcome corrections.
• Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
• Free (as in free speech) software for Android: https://f-droid.org/