[O] Is it possible to pass variable to variables of src block?

2017-12-04 Thread Xi Shen
Hi,

http://orgmode.org/manual/var.html

This wiki explains how to use variable inside a src block. But I wonder if
it is possible to specify variable to the variables in the src definition.

E.g. for the sql src block, I want to execute a script on different server.
I want to define a variable for the ":dbhost" variable.


Regards,
David


[O] bug#28263: 24.5; Org: `C-c LETTER' keys

2017-12-04 Thread Drew Adams
> > Dunno whether there are actual bindings in Org that correspond to these
> > occurrences in the source code of `C-c' followed by a letter.  Might be
> > worth checking.  (Bindings of `C-c' followed by a letter are reserved
> > for users.)  Possibly these are just vestigial doc indications, which
> > could be corrected/updated.
> 
> Org's manual suggests to bind `org-agenda' to `C-c a', but doesn't bind
> it by default.

I'm not even sure that's a great idea.  I think not.

I suppose it's "legit", as the user, not the Org code, would be
making the binding.  But in my libraries I provide binding
suggestions only for keys that are not reserved for use by users.

If a commonly used Emacs library (Org is the best example of that)
suggests to users that they bind `C-c a' to something then that
key becomes pretty much, in effect, lost as a key reserved for
user customization.

IOW, if 90% of Emacs users follow that suggestion then there is
little difference between that situation and the situation of
Org binding `C-c a' by default.

My vote would be that Org should not do this.  Just one opinion.

> Fixed (I used \\[org-agenda] instead of C-c a). Thank you.

Thanks for doing that.





[O] bug#7980: Org links does not allow () - at least http links can contain that

2017-12-04 Thread Nicolas Goaziou
Hello,

Lennart Borgman  writes:

> In `org-make-link-regexps' the characters "()" are excluded in
> `org-plain-link-re'. Is not that wrong at least for http links?

This is not accurate, but usually Org plain links are used when jolting
down notes, as in the following example:

  Visit the Org mode site (http://orgmode.org)

Including "()" in the link could get in the way. IMO, the trade-off is
acceptable. 

Besides, you can use other link types (angle and brackets) for URL with
parenthesis.

WDYT?

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#14910: org-mode `org-open-at-point' doesn't follow id links

2017-12-04 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Hi Oleh,
>
> Oleh  writes:
>
>> As the subject says.
>
> This bug is fixed in upstream Org.  You can either install Org
> separately or wait for the next stable version to be merged in
> Emacs.

I'm closing this bug, per the last comment.

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#28263: 24.5; Org: `C-c LETTER' keys

2017-12-04 Thread Nicolas Goaziou
Hello,

Drew Adams  writes:

> Dunno whether there are actual bindings in Org that correspond to these
> occurrences in the source code of `C-c' followed by a letter.  Might be
> worth checking.  (Bindings of `C-c' followed by a letter are reserved
> for users.)  Possibly these are just vestigial doc indications, which
> could be corrected/updated.

Org's manual suggests to bind `org-agenda' to `C-c a', but doesn't bind
it by default.

> In org-agenda.el:
>
>   ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "C-c a ?"]
>
>   (defun org-agenda-kill-all-agenda-buffers ()
> "Kill all buffers in `org-agenda-mode'.
>   This is used when toggling sticky agendas.
>   You can also explicitly invoke it with `C-c a C-k'."...
>
> In org.el:
>
>   commands `org-search-view' (`C-c a s') and `org-occur-in-agenda-files'.
>   ["Global TODO list" org-todo-list :active t :keys "C-c a t"]
>   ["Find FLAGGED Tasks" (org-agenda nil "?") :active t :keys "C-c
>   a ?"]

Fixed (I used \\[org-agenda] instead of C-c a). Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738





Re: [O] [patch] structure snippet completions

2017-12-04 Thread Eric Abrahamsen
Rasmus  writes:

> Hi,
>
> The attached patch adds expansions of " would like to include this in the next version of Org in anticipation of
> the changes to the template system.

Cool! We were talking about shifting the alist keys to strings, do we
want to do that all at once, in both places, or let this land first?

[...]

>> +(mapcar 'org-tempo-add-block org-structure-template-alist)
>
> #'org-tempo-add-block
>
>> +(mapcar 'org-tempo-add-keyword org-tempo-keywords-alist)))

And `mapc'!




[O] bug#24814: Doc Typo in org-insert-heading

2017-12-04 Thread Nicolas Goaziou
Hello,

Benjamin Wiese  writes:

> The documentation of the function org-insert-heading contains a typo on
> line 21 ('ways' instead of 'way'). This documentation can be viewed by
> typing: C-h f org-insert-heading.

Apparently, the docstring no longer contains the typo.

I'm closing this bug report. Thank you!

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#27711: 25.2; org-feed gets old news as new from some feeds

2017-12-04 Thread Nicolas Goaziou
Hello,

Adonay Felipe Nogueira  writes:

> This was tested with `emacs -Q`.
>
> 1. In the Lisp Interaction buffer, evaluate:
>
> (require 'org-feed)
> (setq org-feed-alist '(("Blog de Bradley Kuhn"
>   "http://ebb.org/bkuhn/rss.xml;
>   "~/Documentos/Notícias.org"
>   "Blog de Bradley Kuhn")))
>
> 2. Then do M-x org-feed-update-all RET. Wait for the entries to be add
>to "~/Documentos/Notícias.org", inside "Blog de Bradley Kuhn".
>
> 3. Delete the entries inside "Blog de Bradley Kuhn", keep the FEEDSTATUS
>drawer.
>
> 4. Do (2) again.
>
> Notice that the old news are fetched as if they were new. In other
> feeds, this doesn't happen (that is: old news isn't fetched again).

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Nicolas Goaziou
Eli Zaretskii  writes:

> Such tests can only be run interactively, because bidi reordering is a
> display-time feature in Emacs.  Is that OK with you?

That's better than no test at all in my book, so I'm fine with it, yes.

I can use isolation characters instead (if anyone cares to point me to
what those are), if you think that's better.

Regards,





Re: [O] [patch] structure snippet completions

2017-12-04 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> The attached patch adds expansions of " would like to include this in the next version of Org in anticipation of
> the changes to the template system.

Thank you. Some, mostly cosmetics, comments follow.
>
> In at least emacs-git it "just works" after requiring org-tempo.
>
> Since it currently uses with-eval-after-load it would require Emacs 24.4,
> but this could be changed to eval-after-load if necessary.

We officially support Emacs 24.3, even though some tests fail. IOW, you
need to use `eval-after-load'.

> * lisp/org-tempo.el: New file.
> * doc/org.texi (Structure templates):
> * etc/ORG-NEWS: Document new library.

No need to document ORG-NEWS changes.

> +@vindex org-tempo

Is it worth mentioning the _variable_ `org-tempo'?

Also,

@cindex Tempo
@cindex Template expansion
@cindex ... whatever ...

> +@vindex org-tempo-keywords-alist

Is 

@vindex org-structure-template-alist

missing?

> +@code{org-tempo} can be used to expand snippets to structures defined
> in

Org Tempo expands snippets...

> +@code{org-structure-template-alist} and @code{org-tempo-keywords-alist}.  For
> +example, @code{org-tempo} makes @kbd{<} @kbd{s} @kbd{@key{TAB}}
> expand to a

For example, Org Tempo makes @kbd(< s @key{TAB}) expand to a code block.

> +@samp{src} code block.  Enable it by customizing @code{org-modules} or add
> +@code{(require 'org-tempo)} to your Emacs init file@footnote{For more
> +information, please refer to the commentary section in
> @code{org-tempo.el}}.

... @file{org-tempo.el}.}.

> +;;; org-tempo.el --- template expansion for org structures -*- 
> lexical-binding: t; -*-

Template expansion for Org structures

> +;; org-tempo reimplements completions of structure template before

Org Tempo implements...

> +(defvar org-tempo-tags nil
> +  "Tempo tags for org-mode")

"Tempo tags for Org mode."

> +(defcustom org-tempo-keywords-alist
> +  '((?L . "latex")
> +(?H . "html")
> +(?A . "ascii")
> +(?i . "index"))
> +  "Keyword templates like `org-structure-template-alist'."

IMO, the docstring doesn't say much for someone discovering the feature.

> +  :group 'org-tempo

You didn't define the `org-tempo' group, did you?

> +  :type '(repeat
> +   (cons (character :tag "Key")
> + (string :tag "Template")))
> +  :package-version '(Org . "9.2"))
> +
> +(defun org-tempo-setup ()
> +  (org-tempo-add-templates)
> +  (tempo-use-tag-list 'org-tempo-tags)
> +  (setq-local tempo-match-finder "^ *\\(<[[:word:]]\\)\\="))
> +
> +(defun org-tempo-add-templates ()
> +  "Update all org-tempo templates.

"Update all Org Tempo templates."

> +Goes through `org-structure-template-alist' and
> +`org-tempo-keywords-alist'."
> +  (let ((keys (mapcar (apply-partially 'format "<%c")

#'format

> +   (mapcar 'car (append org-structure-template-alist
> +org-tempo-keywords-alist)

#'car

but I think the following is simpler:

(mapcar (lambda (pair) (format "<%s" (car pair)))
(append org-structure-template-alist
org-tempo-keywords-alist))

> +(if (> (length keys)
> +   (length (delete-dups keys)))

`when'

> + (user-error
> +  "Duplicated keys in `org-structure-template-alist' and
> `org-tempo-keywords-alist'"))

Is is an issue?

> +(mapcar (lambda (key)
> +   (if (assoc-string key org-tempo-tags)
> +   (setq org-tempo-tags
> + (delete (assoc-string key org-tempo-tags)
> + org-tempo-tags
> + keys)
> +(mapcar 'org-tempo-add-block org-structure-template-alist)

#'org-tempo-add-block

> +(mapcar 'org-tempo-add-keyword org-tempo-keywords-alist)))

#'org-tempo-add-keyword

> +
> +(defun org-tempo-add-block (entry)
> +  "Add block entry from `org-structure-template-alist'."
> +  (let* ((key (format "<%c" (car entry)))
> +  (name (cdr entry)))
> +(tempo-define-template (format "org-%s" (replace-regexp-in-string " " 
> "-" name))
> +`(,(format "#+begin_%s " name) p '> n n
> +  ,(format "#+end_%s" (car (org-split-string name " 
> ")))
> +  >)

`org-split-string' -> `split-string'

> +key
> +(format "Insert a %s block" name)
> +'org-tempo-tags)))
> +
> +(defun org-tempo-add-keyword (entry)
> +  "Add keyword entry from `org-tempo-keywords-alist'."
> +  (let* ((key (format "<%c" (car entry)))
> +  (name (cdr entry)))
> +(tempo-define-template (format "org-%s" (replace-regexp-in-string " " 
> "-" name))
> +`(,(format "#+%s: " name) p '>)
> +key
> +(format "Insert a %s keyword" name)
> +'org-tempo-tags)))
> +
> +;;; Additional keywords
> +
> +(tempo-define-template "org-include"
> +  

[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Eli Zaretskii
> Date: Mon, 04 Dec 2017 22:43:12 +0200
> From: Eli Zaretskii 
> Cc: m...@nicolasgoaziou.fr, 11...@debbugs.gnu.org
> 
> Yes, Emacs implements Unicode 9.0, including the UBA with isolates.

Actually, the current development sources and the upcoming Emacs 26.1
already support Unicode 10.0.





[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Eli Zaretskii
> From: Nicolas Goaziou 
> Cc: Dov Grobgeld ,  11...@debbugs.gnu.org
> Date: Mon, 04 Dec 2017 21:27:53 +0100
> 
> I'd rather preserve structure of Org documents outside of Emacs. So,
> `:align-to' is not an option. 
> 
> IIUC, I need to replace the closest space from vertical bars with 
> 
>   #(" " 0 1 (space :width 1))
> 
> This doesn't sound too difficult.
> 
> However, could someone provide tests cases so we get it right once and
> for all?

Such tests can only be run interactively, because bidi reordering is a
display-time feature in Emacs.  Is that OK with you?





[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Eli Zaretskii
> From: Dov Grobgeld 
> Date: Mon, 4 Dec 2017 21:35:40 +0100
> Cc: Eli Zaretskii , 11...@debbugs.gnu.org
> 
> The correct Unicode≥6.3 way to do this would be with the unicode isolation 
> characters. I.e. you would wrap
> each of the columns with column contents. Does emacs honor these?

Yes, Emacs implements Unicode 9.0, including the UBA with isolates.

However, I suspect that the results of wrapping with isolates will be
different from using the original proposal of using segment separators.





[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Dov Grobgeld
The correct Unicode≥6.3 way to do this would be with the unicode isolation
characters. I.e. you would wrap each of the columns with column
contents. Does emacs honor these? Should be easy to test.

Regards,
Dov

On Mon, Dec 4, 2017 at 9:27 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Eli Zaretskii  writes:
>
> >> Date: Wed, 13 Jun 2012 22:26:35 +0300
> >> From: Dov Grobgeld 
> >>
> >> Imagine you have a buffer with the following logical contents (using the
> >> convention that capitals are RTL characters).
> >>
> >> | abcdef | abc |
> >> | ABCDEF | ABC |
> >>
> >> I would like this to be displayed as:
> >>
> >> | abcdef | abc |
> >> | FEDCBA | CBA |
> >>
> >> The problem is that I want to each column of the table to be isolated
> >> (with regards to bidi influence) from other columns in the table. (Of
> >> course we also want to choose the table direction, but that is a
> >> different and solvable issue.) If there is no such separation, which
> >> is the behaviour currently get in emacs HEAD, then the resulting
> >> rendered buffer is:
> >>
> >> | abcdef | abc |
> >> | CBA | FEDCBA |
> >>
> >> Is this even solvable in the current emacs bidi model?
> >
> > Yes, it is.  The solution involves putting segment separators between
> > the table columns.  These could be TAB characters or a display
> > property whose value is (space . :width N) or (space . :align-to COL).
> >
> > Org maintainers, please ask if you need help in fixing this.
>
> *raises a hand*
>
> I'd rather preserve structure of Org documents outside of Emacs. So,
> `:align-to' is not an option.
>
> IIUC, I need to replace the closest space from vertical bars with
>
>   #(" " 0 1 (space :width 1))
>
> This doesn't sound too difficult.
>
> However, could someone provide tests cases so we get it right once and
> for all?
>
> Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou0x80A93738
>


[O] bug#28072: Org Mode Drawer Folds Unexpectedly

2017-12-04 Thread Nicolas Goaziou
Hello,

Mitch Norcross  writes:

> * ISSUE: Org Mode Drawer Folds Unexpectedly
>
> ** Issue Description
>
>   - Org Mode Drawers fold (unexpected) when user attempts to unfold a plain
> list item within the drawer after having folded it.
>
> ** Steps To Reproduce the Bug
>
>   - Steps
>   1) Create a plain list with some hierarchy in it
>   2) Put the list in a drawer
>   3) Unfold the drawer
>   4) Fold a list item that has children
>   5) Try to unfold the list item that that you folded
>   - Notice that the drawer then folds, unexpectedly
>
> :mydrawer:
>   - Plain list item with children
>   + some notes here
>   + and here
>   + some more here
> :end:

I cannot reproduce it.

More explicitly, I copied the drawer above in a new file. I folded the
top item, then immediately unfolded it. The drawer didn't move.

Am I missing something?

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#11700: 24.1.50; Bad interaction between BiDi and org-tables

2017-12-04 Thread Nicolas Goaziou
Hello,

Eli Zaretskii  writes:

>> Date: Wed, 13 Jun 2012 22:26:35 +0300
>> From: Dov Grobgeld 
>> 
>> Imagine you have a buffer with the following logical contents (using the
>> convention that capitals are RTL characters).
>> 
>> | abcdef | abc |
>> | ABCDEF | ABC |
>> 
>> I would like this to be displayed as:
>> 
>> | abcdef | abc |
>> | FEDCBA | CBA |
>> 
>> The problem is that I want to each column of the table to be isolated
>> (with regards to bidi influence) from other columns in the table. (Of
>> course we also want to choose the table direction, but that is a
>> different and solvable issue.) If there is no such separation, which
>> is the behaviour currently get in emacs HEAD, then the resulting
>> rendered buffer is:
>> 
>> | abcdef | abc |
>> | CBA | FEDCBA |
>> 
>> Is this even solvable in the current emacs bidi model?
>
> Yes, it is.  The solution involves putting segment separators between
> the table columns.  These could be TAB characters or a display
> property whose value is (space . :width N) or (space . :align-to COL).
>
> Org maintainers, please ask if you need help in fixing this.

*raises a hand*

I'd rather preserve structure of Org documents outside of Emacs. So,
`:align-to' is not an option. 

IIUC, I need to replace the closest space from vertical bars with 

  #(" " 0 1 (space :width 1))

This doesn't sound too difficult.

However, could someone provide tests cases so we get it right once and
for all?

Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#24791: bug#24791: org-todo-yesterday behaves like plain org-todo (incorrect timestamp)

2017-12-04 Thread Nicolas Goaziou
Hello,

Allen Li  writes:

> On Fri, Dec 1, 2017 at 1:53 PM, Nicolas Goaziou  
> wrote:
>> Hello,
>>
>> Jan Böhm  writes:
>>
>>> Symptoms: both org-todo-yesterday and org-agenda-todo-yesterday behave
>>> just like normally setting todo state to "DONE" with org-todo.
>>> Specifically, the timestamp
>>> added in the log takes the current time instead of 23:59 of the previous
>>> day, as would be expected.
>>>
>>> Replicate behaviour:
>>> start emacs -Q
>>> set org-log-done to "time"
>>> visit new file and switch to org mode
>>> create TODO headline and set TODO state to "DONE" by calling
>>> "org-todo-yesterday"
>>> ⇒ todo state is set to DONE correctly, but the timestamp inserted in
>>> the log drawer is the current time.
>>
>> I cannot reproduce it in a recent Org release. Could you double-check
>> with a newer Org?
>
> I am going to blindly wager that this is yet another bug caused by Org
> mode's subtle timezone issues.
>
> I can reproduce it (and crucially, I am not in the GMT time zone),
> although the repro recipe produces a CLOSED timestamp and not a log
> drawer timestamp.

I removed timezone references from maint. Can you still reproduce the
issue?

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#18870: bug#18870: \emsp and alignment in org clock report

2017-12-04 Thread Ben Finney
On 04-Dec-2017, Nicolas Goaziou wrote:
> Any 9.X version certainly contains the fix.

Using this version of ‘org-mode’:

Org mode version 9.1.2 (9.1.2-dist @ 
/usr/share/emacs/25.2/site-lisp/elpa/org-9.0.9/)

I confirm that the display of the report is much better:

| Headline| Time   |  |  |
|-++--+--|
| *Total time*| *0:20* |  |  |
|-++--+--|
| Lorem ipsum, dolor sit amet | 0:20   |  |  |
| \_  Suscipit sint quod  || 0:13 |  |
| \_  Ab facilis nulla|| 0:07 |  |
| \_Dolore laborum||  | 0:07 |

Thank you to the Org developers for resolving this bug.

-- 
 \  “A thing moderately good is not so good as it ought to be. |
  `\Moderation in temper is always a virtue; but moderation in |
_o__)   principle is always a vice.” —Thomas Paine |
Ben Finney 


signature.asc
Description: PGP signature


Re: [O] org-depend: TRIGGER XYZ(KEYWORD) not working

2017-12-04 Thread Karl Voit
Hi Adrian,

* Adrian Bradd  wrote:
>
>> Examples:
>>
>>  * Top-Heading
>>
>>  ** TODO Here I invoke org-todo to DONE
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... this is working (i.e., "This should be changed to TODO" gets its
>> TODO keyword).
>>
>>  * Top-Heading with process indicator [0/2]
>>
>>  ** TODO Here I invoke org-todo to DONE
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... this is *not* working.
>>
>> However, anticipating the wrong position:
>>
>>  * Top-Heading with process indicator [0/2]
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** TODO Here I invoke org-todo to DONE
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... is working. And according to this:
>>
>>  * Top-Heading with process indicator [0/2]
>>  :PROPERTIES:
>>  :TRIGGER: 2017-12-03-target(TODO)
>>  :END:
>>
>>  ** TODO Here I invoke org-todo to DONE
>>
>>  ** This should be changed to TODO
>>  :PROPERTIES:
>>  :ID: 2017-12-03-target
>>  :END:
>>
>> ... this is also working. So the update of the process indicator
>> causes the wrong property drawer to be parsed for the relevant
>> TRIGGER property.
>>
>> Contrary to my previous assumption, this is issue is *not* related
>> to big and small files. This is purely related to the existing or
>> missing process indicator of the upper-level heading.
>>
>> I guess I have found the origin of the bug.
>
>
> I'm not able to reproduce what you are seeing above.

Damnit.

This is because I removed the wrong progress indicator from my
examples before posting. You have to change all "[0/2]" with "[%]"
and then you see the issue I described. It seems to be the case that
[/] do work whereas [%] do cause the described malfunctional
behaviour. I was using both and did remove the wrong one.

> I did see an issue with triggered headings not honouring note logging when
> the todo was set to DONE, but I haven't looked any closer at it just yet.

Oh.

> What version of org-mode are you running? If you are using the git version
> can you pull the latest on maint. I performed my testing on maint.

I was using git maint from a couple of days ago and I just updated
the repository.

> =E2=80=8BEven just being able to dig through some code and debug can be a m=
> ajor
> benefit. :-)

And I got the feeling that I learned more about how the elisp code
is working. I should do more debugging even for working code ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] bug#29329: 27.0.50; Missing requirement in org-gnus.el

2017-12-04 Thread Nicolas Goaziou
Hello,

Glenn Morris  writes:

> Speaking for the version in Emacs, apart from org-gnus the warnings are:
>
> In end of data:
> org-irc.el:255:1:Warning: the following functions are not known to be defined:
> erc-save-buffer-in-logs, erc-logging-enabled

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738





[O] bug#29329: 27.0.50; Missing requirement in org-gnus.el

2017-12-04 Thread Glenn Morris

Speaking for the version in Emacs, apart from org-gnus the warnings are:

In end of data:
org-irc.el:255:1:Warning: the following functions are not known to be defined:
erc-save-buffer-in-logs, erc-logging-enabled

(I haven't looked at the code.)





Re: [O] Confused about org-duration-format

2017-12-04 Thread Nicolas Goaziou
Hello,

"Julian M. Burgos"  writes:

> I do not quite follow how to set up org-duration-format.  In particular,
> I would like to have my clock tables represented as decimal hours (e.g.
> 3.50 h, rather than 3:30 h).

I think it would be

  '(("h" . t) (special . 2))

You can test the output with, e.g.

  M-: (org-duration-from-minutes 200 '(("h" . t) (special . 2)))

Regards,

-- 
Nicolas Goaziou



[O] Confused about org-duration-format

2017-12-04 Thread Julian M. Burgos
Dear list,

I do not quite follow how to set up org-duration-format.  In particular,
I would like to have my clock tables represented as decimal hours (e.g.
3.50 h, rather than 3:30 h).

Any help would be welcomed.

Julian

--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Botnsjávarsviðs / Demersal Division
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is



[O] [patch] structure snippet completions

2017-12-04 Thread Rasmus
Hi,

The attached patch adds expansions of "From d5e3eacea38d3777f541f5abddebed04171650b6 Mon Sep 17 00:00:00 2001
From: Rasmus 
Date: Thu, 9 Nov 2017 16:47:13 +0100
Subject: [PATCH 1/2] org-tempo.el: New file for expansion of templates

* lisp/org-tempo.el: New file.
* doc/org.texi (Structure templates):
* etc/ORG-NEWS: Document new library.
* lisp/org.el (org-modules): Add org-tempo.
---
 doc/org.texi  |   9 
 etc/ORG-NEWS  |   4 +-
 lisp/org-tempo.el | 133 ++
 lisp/org.el   |   1 +
 4 files changed, 146 insertions(+), 1 deletion(-)
 create mode 100644 lisp/org-tempo.el

diff --git a/doc/org.texi b/doc/org.texi
index 5becb0175..17092ecbe 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -17396,6 +17396,15 @@ the key is @key{TAB}, the user is prompted to enter a type.
 Available structure types are defined in @code{org-structure-template-alist},
 see the docstring for adding or changing values.
 
+@vindex org-tempo
+@vindex org-tempo-keywords-alist
+@code{org-tempo} can be used to expand snippets to structures defined in
+@code{org-structure-template-alist} and @code{org-tempo-keywords-alist}.  For
+example, @code{org-tempo} makes @kbd{<} @kbd{s} @kbd{@key{TAB}} expand to a
+@samp{src} code block.  Enable it by customizing @code{org-modules} or add
+@code{(require 'org-tempo)} to your Emacs init file@footnote{For more
+information, please refer to the commentary section in @code{org-tempo.el}}.
+
 @multitable @columnfractions 0.2 0.8
 @item @kbd{c} @tab @samp{#+BEGIN_CENTER}
 @item @kbd{C} @tab @samp{#+BEGIN_COMMENT}
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 66865ffe1..9d6c91ef3 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -72,6 +72,8 @@ document, use =shrink= value instead, or in addition to align:
 #+END_EXAMPLE
 
 ** New features
+*** ~org-tempo~ may used for snippet expansion of structure template.
+See manual and commentary in ~org-tempo.el~ for details.
 *** Exclude unnumbered headlines from table of contents
 Set their =UNNUMBERED= property to the special =notoc= value.  See
 manual for details.
@@ -167,7 +169,7 @@ See docstring for details.
 ** Removed functions
 
 *** ~org-try-structure-completion~
-
+=org-tempo= may be used as a replacement.
 ** Removed variables
 
 *** org-babel-use-quick-and-dirty-noweb-expansion
diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el
new file mode 100644
index 0..666954e1b
--- /dev/null
+++ b/lisp/org-tempo.el
@@ -0,0 +1,133 @@
+;;; org-tempo.el --- template expansion for org structures -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2017 Free Software Foundation, Inc.
+;;
+;; Author: Rasmus Pank Roulund 
+;; Keywords: outlines, hypermedia, calendar, wp
+;; Homepage: http://orgmode.org
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+;;
+;;; Commentary:
+;;
+;; org-tempo reimplements completions of structure template before
+;; point like `org-try-structure-completion' in Org v9.1 and earlier.
+;; For example, strings like "

[O] [patch] structure snippet completions

2017-12-04 Thread Rasmus
Hi,

The attached patch adds expansions of "From d5e3eacea38d3777f541f5abddebed04171650b6 Mon Sep 17 00:00:00 2001
From: Rasmus 
Date: Thu, 9 Nov 2017 16:47:13 +0100
Subject: [PATCH 1/2] org-tempo.el: New file for expansion of templates

* lisp/org-tempo.el: New file.
* doc/org.texi (Structure templates):
* etc/ORG-NEWS: Document new library.
* lisp/org.el (org-modules): Add org-tempo.
---
 doc/org.texi  |   9 
 etc/ORG-NEWS  |   4 +-
 lisp/org-tempo.el | 133 ++
 lisp/org.el   |   1 +
 4 files changed, 146 insertions(+), 1 deletion(-)
 create mode 100644 lisp/org-tempo.el

diff --git a/doc/org.texi b/doc/org.texi
index 5becb0175..17092ecbe 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -17396,6 +17396,15 @@ the key is @key{TAB}, the user is prompted to enter a type.
 Available structure types are defined in @code{org-structure-template-alist},
 see the docstring for adding or changing values.
 
+@vindex org-tempo
+@vindex org-tempo-keywords-alist
+@code{org-tempo} can be used to expand snippets to structures defined in
+@code{org-structure-template-alist} and @code{org-tempo-keywords-alist}.  For
+example, @code{org-tempo} makes @kbd{<} @kbd{s} @kbd{@key{TAB}} expand to a
+@samp{src} code block.  Enable it by customizing @code{org-modules} or add
+@code{(require 'org-tempo)} to your Emacs init file@footnote{For more
+information, please refer to the commentary section in @code{org-tempo.el}}.
+
 @multitable @columnfractions 0.2 0.8
 @item @kbd{c} @tab @samp{#+BEGIN_CENTER}
 @item @kbd{C} @tab @samp{#+BEGIN_COMMENT}
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 66865ffe1..9d6c91ef3 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -72,6 +72,8 @@ document, use =shrink= value instead, or in addition to align:
 #+END_EXAMPLE
 
 ** New features
+*** ~org-tempo~ may used for snippet expansion of structure template.
+See manual and commentary in ~org-tempo.el~ for details.
 *** Exclude unnumbered headlines from table of contents
 Set their =UNNUMBERED= property to the special =notoc= value.  See
 manual for details.
@@ -167,7 +169,7 @@ See docstring for details.
 ** Removed functions
 
 *** ~org-try-structure-completion~
-
+=org-tempo= may be used as a replacement.
 ** Removed variables
 
 *** org-babel-use-quick-and-dirty-noweb-expansion
diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el
new file mode 100644
index 0..666954e1b
--- /dev/null
+++ b/lisp/org-tempo.el
@@ -0,0 +1,133 @@
+;;; org-tempo.el --- template expansion for org structures -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2017 Free Software Foundation, Inc.
+;;
+;; Author: Rasmus Pank Roulund 
+;; Keywords: outlines, hypermedia, calendar, wp
+;; Homepage: http://orgmode.org
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+;;
+;;; Commentary:
+;;
+;; org-tempo reimplements completions of structure template before
+;; point like `org-try-structure-completion' in Org v9.1 and earlier.
+;; For example, strings like "

Re: [O] Bug in emphasis fontification

2017-12-04 Thread Kaushal Modi
On Sat, Dec 2, 2017 at 5:30 PM Nicolas Goaziou 
wrote:

> Hopefully fixed. Thank you.
>

Yes, I confirm the fix. Thank you!
-- 

Kaushal Modi


Re: [O] RFC better Unicode support - Unicode Characters causing problems with TAGs etc.

2017-12-04 Thread Nicolas Goaziou
Hello,

"Tim O'Callaghan"  writes:

> I have been experimenting with some Unicode symbols as part of my TODO and
> TAG definitions, to mixed results. I would like to propose that they are
> given first class support, especially in tags and priorities.

I think Unicode in TODO keywords and priority cookies is already
possible.

The regexp for tags is

  ":[[:alnum:]_@#%:]+:"

What would you suggest instead?

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: org-attach-directory should be safe [9.1.3 (9.1.3-10-gadfbfd-elpaplus @ /home/ionasal/.emacs.d/elpa/org-plus-contrib-20171127/)]

2017-12-04 Thread Nicolas Goaziou
Hello,

Allen Li  writes:

> org-attach-directory should be safe to set as a file local or
> directory local string.
>
> This allows the user to set a directory local attachment directory for
> all Org files in a directory tree recursively.
>
> I do not believe there are any security issues to enable arbitrary Org
> files to set org-attach-directory to a string value as the user would
> have to explicitly initiate any attach operations.  The most dangerous
> thing I can think of is an Org file setting the attachment directory
> to the user's home directory and the user running the command to
> delete all attachments.

Fair enough. I added a :safe keyword to the defcustom.

Regards,

-- 
Nicolas Goaziou



[O] bug#18870: bug#18870: \emsp and alignment in org clock report

2017-12-04 Thread Nicolas Goaziou
Hello,

Ben Finney  writes:

> On 04-Dec-2017, Nicolas Goaziou wrote:
>> Ben Finney  writes:
>> > How can we test the change, to know whether this bug is resolved?
>> 
>> You can test the latest ELPA release, scheduled for today
>
> Please state the exact version string, so that we can compare to see
> whether we're using one that meets your description.

We are talking about a 2 years old fix, so exact release doesn't really
matter, really. Any 9.X version certainly contains the fix.

Regards,

-- 
Nicolas Goaziou





Re: [O] org-archive will not compile

2017-12-04 Thread Colin Baxter
> Colin Baxter  writes:

> Hello, As of org-version: 9.1.3 (release_9.1.3-226-g0c6917),
> org-archive.el will not compile:

> org-archive.el:183:1:Error: Invalid read syntax: "."

Please ignore this, I had a locally corrupt file. Sorry.

Best wishes.

-- 
Colin Baxter
m43...@yandex.com




[O] bug#18870: bug#18870: \emsp and alignment in org clock report

2017-12-04 Thread Ben Finney
On 04-Dec-2017, Nicolas Goaziou wrote:
> Ben Finney  writes:
> > How can we test the change, to know whether this bug is resolved?
> 
> You can test the latest ELPA release, scheduled for today

Please state the exact version string, so that we can compare to see
whether we're using one that meets your description.

-- 
 \   “We must find our way to a time when faith, without evidence, |
  `\disgraces anyone who would claim it.” —Sam Harris, _The End of |
_o__) Faith_, 2004 |
Ben Finney 


signature.asc
Description: PGP signature


[O] org-archive will not compile

2017-12-04 Thread Colin Baxter
Hello,

As of org-version: 9.1.3 (release_9.1.3-226-g0c6917), org-archive.el
will not compile:

org-archive.el:183:1:Error: Invalid read syntax: "."

Best wishes,


-- 
Colin Baxter
-
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
-