Re: [O] Annotating org exporters

2016-05-10 Thread Sebastian Fischmeister
>
> This sounds a bit like org-entities.  I use this together with cdlatex for
> quickly inserting such things.
>
> Try to type \Rightarrow and type C-c C-x \
> Also try to export to text (non-unicode).  You will get the desired symbol.
>
> Alternatively, you can use one of the many input methods such as TeX or
> rfc1345 in which case you can get the ‘⇒’ by typing ‘\Rightarrow’ or
> ‘&=>’, respectively.  In latex, you can setup unicode-math.

That's interesting, because it's more robust to add something to the
org-entities-user list than to regexp replace a portion of the whole
document.

However, there are two disadvantages to org-entities: (1) they have to
start with a backslash (e.g., \Rightarrow) and (2) they don't seem to
support alphabet-based names, so this doesn't work:

(add-to-list 'org-entities-user '("=>" "\\rightarrow" t "=>" "=>" "»" "»"))

  Sebastian



Re: [O] Annotating org exporters

2016-05-10 Thread Sebastian Fischmeister
Hi Richard,

> There's an example of how to do something like this in the "Advanced
> Configuration" section of the Export section in the manual.  Maybe you
> could adapt it like this?
>
>  (defun my-latex-filter-rightarrow (text backend info)
>(when (org-export-derived-backend-p backend 'latex)
>  (replace-regexp-in-string "=>" "$\rightarrow$" text)))
>
>  (add-to-list 'org-export-filter-plain-text-functions
>   'my-latex-filter-rightarrow)

That works very well. Thank you very much. The only adjustment is to set
LITERAL to non-nil for replace-regexp-in-string and use double backslash.

 (defun my-latex-filter-rightarrow (text backend info)
   (when (org-export-derived-backend-p backend 'latex)
 (replace-regexp-in-string "=>" "$\\rightarrow$" text nil t)))


I'm still undecided between a regex replace and org-entities. Is there
a straightforward way to define own directives for orgmode to then
support something like the following?

#+LaTeX_EXPORT: "=>":"$\rightarrow$"

or more generic

#+EXPORT_EXPAND: latex:"=>":"$\rightarrow$"

Then I could just make these expansions part of the standard header in
my org files.

  Sebastian




Re: [O] Using org-entities to escape symbols

2016-05-10 Thread drymer
It's working! Thank you very much for your time, this will be very useful.

Kaushal Modi:
> On Tue, May 10, 2016 at 6:51 PM Kaushal Modi  wrote:
> 
>> I will see if I can find a workaround for it on 24.5.
>>
> 
> Here's a final try ..
> 
> Please replace the advising function with this one:
> 
> (defun modi/org-insert-org-entity-maybe (orig-fun  args)
>   "When the universal prefix C-u is used before entering any character,
> insert the character's `org-entity' name if available."
>   (let ((pressed-key (char-to-string (elt (this-single-command-keys) 0)))
> entity-name)
> (when (and (listp args) (eq 4 (car args)))
>   (setq entity-name (modi/org-entity-get-name pressed-key))
>   (when entity-name
> (setq entity-name (concat "\\" entity-name "{}"))
> (insert entity-name)
> (message (concat "Inserted `org-entity' "
>  (propertize entity-name
>  'face 'font-lock-function-name-face)
>  " for the symbol "
>  (propertize pressed-key
>  'face 'font-lock-function-name-face)
>  "."
> (when (null entity-name)
>   (apply orig-fun args
> 
> The only change is in this line:
> 
>  (let ((pressed-key (char-to-string (elt (this-single-command-keys) 0)))
> 
> I have quickly verified it to work the same in  both emacs 24.5 and emacs
> 25.x.
> 
> Let me know. Thanks for testing the code.
> 


0x5DDFDAAD.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


[O] Strange interactions between org-indent-mode and other overlays, including show-paren-mode

2016-05-10 Thread Georgiy Tugai
Minor modes which use dynamic overlays, such as

- show-paren-mode
- show-smartparens-mode
- beacon-mode

interact strangely with buffers in org-indent-mode.

Expected behaviour: The org-indent-mode indentation is maintained.

Observed behaviour: The insertion and/or removal of the dynamic overlays
(paren highlights, beacons, etc.) results in a temporary loss of
indentation of the line in question. Sometimes the indentation comes
back once the overlay's gone or after a short period of time, sometimes
it only comes back after point is moved.

GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.3) of 2016-05-06 
on arojas
Org-mode version 8.3.4 (8.3.4-50-g83e373-elpaplus @ 
~/.emacs.d/elpa/org-plus-contrib-20160509/)


signature.asc
Description: PGP signature


Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread numbch...@gmail.com
I moved files to contrib/lisp/. I live in China, hope FSF can assign the
copyright assignment digitally.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Tue, May 10, 2016 at 11:44 PM, Rasmus  wrote:

> "numbch...@gmail.com"  writes:
>
> > I tried to sign the FSF copyright assignment before, but it is very
> > difficult for me. So I give up. Is there other ways to merge this patches
> > without signing the assignment? (I can give up this right)
>
> Normally you "only" need to sign a piece of paper and send it by snail
> mail to the FSF office in the US of A.  But you may be referring to the
> terms of the assignment.
>
> Depending on the issues you faced, it might be best to discuss them with
> ass...@gnu.org, who will have the legal knowledge to give you proper
> advice.
>
> Meanwhile, your files could be added to contrib, which does not require
> you to do the paperwork.  Contrib files are not part of Emacs and would
> not come as part of the default Org package.  To me, Contrib is more
> convenient than MELPA, but I’m not sure everyone would agree.
>
> > Second: I updated branch commit messages in the ChangeLog format.
>
> Thanks.
>
> Rasmus
> --
> However beautiful the theory, one should occasionally look at the evidence
>


[O] Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)]

2016-05-10 Thread David Dynerman
When visiting an org-babel code block in a dedicated window (C-c ' in
the block), I would like to manually save the buffer to a file by calling
write-file (C-x C-w) 

However, this doesn't work - it prompts you for a filename, as expected,
but no matter what filename you enter it always just re-saves the .org
file that contains the babel block you are editing.

Is this expected? If it's not possible to have this functionality, some
kind of error message would be helpful.

Emacs  : GNU Emacs 25.1.50.1 (x86_64-apple-darwin15.4.0, NS appkit-1404.46 
Version 10.11.4 (Build 15E65))
 of 2016-03-24
Package: Org-mode version 8.3.4 (release_8.3.4-778-g8127b3 @ 
/usr/local/share/emacs/site-lisp/org/)



Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
I have updated the final version here:
http://emacs.stackexchange.com/a/16746/115

(also attached for reference)
-- 

-- 
Kaushal Modi


modi-org-entity.el
Description: Binary data


Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
On Tue, May 10, 2016 at 6:51 PM Kaushal Modi  wrote:

> I will see if I can find a workaround for it on 24.5.
>

Here's a final try ..

Please replace the advising function with this one:

(defun modi/org-insert-org-entity-maybe (orig-fun  args)
  "When the universal prefix C-u is used before entering any character,
insert the character's `org-entity' name if available."
  (let ((pressed-key (char-to-string (elt (this-single-command-keys) 0)))
entity-name)
(when (and (listp args) (eq 4 (car args)))
  (setq entity-name (modi/org-entity-get-name pressed-key))
  (when entity-name
(setq entity-name (concat "\\" entity-name "{}"))
(insert entity-name)
(message (concat "Inserted `org-entity' "
 (propertize entity-name
 'face 'font-lock-function-name-face)
 " for the symbol "
 (propertize pressed-key
 'face 'font-lock-function-name-face)
 "."
(when (null entity-name)
  (apply orig-fun args

The only change is in this line:

 (let ((pressed-key (char-to-string (elt (this-single-command-keys) 0)))

I have quickly verified it to work the same in  both emacs 24.5 and emacs
25.x.

Let me know. Thanks for testing the code.
-- 

-- 
Kaushal Modi


Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
On Tue, May 10, 2016 at 6:16 PM drymer  wrote:

> Very strange. I have that piece of code in a file with other things, and
> all of them (behind and after the snippet) is getting evaluated. Also,
> what you're saying still doesn't work.
>
> And now I see. I casually have installed emacs 25 and I just remembered
> it. It works fine there.
>

Bummer. Sorry for wasting your time and thank you for being patient with me!

Turns out a bug in emacs 24.5 is preventing that code from working
correctly:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-25=9d2b8e768f2015a89f7609dedf7b28ea5e8123b5

It has been fixed in 25.x.

I will see if I can find a workaround for it on 24.5.
-- 

-- 
Kaushal Modi


Re: [O] Annotating org exporters

2016-05-10 Thread Rasmus
Rainer M Krug  writes:

> Rasmus  writes:
>
>> Sebastian Fischmeister  writes:
>>
>>> Is there a simple way to build regex-based extensions to the exporters?
>>
>> Yeah, filters.  But I don’t think this is the best way to go about it.
>>
>>> For example, I would like to convert this string "=>" to $\rightarrow$
>>> when converting the document to latex.
>>>
>>> There are lots of other uses, where I could create my shortcuts and
>>> insert them in orgmode files without creating a lot of clutter in the
>>> file.
>>
>> This sounds a bit like org-entities.  I use this together with cdlatex for
>> quickly inserting such things.
>
> Great - learned something. Never knew about org-entities.
>
> Would it be possible to generate *easily* a pdf with all the org-entities?
> Possibly include it in org as a kind of a cheat-sheet for org-entities?

Might be nice...  The styling would be essential.

For personal use you might experiment with the below function?
(I didn't try the resulting latex file).

(defun rasmus-org-entities-as-latex (file)
  (with-current-buffer (or (get-file-buffer file)
   (find-file file))
(erase-buffer)
(insert (mapconcat (lambda (e)
 (format "- =\\%s= ::  \\%s \n"
 (nth 0 e)
 (nth 0 e)))
   (remove-if-not 'listp
  (append org-entities-user 
org-entities))
   ""))
(save-buffer)))

(rasmus-org-entities-as-latex "/tmp/entities.org")

Rasmus

-- 
Together we'll stand, divided we'll fall



Re: [O] Using org-entities to escape symbols

2016-05-10 Thread drymer
Very strange. I have that piece of code in a file with other things, and
all of them (behind and after the snippet) is getting evaluated. Also,
what you're saying still doesn't work.

And now I see. I casually have installed emacs 25 and I just remembered
it. It works fine there.

Kaushal Modi:
> On Tue, May 10, 2016 at 5:25 PM drymer  wrote:
> 
>> I'll try the other approach if we can't make this work, because I like
>> it more x)
>> I've evaluated all of it, even re-opened emacs.
>>
>> Uh, in my description of that function it doesn't say the same, it's the
>> regular one. I've executed toggle-debug-on-error and re-evaluated and
>> nothing. It seems that is not being evaluated.
>>
> 
> That's very strange. One thing is good that now it makes sense why "C-u *"
> is inserting "" in your emacs -Q session.. the advice isn't getting
> applied in the first place!
> 
> Now it is difficult to tell why that advice isn't getting applied in the
> first place. I wonder if the code is actually getting evaluated when you
> think that it is getting evaluated. Can you describe the steps you take to
> evaluate that code?
> 
> Here's one more try:
> 
> 1. Download the attached modi-org-entity.el file
> 2. Run emacs -Q -l /PATH/TO/modi-org-entity.el --eval "(org-mode)" &
> 3. C-u * should then work as expected.
> 
> Make sure to replace "/PATH/TO/" above with the actual path where you
> downloaded modi-org-entity.el.
> 


0x5DDFDAAD.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [O] Bug: Capture template file source variant support in Customize [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/phil/.emacs.d/elpa/org-20160502/)]

2016-05-10 Thread Phil Hudson
On Tue, 10 May 2016 at 10:21:12 pm BST, Nicolas Goaziou 
 wrote:

> Hello,
>
> Phil Hudson  writes:
>
>> Expected: When using the Customize interface to create/edit an Org
>> capture template, we expect to be able to specify a file to write the
>> captured item into using (according to the documentation) any one of:
>>   * a literal filename
>>   * a function
>>   * a variable
>>   * a form
>> But the Customize UI supports only the first of these. The attached
>> patch adds Customize support for the other three variants, in the proper
>> order (increasing generality/decreasing specificity).
>>
>> Note that using Lisp to specify a capture template's target file using a
>> function, variable or sexp *does* work fine and as documented, except
>> that thereafter Customize fails to present the resulting variable
>> correctly; it reverts to showing the alist as one Lisp form. This patch
>> simply "catches up" the Customize UI with what Org can do and is
>> documented as doing.
>
> Sounds good. 
>
> However, wouldn't it make sense to also add these types to other file
> related target locations, e.g., "File & Headline", "File & Outline
> path"... ?

Thanks for the perceptive feedback. I hadn't even thought about it. Your
suggestion definitely sounds like the right thing to do. I'll be back
with a fuller patch, properly gitted and committed.

-- 
Phil Hudson   http://hudson-it.ddns.net
@UWascalWabbit PGP/GnuPG ID: 0x887DCA63



Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
On Tue, May 10, 2016 at 5:25 PM drymer  wrote:

> I'll try the other approach if we can't make this work, because I like
> it more x)
> I've evaluated all of it, even re-opened emacs.
>
> Uh, in my description of that function it doesn't say the same, it's the
> regular one. I've executed toggle-debug-on-error and re-evaluated and
> nothing. It seems that is not being evaluated.
>

That's very strange. One thing is good that now it makes sense why "C-u *"
is inserting "" in your emacs -Q session.. the advice isn't getting
applied in the first place!

Now it is difficult to tell why that advice isn't getting applied in the
first place. I wonder if the code is actually getting evaluated when you
think that it is getting evaluated. Can you describe the steps you take to
evaluate that code?

Here's one more try:

1. Download the attached modi-org-entity.el file
2. Run emacs -Q -l /PATH/TO/modi-org-entity.el --eval "(org-mode)" &
3. C-u * should then work as expected.

Make sure to replace "/PATH/TO/" above with the actual path where you
downloaded modi-org-entity.el.
-- 

-- 
Kaushal Modi


modi-org-entity.el
Description: Binary data


Re: [O] org-agenda-bulk-custom-functions Customize mismatch

2016-05-10 Thread Nicolas Goaziou
Hello,

Phil Hudson  writes:

> The first approach is supported by defcustom and gives us the chance to
> be both more descriptive and more prescriptive. It shouldn't break
> anything that isn't in fact already broken.
>
> The second approach is as simple as changing that `cadr` to a `cdr`, but
> it does risk breaking working configs where the alist was populated
> procedurally.
>
> I propose the first. Here's a patch.

Looks good. Thank you.

Could you send it using "git format-patch". Also, could you provide an
appropriate commit message? See
 for details.

Regards,

-- 
Nicolas Goaziou



Re: [O] Using org-entities to escape symbols

2016-05-10 Thread drymer
I'll try the other approach if we can't make this work, because I like
it more x)
I've evaluated all of it, even re-opened emacs.

Uh, in my description of that function it doesn't say the same, it's the
regular one. I've executed toggle-debug-on-error and re-evaluated and
nothing. It seems that is not being evaluated.

Kaushal Modi:
> On Tue, May 10, 2016 at 4:25 PM drymer  wrote:
> 
>> Hi
>> I didn't explain myself. It inserts four *, as it didn't find the
>> entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint
>> branch. I've also tried with plain emacs without configuration.
>>
> 
> Those emacs and org versions are fine.
> 
> It could be one of two things:
> 1. You forgot to evaluate
> 
> (advice-add 'org-self-insert-command :around
> #'modi/org-insert-org-entity-maybe)
> 
> What do you see when you do C-h f org-self-insert-command after
> evaluating that whole code block?
> 
> I see
> 
> org-self-insert-command is an interactive compiled Lisp function in
> `org.el'.
> 
> (org-self-insert-command N)
> 
> For more information check the manuals.
> 
> :before-until advice: ‘modi/org-insert-org-entity-maybe’
> 
> Like ‘self-insert-command’, use overwrite-mode for whitespace in tables.
> If the cursor is in a table looking at whitespace, the whitespace is
> overwritten, and the table is not marked as requiring realignment.
> 
> The ":before-until advice: ‘modi/org-insert-org-entity-maybe’" part in
> there is important. Do you see the same?
> 
> 2. If from above you see org-self-insert-command being advised correctly,
> then can you let me know what you get when you do
> 
> M-: (modi/org-entity-get-name "*")
> 
> You should get "ast" in return when you evaluate that.
> 
> Also I am confused why you cannot recreate what I see in emacs -Q. Are you
> explicitly using "emacs -Q"? Note that that Q is capital (not emacs -q).
> 


0x5DDFDAAD.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Thomas S. Dye
Aloha John,

Nice!

I had to (require 's) in order to evaluate the function
(s-starts-with?).

All the best,
Tom

John Kitchin writes:

> you might find this approach helpful:
> http://kitchingroup.cheme.cmu.edu/blog/2015/11/21/Insert-org-entities-into-org-mode-with-helm/
>
> drymer writes:
>
>> Hi
>> I didn't explain myself. It inserts four *, as it didn't find the
>> entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint
>> branch. I've also tried with plain emacs without configuration.
>>
>> Kaushal Modi:

 On Tue, May 10, 2016 at 3:28 PM drymer  wrote:

> I evaluated the
> functions, and supposedly it should something like \ast when executing
> C-u *, but it doesn't happen.
>

>>> I reread your initial email.. so look like you see nothing getting inserted
>>> when in do "C-u *"? That is odd.
>>>
>>> Can you do the following and see if things work as intended? If they do,
>>> then there's something conflicting with your config:
>>>
>>> 1. Launch emacs -Q
>>> 2. Paste the whole code block from
>>> http://emacs.stackexchange.com/a/16746/115 to the *scratch* buffer and
>>> evaluate it.
>>> 3. Do C-x b something.org
>>> 4. M-x org-mode
>>> 5. Hit "C-u *"
>>> 6. You should see an asterisk being displayed, which is actually a
>>> prettified version of "\ast{}" which is what actually got inserted.
>>>
>>> Also, please report your emacs and org-mode versions. I am using the latest
>>> build of emacs-25 branch from git and the latest build of org-mode master
>>> branch git.
>>>


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



Re: [O] Bug: Capture template file source variant support in Customize [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/phil/.emacs.d/elpa/org-20160502/)]

2016-05-10 Thread Nicolas Goaziou
Hello,

Phil Hudson  writes:

> Expected: When using the Customize interface to create/edit an Org
> capture template, we expect to be able to specify a file to write the
> captured item into using (according to the documentation) any one of:
>   * a literal filename
>   * a function
>   * a variable
>   * a form
> But the Customize UI supports only the first of these. The attached
> patch adds Customize support for the other three variants, in the proper
> order (increasing generality/decreasing specificity).
>
> Note that using Lisp to specify a capture template's target file using a
> function, variable or sexp *does* work fine and as documented, except
> that thereafter Customize fails to present the resulting variable
> correctly; it reverts to showing the alist as one Lisp form. This patch
> simply "catches up" the Customize UI with what Org can do and is
> documented as doing.

Sounds good. 

However, wouldn't it make sense to also add these types to other file
related target locations, e.g., "File & Headline", "File & Outline
path"... ?

Also, could you provide a patch using `git format-patch'?

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: clock in generates bad drawer [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/carlos/.emacs.d/elpa/org-20160502/)]

2016-05-10 Thread Nicolas Goaziou
Hello,

Carlos Noguera  writes:

> FYI, I just discovered that the behaviour happens if  "Org Clock Into
> Drawer" option in "Org Clock group" is set to "When at least N clock
> entries: 3" and I go from two entries to 3.
> If I change it to  "Into LOGBOOK drawer" I don't have the problem any more.
>
> For the moment, I'll keep in " Into LOGBOOK drawer" as a workaround.
>
> Hope this helps.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
On Tue, May 10, 2016 at 4:25 PM drymer  wrote:

> Hi
> I didn't explain myself. It inserts four *, as it didn't find the
> entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint
> branch. I've also tried with plain emacs without configuration.
>

Those emacs and org versions are fine.

It could be one of two things:
1. You forgot to evaluate

(advice-add 'org-self-insert-command :around
#'modi/org-insert-org-entity-maybe)

What do you see when you do C-h f org-self-insert-command after
evaluating that whole code block?

I see

org-self-insert-command is an interactive compiled Lisp function in
`org.el'.

(org-self-insert-command N)

For more information check the manuals.

:before-until advice: ‘modi/org-insert-org-entity-maybe’

Like ‘self-insert-command’, use overwrite-mode for whitespace in tables.
If the cursor is in a table looking at whitespace, the whitespace is
overwritten, and the table is not marked as requiring realignment.

The ":before-until advice: ‘modi/org-insert-org-entity-maybe’" part in
there is important. Do you see the same?

2. If from above you see org-self-insert-command being advised correctly,
then can you let me know what you get when you do

M-: (modi/org-entity-get-name "*")

You should get "ast" in return when you evaluate that.

Also I am confused why you cannot recreate what I see in emacs -Q. Are you
explicitly using "emacs -Q"? Note that that Q is capital (not emacs -q).
-- 

-- 
Kaushal Modi


Re: [O] Using org-entities to escape symbols

2016-05-10 Thread John Kitchin
you might find this approach helpful:
http://kitchingroup.cheme.cmu.edu/blog/2015/11/21/Insert-org-entities-into-org-mode-with-helm/

drymer writes:

> Hi
> I didn't explain myself. It inserts four *, as it didn't find the
> entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint
> branch. I've also tried with plain emacs without configuration.
>
> Kaushal Modi:
>>>
>>> On Tue, May 10, 2016 at 3:28 PM drymer  wrote:
>>>
 I evaluated the
 functions, and supposedly it should something like \ast when executing
 C-u *, but it doesn't happen.

>>>
>> I reread your initial email.. so look like you see nothing getting inserted
>> when in do "C-u *"? That is odd.
>>
>> Can you do the following and see if things work as intended? If they do,
>> then there's something conflicting with your config:
>>
>> 1. Launch emacs -Q
>> 2. Paste the whole code block from
>> http://emacs.stackexchange.com/a/16746/115 to the *scratch* buffer and
>> evaluate it.
>> 3. Do C-x b something.org
>> 4. M-x org-mode
>> 5. Hit "C-u *"
>> 6. You should see an asterisk being displayed, which is actually a
>> prettified version of "\ast{}" which is what actually got inserted.
>>
>> Also, please report your emacs and org-mode versions. I am using the latest
>> build of emacs-25 branch from git and the latest build of org-mode master
>> branch git.
>>


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Bug: missing header argument does not work any longer [8.3.4 (8.3.4-47-gaf853d-elpaplus c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)]

2016-05-10 Thread Harald Sanftmann

  
  
Hi Nick,

this is what is output to the *gnupolt* buffer:
data =
""
set term svg
set output "data-missing.svg"
set 34
set 56
set 44

this is what I have in the file above:
JET    2012-01-01    1000    
    2012-02-01    2000    100
DUMMY    2012-03-01    3000    
    2012-04-01    4000    100
OMV    2012-05-01    5000    
"OMV PETROM"    2012-06-01    6000    
"OMV PETROM"    2012-07-01    7000    
OMV    2012-08-01    8000    
BP    2012-09-01    9000    

Is this different from what you got?

Thanks & Regards,
Harald

From: Nick Dokos  gmail.com>
Subject: Re:
  Bug: missing header argument does not work any longer [8.3.4
  (8.3.4-47-gaf853d-elpaplus  c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)]
Newsgroups: gmane.emacs.orgmode
Date: 2016-05-06 18:37:52 GMT (4 days, 1 hour and 53 minutes ago)
Harald Sanftmann  web.de> writes:

> I have some org-tables which contain empty fields. I specified :missing "?" to get the right results.
> When I try to plot them with Gnuplot the empty fields are not exported as '?' but just as empty strings
> ''. Gnuplot therefore just uses the next non empty field for the value and therefore shifts the columns
> of the given row.
>
> To make it more concrete:
>
>   #+TBLNAME: data-missing
>   | Comment    |    gnutime | milage/km | something else |
>   |++---+|
>   | JET    | 2012-01-01 |  1000 |    |
>   |    | 2012-02-01 |  2000 |    100 |
>   | DUMMY  | 2012-03-01 |  3000 |    |
>   |    | 2012-04-01 |  4000 |    100 |
>   | OMV    | 2012-05-01 |  5000 |    |
>   | OMV PETROM | 2012-06-01 |  6000 |    |
>   | OMV PETROM | 2012-07-01 |  7000 |    |
>   | OMV    | 2012-08-01 |  8000 |    |
>   | BP | 2012-09-01 |  9000 |    |
>   #+begin_src gnuplot :var data="" :exports both :file data-missing.svg :missing "?" :set
> "xtics nomirror rotate by -45 font \",8\""
>   reset
>   set xtics nomirror rotate by -45 font ",8"
>   set title "Fahr Plot"
>   set xdata time
>   set timefmt "%Y-%m-%d-%H:%M:%S"
>   set xlabel "Time"
>   set ylabel "Distance"
>   set format y "%.0s T%cm"
>   set key top left
>   FIT_LIMIT = 1e-36
>   m=100
>   c=-10
>  
>   y(x) = m*x+c
>   fit y(x) data using 2:3 via c, m
>  
>   plot data u 2:3 w lp lw 1 title 'Distance', \
>    y(x) title "line fit"
>   #+end_src
>
> This is what I get:
> [cid]   
>
> When I fill out the empty fields in the first column of the table I get the right result:
> [cid]   
> I am using Org-mode version 8.3.4. With Org Version 8.2.5h everything works fine.
>
>
> Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
>  of 2015-04-11 on LEG570
> Package: Org-mode version 8.3.4 (8.3.4-47-gaf853d-elpaplusc:/Users/harald/AppData/Roaming/.emacs.d/
> elpa/org-plus-contrib-20160502/)

I use more-or-less latest org:

Org-mode version 8.3.4 (release_8.3.4-718-g634e12)
GNU Emacs 25.0.50.4 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)

FWIW, I cannot reproduce this problem: the plot comes out fine.

--
Nick


  




Re: [O] Using org-entities to escape symbols

2016-05-10 Thread drymer
Hi
I didn't explain myself. It inserts four *, as it didn't find the
entity. I'm using emacs 24.5.3 and org-mode 8.34, which is the maint
branch. I've also tried with plain emacs without configuration.

Kaushal Modi:
>>
>> On Tue, May 10, 2016 at 3:28 PM drymer  wrote:
>>
>>> I evaluated the
>>> functions, and supposedly it should something like \ast when executing
>>> C-u *, but it doesn't happen.
>>>
>>
> I reread your initial email.. so look like you see nothing getting inserted
> when in do "C-u *"? That is odd.
> 
> Can you do the following and see if things work as intended? If they do,
> then there's something conflicting with your config:
> 
> 1. Launch emacs -Q
> 2. Paste the whole code block from
> http://emacs.stackexchange.com/a/16746/115 to the *scratch* buffer and
> evaluate it.
> 3. Do C-x b something.org
> 4. M-x org-mode
> 5. Hit "C-u *"
> 6. You should see an asterisk being displayed, which is actually a
> prettified version of "\ast{}" which is what actually got inserted.
> 
> Also, please report your emacs and org-mode versions. I am using the latest
> build of emacs-25 branch from git and the latest build of org-mode master
> branch git.
> 


0x5DDFDAAD.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [O] PATCH: programming language indicators in HTML export

2016-05-10 Thread Nicolas Goaziou
Hello,

Robert Klein  writes:

> Please find the patch attached.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] PATCH: Add new output formats to plantuml

2016-05-10 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> Nicolas Goaziou  writes:
>
>> Hello,
>>
>> Rainer M Krug  writes:
>>
>>> attached please find a patch which adds additional output file types for
>>> plantuml.
>>
>> Applied. Thank you.
>>
>> Could you provide an entry for ORG-NEWS?
>
> Here it is - hopefully in the right format. The link to the RESULT of
> the example needs to be adjusted, image attached.

Thank you. I didn't include the results of the code block, tho.

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Prevent org-rss-headline dropping lower level headlines

2016-05-10 Thread Nicolas Goaziou
Hello,

Arun Isaac  writes:

> Is there some other maintainer I should contact? I mean, should I be
> posting bug reports and patches to contributed packages on some other
> mailing list?

This ML is fine. The author is Bastien, who is reading it anyway.

> The comment says "Only consider first level headlines". I took that to
> mean that only first level headlines will become individual RSS items,
> but that all contents under that first level headline will be included
> into the corresponding RSS item. Therefore, I concluded that dropping
> lower level headlines was a bug.
>
> But, even if it isn't a bug, I think it makes more sense to include all
> content within the first level headline in the RSS item. I don't see a
> use case where you would want to drop lower level headlines. Please
> correct me if I'm wrong.

Fair enough.

>> Also, isn't the output of `org-html-headline'
>> (`org-export-data-with-backend' is better IMO) a bit verbose? You are
>> going to insert "...
>
> I'm not sure what you mean by verbose.

I mean that the HTML back-end adds data that may not be useful for the
RSS back-end.

> The RSS specification does allow HTML within a CDATA section. Besides,
> org-export-data-with-backend (with the html backend) also inserts the
> "" things, doesn't it?

My remark about `org-export-data-with-backend' is orthogonal to the
output of the function. It is usually better because it doesn't depend
on the name of the translators in HTML back-end.

Could you send an updated patch? Thank you.


Regards,

-- 
Nicolas Goaziou



[O] Bug: missing header argument does not work any longer causing Gnuplot to misinterpret data [8.3.4 (8.3.4-47-gaf853d-elpaplus @ c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-201605

2016-05-10 Thread Harald Sanftmann

  
  
 Hi!
  
  I have some org-tables which contain empty fields. I specified
  :missing "?" to get the right results. When I try to plot them
  with Gnuplot the empty fields are not exported as '?' but just as
  empty strings ''. Gnuplot therefore just uses the next non empty
  field for the value and therefore shifts the columns of the given
  row.
  
  To make it more concrete:
  
    #+TBLNAME: data-missing
    | Comment    |    gnutime | milage/km | something else |
    |++---+|
    | JET    | 2012-01-01 |  1000 |    |
    |    | 2012-02-01 |  2000 |    100 |
    | DUMMY  | 2012-03-01 |  3000 |    |
    |    | 2012-04-01 |  4000 |    100 |
    | OMV    | 2012-05-01 |  5000 |    |
    | OMV PETROM | 2012-06-01 |  6000 |    |
    | OMV PETROM | 2012-07-01 |  7000 |    |
    | OMV    | 2012-08-01 |  8000 |    |
    | BP | 2012-09-01 |  9000 |    |
    #+begin_src gnuplot :var data="" :exports both :file
  data-missing.svg :missing "?" :set "xtics nomirror rotate by -45
  font \",8\""
    reset
    set xtics nomirror rotate by -45 font ",8"
    set title "Fahr Plot"
    set xdata time
    set timefmt "%Y-%m-%d-%H:%M:%S"
    set xlabel "Time"
    set ylabel "Distance"
    set format y "%.0s T%cm"
    set key top left
    FIT_LIMIT = 1e-36
    m=100
    c=-10
   
    y(x) = m*x+c
    fit y(x) data using 2:3 via c, m
   
    plot data u 2:3 w lp lw 1 title 'Distance', \
     y(x) title "line fit"
    #+end_src
  
  This is what I get:
  
  
  When I fill out the empty fields in the first column of the table
  I get the right result:
  
  I am using Org-mode version 8.3.4. With Org Version 8.2.5h
  everything works fine.
  
  Thanks,
  Harald
  
  Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
   of 2015-04-11 on LEG570
  Package: Org-mode version 8.3.4 (8.3.4-47-gaf853d-elpaplus @
c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)
  

  



Re: [O] refile to only headers in the current subtree?

2016-05-10 Thread Subhan Michael Tindall
Unsubscribe

On Sun, May 8, 2016, 7:39 PM Samuel Wales  wrote:

> is it possible to set org-refile-targets so that the targets for
> refiling are restricted to the current header's parent and anything
> below that?
>
>


Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
>
> On Tue, May 10, 2016 at 3:28 PM drymer  wrote:
>
>> I evaluated the
>> functions, and supposedly it should something like \ast when executing
>> C-u *, but it doesn't happen.
>>
>
I reread your initial email.. so look like you see nothing getting inserted
when in do "C-u *"? That is odd.

Can you do the following and see if things work as intended? If they do,
then there's something conflicting with your config:

1. Launch emacs -Q
2. Paste the whole code block from
http://emacs.stackexchange.com/a/16746/115 to the *scratch* buffer and
evaluate it.
3. Do C-x b something.org
4. M-x org-mode
5. Hit "C-u *"
6. You should see an asterisk being displayed, which is actually a
prettified version of "\ast{}" which is what actually got inserted.

Also, please report your emacs and org-mode versions. I am using the latest
build of emacs-25 branch from git and the latest build of org-mode master
branch git.
-- 

-- 
Kaushal Modi


Re: [O] Using org-entities to escape symbols

2016-05-10 Thread Kaushal Modi
On Tue, May 10, 2016 at 3:28 PM drymer  wrote:

> Hi,
>
> So I saw this thread (first link at the very bottom) which response was
> to use a couple of functions. So the thing is that I evaluated the
> functions, and supposedly it should something like \ast when executing
> C-u *, but it doesn't happen. Any idea on what I could be doing wrong?
>


>
> https://emacs.stackexchange.com/questions/16688/how-can-i-escape-the-in-org-mode-to-prevent-bold-fontification


Thanks for trying that out.

So what "doesn't happen"? Do you get an error? Or do you see "\ast{}" being
inserted verbatim?

If it's the former, please provide your emacs or org mode versions and the
error you see.

If it's the latter, the solution is easy :). Simply add below to your
config too.

(setq org-pretty-entities t)

I will update the emacs.SE solution with the same too.
-- 

-- 
Kaushal Modi


[O] Using org-entities to escape symbols

2016-05-10 Thread drymer
Hi,

So I saw this thread (first link at the very bottom) which response was
to use a couple of functions. So the thing is that I evaluated the
functions, and supposedly it should something like \ast when executing
C-u *, but it doesn't happen. Any idea on what I could be doing wrong?

The functions are:

(defun modi/org-entity-get-name (char)
  "Return the entity name for CHAR. For example, return \"ast\" for *."
  (let ((ll (append org-entities-user
org-entities))
e name utf8)
(catch 'break
  (while ll
(setq e (pop ll))
(when (not (stringp e))
  (setq utf8 (nth 6 e))
  (when (string= char utf8)
(setq name (car e))
(throw 'break name)))

(defun modi/org-insert-org-entity-maybe (orig-fun  args)
  "When the universal prefix C-u is used before entering any character,
insert the character's `org-entity' name if available."
  (let ((pressed-key (this-command-keys))
entity-name)
(when (and (listp args) (eq 4 (car args)))
  (setq entity-name (modi/org-entity-get-name pressed-key))
  (when entity-name
(setq entity-name (concat "\\" entity-name "{}"))
(insert entity-name)
(message (concat "Inserted `org-entity' "
 (propertize entity-name
 'face 'font-lock-function-name-face)
 " for the symbol "
 (propertize pressed-key
 'face 'font-lock-function-name-face)
 "."
(when (null entity-name)
  (apply orig-fun args

(advice-add 'org-self-insert-command :around
#'modi/org-insert-org-entity-maybe)


https://emacs.stackexchange.com/questions/16688/how-can-i-escape-the-in-org-mode-to-prevent-bold-fontification

Regards


0x5DDFDAAD.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [O] PATCH: programming language indicators in HTML export

2016-05-10 Thread Robert Klein
Hi,

Rasmus  wrote:

> Robert Klein  writes:
> 
> > Hi,
> >
> > Nicolas Goaziou  wrote:
> >
> >> Hello,
> >> 
> >> Robert Klein  writes:
> >> 
> >> > anyone willing to commit this patch I sent back in march?
> >> 
> >> This patch actually felt through the cracks. Sorry about that.
> >> Would you mind sending it again, using git format-patch so I can
> >> apply it?
> >> 
> >
> > Please find the patch attached.
> 
> I wonder if it would be possible (or even desirable) to build this
> part of the css header automatically?  It may be too prone to
> unexpected bugs.
> 

basically same answer I gave last time;  when you want JS to create the
CSS you still have to map the source block identifier to ``readable''
text elsewhere.  You'd just move the static from org-modes basic CSS
into org-mode.

I think the patch is a bonus for those, that don't roll their own CSS
(e.g. Tianxian Xiong, who first gave me the idea).

Any automated solution would be error-prone, too, and depend on:
- what's the Emacs mode for editing (or is there one at all)?
- is there an ob- module for running the code?
- for LaTeX export: is the language supported by
  - the LaTeX listings package (and what is its name there?)?
  - or the pygments library (for those using the LaTeX minted package)?

One example I use for documentation is `conf' source blocks for
`generic' configuration files.  For LaTeX export I have to add 
   (add-to-list 'org-latex-listings-langs '(conf " "))
to my .emacs, as the listings package doesn't support a `configuration'
language.

It's a hack, but it works.  I don't see a general solution (even if
restricted to the CSS header).

I see my patch as a `best effort' for getting things working out of the
box.  Anyone rolling his own CSS will probably pick his 2 to 5
languages and be happy with them.


Best regards
Robert




[O] Bug: missing header argument does not work any longer causing Gnuplot to misinterpret data [8.3.4 (8.3.4-47-gaf853d-elpaplus @ c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-201605

2016-05-10 Thread Harald Sanftmann

  
  

   Hi!

I have some org-tables which contain empty fields. I specified
:missing "?" to get the right results. When I try to plot them
with Gnuplot the empty fields are not exported as '?' but just
as empty strings ''. Gnuplot therefore just uses the next non
empty field for the value and therefore shifts the columns of
the given row.

To make it more concrete:

  #+TBLNAME: data-missing
  | Comment    |    gnutime | milage/km | something else |
  |++---+|
  | JET    | 2012-01-01 |  1000 |    |
  |    | 2012-02-01 |  2000 |    100 |
  | DUMMY  | 2012-03-01 |  3000 |    |
  |    | 2012-04-01 |  4000 |    100 |
  | OMV    | 2012-05-01 |  5000 |    |
  | OMV PETROM | 2012-06-01 |  6000 |    |
  | OMV PETROM | 2012-07-01 |  7000 |    |
  | OMV    | 2012-08-01 |  8000 |    |
  | BP | 2012-09-01 |  9000 |    |
  #+begin_src gnuplot :var data="" :exports both :file
data-missing.svg :missing "?" :set "xtics nomirror rotate by -45
font \",8\""
  reset
  set xtics nomirror rotate by -45 font ",8"
  set title "Fahr Plot"
  set xdata time
  set timefmt "%Y-%m-%d-%H:%M:%S"
  set xlabel "Time"
  set ylabel "Distance"
  set format y "%.0s T%cm"
  set key top left
  FIT_LIMIT = 1e-36
  m=100
  c=-10
 
  y(x) = m*x+c
  fit y(x) data using 2:3 via c, m
 
  plot data u 2:3 w lp lw 1 title 'Distance', \
   y(x) title "line fit"
  #+end_src

This is what I get:


When I fill out the empty fields in the first column of the
table I get the right result:

I am using Org-mode version 8.3.4. With Org Version 8.2.5h
everything works fine.

Thanks,
Harald

Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Package: Org-mode version 8.3.4 (8.3.4-47-gaf853d-elpaplus @
c:/Users/harald/AppData/Roaming/.emacs.d/elpa/org-plus-contrib-20160502/)

  

  



Re: [O] [PATCH] Prevent org-rss-headline dropping lower level headlines

2016-05-10 Thread Arun Isaac

> This is a contributed package. I don't mind patching it but those have,
> usually, a maintainer.

Is there some other maintainer I should contact? I mean, should I be
posting bug reports and patches to contributed packages on some other
mailing list?

> Are you sure it is a bug? There's a comment about it in
> `org-rss-headline' so maybe it is intended.

The comment says "Only consider first level headlines". I took that to
mean that only first level headlines will become individual RSS items,
but that all contents under that first level headline will be included
into the corresponding RSS item. Therefore, I concluded that dropping
lower level headlines was a bug.

But, even if it isn't a bug, I think it makes more sense to include all
content within the first level headline in the RSS item. I don't see a
use case where you would want to drop lower level headlines. Please
correct me if I'm wrong.

> Also, isn't the output of `org-html-headline'
> (`org-export-data-with-backend' is better IMO) a bit verbose? You are
> going to insert "...

I'm not sure what you mean by verbose. The RSS specification does allow
HTML within a CDATA section.  Besides, org-export-data-with-backend
(with the html backend) also inserts the "" things, doesn't it?



Re: [O] Annotating org exporters

2016-05-10 Thread Rainer M Krug
Rasmus  writes:

> Sebastian Fischmeister  writes:
>
>> Is there a simple way to build regex-based extensions to the exporters?
>
> Yeah, filters.  But I don’t think this is the best way to go about it.
>
>> For example, I would like to convert this string "=>" to $\rightarrow$
>> when converting the document to latex.
>>
>> There are lots of other uses, where I could create my shortcuts and
>> insert them in orgmode files without creating a lot of clutter in the
>> file.
>
> This sounds a bit like org-entities.  I use this together with cdlatex for
> quickly inserting such things.

Great - learned something. Never knew about org-entities.

Would it be possible to generate *easily* a pdf with all the org-entities?
Possibly include it in org as a kind of a cheat-sheet for org-entities?

Reading the help in this case is possible but not easy...

Rainer


>
> Try to type \Rightarrow and type C-c C-x \
> Also try to export to text (non-unicode).  You will get the desired symbol.
>
> Alternatively, you can use one of the many input methods such as TeX or
> rfc1345 in which case you can get the ‘⇒’ by typing ‘\Rightarrow’ or
> ‘&=>’, respectively.  In latex, you can setup unicode-math.
>
> Hope it helps,
> Rasmus

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread Ken Mankoff

On 2016-05-10 at 11:58, Rasmus  wrote:
> Ken Mankoff  writes:
>
>> On 2016-05-10 at 11:44, Rasmus  wrote:
>>> "numbch...@gmail.com"  writes:
>>>
>>> Normally you "only" need to sign a piece of paper and send it by
>>> snail mail to the FSF office in the US of A.
>>
>> It is easier than this - it can be done via email. Print sign and
>> scan (photograph w/ phone), or don't even print and just sign
>> digitally.
>
> Isn’t this only available to residents of the USA? Maybe not. It would
> be cool if it’s generally available now.

Hm. I don't know. It didn't occur to me that the signature process was 
different based on where someone lives, but that may be the case.

  -k.



Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread Rasmus
Ken Mankoff  writes:

> On 2016-05-10 at 11:44, Rasmus  wrote:
>> "numbch...@gmail.com"  writes:
>>
>> Normally you "only" need to sign a piece of paper and send it by snail
>> mail to the FSF office in the US of A.
>
> It is easier than this - it can be done via email. Print sign and scan
> (photograph w/ phone), or don't even print and just sign digitally.

Isn’t this only available to residents of the USA?  Maybe not.  It would
be cool if it’s generally available now.

Rasmus

-- 
And when I’m finished thinking, I have to die a lot




Re: [O] Annotating org exporters

2016-05-10 Thread Rasmus
Sebastian Fischmeister  writes:

> Is there a simple way to build regex-based extensions to the exporters?

Yeah, filters.  But I don’t think this is the best way to go about it.

> For example, I would like to convert this string "=>" to $\rightarrow$
> when converting the document to latex.
>
> There are lots of other uses, where I could create my shortcuts and
> insert them in orgmode files without creating a lot of clutter in the
> file.

This sounds a bit like org-entities.  I use this together with cdlatex for
quickly inserting such things.

Try to type \Rightarrow and type C-c C-x \
Also try to export to text (non-unicode).  You will get the desired symbol.

Alternatively, you can use one of the many input methods such as TeX or
rfc1345 in which case you can get the ‘⇒’ by typing ‘\Rightarrow’ or
‘&=>’, respectively.  In latex, you can setup unicode-math.

Hope it helps,
Rasmus

-- 
What will be next?




Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread Ken Mankoff

On 2016-05-10 at 11:44, Rasmus  wrote:
> "numbch...@gmail.com"  writes:
>
> Normally you "only" need to sign a piece of paper and send it by snail
> mail to the FSF office in the US of A.

It is easier than this - it can be done via email. Print sign and scan 
(photograph w/ phone), or don't even print and just sign digitally.

  -k.
  



Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread Rasmus
"numbch...@gmail.com"  writes:

> I tried to sign the FSF copyright assignment before, but it is very
> difficult for me. So I give up. Is there other ways to merge this patches
> without signing the assignment? (I can give up this right)

Normally you "only" need to sign a piece of paper and send it by snail
mail to the FSF office in the US of A.  But you may be referring to the
terms of the assignment.

Depending on the issues you faced, it might be best to discuss them with
ass...@gnu.org, who will have the legal knowledge to give you proper
advice.

Meanwhile, your files could be added to contrib, which does not require
you to do the paperwork.  Contrib files are not part of Emacs and would
not come as part of the default Org package.  To me, Contrib is more
convenient than MELPA, but I’m not sure everyone would agree.

> Second: I updated branch commit messages in the ChangeLog format.

Thanks. 

Rasmus
-- 
However beautiful the theory, one should occasionally look at the evidence



Re: [O] Org 8.3.4 - Problems with bulk reschedule in agenda

2016-05-10 Thread M
> 
> Hi Phil,
>  
> thanks a lot for your help!
> Your questions helped me narrowing down the problem: it occurs, when a *Org
> Note* Window open, which lets me enter a note about the change.
> This is the case for changing deadlines, but it is not activated for scheduled
> dates in my configuration.
>  
> So that means: if I have 3 entries which already have a deadline and I try
> * (marking all) Shift-B d
> and then choose a date,  I can enter the note for the first entry and indeed
> there is a message
> "Acted on 1 entries, skipped 2 (disappeared before their turn)" in the
> minibuffer.
>  
> I found a corresponding bug report - it seems to be fixed (but I installed the
> stable version):
> http://lists.gnu.org/archive/html/emacs-orgmode/2016-03/msg00322.html
>  
> Kind regards
>  
> Martin
>  
> 



Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread numbch...@gmail.com
I tried to sign the FSF copyright assignment before, but it is very
difficult for me. So I give up. Is there other ways to merge this patches
without signing the assignment? (I can give up this right)

Second: I updated branch commit messages in the ChangeLog format.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

On Tue, May 10, 2016 at 5:42 PM, Rasmus  wrote:

> Hi,
>
> Thanks for your patches.
>
> Some comments follow.
>
> "numbch...@gmail.com"  writes:
>
> > - ob-lua
> > - ob-php
> > - ob-redis
> >
> > https://github.com/stardiviner/org-mode
> >
> > Hope maintainer can merge those branches.
>
> First, do you have copyright assignment to the FSF or would you be willing
> to?  This is necessary to merge the patches.  Please refer to,
>
>   http://orgmode.org/worg/org-contribute.html
>
> Second, could you send your work as patches?  I.e. use git format-patch.
> Note the format of the commit message should be in the ChangeLog format
> (refer to the link above).
>
> Thanks,
> Rasmus
>
> --
> History is what should never happen again
>
>
>
From 2589d4e7d28016fb515d2131cbd9ff52797e50eb Mon Sep 17 00:00:00 2001
From: stardiviner 
Date: Tue, 10 May 2016 16:03:32 +0800
Subject: [PATCH] ob-lua.el: add Lua src block executing support

* contrib/lisp/ob-lua.el (org-babel-execute:lua): support executing Lua src block.
---
 contrib/lisp/ob-lua.el | 45 +
 1 file changed, 45 insertions(+)
 create mode 100644 contrib/lisp/ob-lua.el

diff --git a/contrib/lisp/ob-lua.el b/contrib/lisp/ob-lua.el
new file mode 100644
index 000..f33090e
--- /dev/null
+++ b/contrib/lisp/ob-lua.el
@@ -0,0 +1,45 @@
+;;; ob-lua.el --- Execute Lua code within org-mode blocks.
+;; Copyright 2016 stardiviner
+
+;; Author: stardiviner 
+;; Maintainer: stardiviner 
+;; Keywords: org babel lua
+;; URL: https://github.com/stardiviner/ob-lua
+;; Created: 12th April 2016
+;; Version: 0.0.1
+;; Package-Requires: ((org "8"))
+
+;;; Commentary:
+;;
+;; Execute Lua code within org-mode blocks.
+
+;;; Code:
+(require 'org)
+(require 'ob)
+
+(defgroup ob-lua nil
+  "org-mode blocks for Lua."
+  :group 'org)
+
+(defcustom ob-lua:default-session "*lua*"
+  "Default Lua session.
+
+It is lua inferior process from `run-lua'."
+  :group 'ob-lua
+  :type 'string)
+
+;;;###autoload
+(defun org-babel-execute:lua (body params)
+  "org-babel lua hook."
+  (let* ((session (or (cdr (assoc :session params))
+  ob-lua:default-session))
+ (cmd (mapconcat 'identity (list "lua -") " ")))
+(org-babel-eval cmd body)))
+
+;;;###autoload
+(eval-after-load "org"
+  '(add-to-list 'org-src-lang-modes '("lua" . lua)))
+
+(provide 'ob-lua)
+
+;;; ob-lua.el ends here
-- 
2.8.2

From d2e7202930fcf24e7c90826e69bb768094463a0c Mon Sep 17 00:00:00 2001
From: stardiviner 
Date: Tue, 10 May 2016 16:05:38 +0800
Subject: [PATCH] ob-php.el: Add PHP src block executing support

* contrib/lisp/ob-php.el (org-babel-execute:php): support executing PHP
  src block.
---
 contrib/lisp/ob-php.el | 44 
 1 file changed, 44 insertions(+)
 create mode 100644 contrib/lisp/ob-php.el

diff --git a/contrib/lisp/ob-php.el b/contrib/lisp/ob-php.el
new file mode 100644
index 000..31960a5
--- /dev/null
+++ b/contrib/lisp/ob-php.el
@@ -0,0 +1,44 @@
+;;; ob-php.el --- Execute PHP within org-mode blocks.
+;; Copyright 2016 stardiviner
+
+;; Author: stardiviner 
+;; Maintainer: stardiviner 
+;; Keywords: org babel php
+;; URL: https://github.com/stardiviner/ob-php
+;; Created: 04th May 2016
+;; Version: 0.0.1
+;; Package-Requires: ((org "8"))
+
+;;; Commentary:
+;;
+;; Execute PHP within org-mode blocks.
+
+;;; Code:
+(require 'org)
+(require 'ob)
+
+(defgroup ob-php nil
+  "org-mode blocks for PHP."
+  :group 'org)
+
+;; todo
+(defcustom ob-php:inf-php-buffer "*php*"
+  "Default PHP inferior buffer."
+  :group 'ob-php
+  :type 'string)
+
+;;;###autoload
+(defun org-babel-execute:php (body params)
+  "org-babel PHP hook."
+  ;; todo
+  (let* ((cmd (mapconcat 'identity (list "php") " -r ")))
+(org-babel-eval cmd body)
+))
+
+;;;###autoload
+(eval-after-load "org"
+  '(add-to-list 'org-src-lang-modes '("php" . php)))
+
+(provide 'ob-php)
+
+;;; ob-php.el ends here
-- 
2.8.2

From eb3c0cb1467416d141a633c49e1c9050311d92ab Mon Sep 17 00:00:00 2001
From: stardiviner 
Date: Tue, 10 May 2016 16:06:19 +0800
Subject: [PATCH] ob-redis.el: Add Redis src block executing support

* contrib/lisp/ob-redis.el (org-babel-execute:redis): support for
  executing redis src block.
---
 contrib/lisp/ob-redis.el | 44 

Re: [O] Annotating org exporters

2016-05-10 Thread Richard Lawrence
Hi Sebasitan,

Sebastian Fischmeister  writes:

> Is there a simple way to build regex-based extensions to the exporters?
> For example, I would like to convert this string "=>" to $\rightarrow$
> when converting the document to latex.

There's an example of how to do something like this in the "Advanced
Configuration" section of the Export section in the manual.  Maybe you
could adapt it like this?

 (defun my-latex-filter-rightarrow (text backend info)
   (when (org-export-derived-backend-p backend 'latex)
 (replace-regexp-in-string "=>" "$\rightarrow$" text)))

 (add-to-list 'org-export-filter-plain-text-functions
  'my-latex-filter-rightarrow)


Hope that helps!

Best,
Richard



Re: [O] Annotating org exporters

2016-05-10 Thread Rainer M Krug
Sebastian Fischmeister  writes:

> Hi,
>
> Is there a simple way to build regex-based extensions to the exporters?
> For example, I would like to convert this string "=>" to $\rightarrow$
> when converting the document to latex.
>
> There are lots of other uses, where I could create my shortcuts and
> insert them in orgmode files without creating a lot of clutter in the
> file.

I like this idea. It would be ideal if one could define these in the
header of the org document - easy to maintain and to edit.

Cheers,

Rainer

>
>   Sebastian
>

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] Annotating org exporters

2016-05-10 Thread Sebastian Fischmeister
Hi,

Is there a simple way to build regex-based extensions to the exporters?
For example, I would like to convert this string "=>" to $\rightarrow$
when converting the document to latex.

There are lots of other uses, where I could create my shortcuts and
insert them in orgmode files without creating a lot of clutter in the
file.

  Sebastian



Re: [O] Bug: clock in generates bad drawer [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/carlos/.emacs.d/elpa/org-20160502/)]

2016-05-10 Thread Carlos Noguera
Hello Nicolas,


FYI, I just discovered that the behaviour happens if  "Org Clock Into
Drawer" option in "Org Clock group" is set to "When at least N clock
entries: 3" and I go from two entries to 3.
If I change it to  "Into LOGBOOK drawer" I don't have the problem any more.

For the moment, I'll keep in " Into LOGBOOK drawer" as a workaround.

Hope this helps.

Carlos


On Tue, May 10, 2016 at 9:05 AM Carlos Noguera <
carlos.francisco.nogu...@gmail.com> wrote:

> Hi Nicolas,
>
>
> Here you have a trace with an uncompiled Org. Let me know if you need
> something else.
>
> Carlos.
>
> Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
> insert(":" nil ":\n")
> (save-excursion (insert ":" drawer ":\n"))
> (let ((end (point-marker))) (goto-char beg) (save-excursion (insert ":"
> drawer ":\n")) (org-flag-drawer t) (org-indent-region (point) end)
> (forward-line) (if org-log-states-order-reversed nil (goto-char end)
> (beginning-of-line -1)) (set-marker end nil))
> (let ((beg (point))) (insert (mapconcat (function (lambda (p)
> (save-excursion (goto-char p) (org-trim (delete-and-extract-region ...
> ...) positions "\n") "\n:END:\n") (let ((end (point-marker)))
> (goto-char beg) (save-excursion (insert ":" drawer ":\n")) (org-flag-drawer
> t) (org-indent-region (point) end) (forward-line) (if
> org-log-states-order-reversed nil (goto-char end) (beginning-of-line -1))
> (set-marker end nil)))
> (cond ((null positions) (org-end-of-meta-data) (if (bolp) nil (insert
> "\n")) (if (and org-clock-into-drawer (or (not (wholenump
> org-clock-into-drawer)) (< org-clock-into-drawer 2))) (progn (let ((beg
> (point))) (insert ":" drawer ":\n:END:\n") (org-indent-region beg (point))
> (goto-char beg) (org-flag-drawer t) (forward-line) ((or drawer (and
> (wholenump org-clock-into-drawer) (>= (1+ count) org-clock-into-drawer)))
> (org-end-of-meta-data) (let ((beg (point))) (insert (mapconcat (function
> (lambda (p) (save-excursion ... ...))) positions "\n") "\n:END:\n") (let
> ((end (point-marker))) (goto-char beg) (save-excursion (insert ":" drawer
> ":\n")) (org-flag-drawer t) (org-indent-region (point) end) (forward-line)
> (if org-log-states-order-reversed nil (goto-char end) (beginning-of-line
> -1)) (set-marker end nil (org-log-states-order-reversed (goto-char (car
> (last positions (t (goto-char (car positions
> (let ((clock-re (concat "^[ ]*" org-clock-string)) (count 0) positions
> first) (save-excursion (while (re-search-forward clock-re end t) (let
> ((element (org-element-at-point))) (if (eq (org-element-type element)
> (quote clock)) (progn (setq positions (cons ... positions) count (1+
> count))) (cond ((null positions) (org-end-of-meta-data) (if (bolp) nil
> (insert "\n")) (if (and org-clock-into-drawer (or (not (wholenump
> org-clock-into-drawer)) (< org-clock-into-drawer 2))) (progn (let ((beg
> ...)) (insert ":" drawer ":\n:END:\n") (org-indent-region beg (point))
> (goto-char beg) (org-flag-drawer t) (forward-line) ((or drawer (and
> (wholenump org-clock-into-drawer) (>= (1+ count) org-clock-into-drawer)))
> (org-end-of-meta-data) (let ((beg (point))) (insert (mapconcat (function
> (lambda ... ...)) positions "\n") "\n:END:\n") (let ((end (point-marker)))
> (goto-char beg) (save-excursion (insert ":" drawer ":\n")) (org-flag-drawer
> t) (org-indent-region (point) end) (forward-line) (if
> org-log-states-order-reversed nil (goto-char end) (beginning-of-line -1))
> (set-marker end nil (org-log-states-order-reversed (goto-char (car
> (last positions (t (goto-char (car positions)
> (let* ((beg (line-beginning-position)) (end (save-excursion
> (outline-next-heading) (point))) (org-clock-into-drawer
> (org-clock-into-drawer)) (drawer (org-clock-drawer-name))) (if
> find-unclosed (progn (let ((open-clock-re (concat "^[ ]*" org-clock-string
> " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+
> +[012][0-9]:[0-5][0-9]\\)\\][ ]*quot;))) (while (re-search-forward
> open-clock-re end t) (let ((element ...)) (if (and ... ...) (progn ...
> ...))) (if drawer (progn (goto-char beg) (let ((drawer-re (concat "^[
> ]*:" (regexp-quote drawer) ":[ ]*quot;))) (while (re-search-forward
> drawer-re end t) (let ((element ...)) (if (eq ... ...) (progn ...)))
> (goto-char beg) (let ((clock-re (concat "^[ ]*" org-clock-string)) (count
> 0) positions first) (save-excursion (while (re-search-forward clock-re end
> t) (let ((element (org-element-at-point))) (if (eq (org-element-type
> element) (quote clock)) (progn (setq positions ... count ...)) (cond
> ((null positions) (org-end-of-meta-data) (if (bolp) nil (insert "\n")) (if
> (and org-clock-into-drawer (or (not ...) (< org-clock-into-drawer 2)))
> (progn (let (...) (insert ":" drawer ":\n:END:\n") (org-indent-region beg
> ...) (goto-char beg) (org-flag-drawer t) (forward-line) ((or drawer
> (and (wholenump org-clock-into-drawer) (>= (1+ count)
> org-clock-into-drawer))) (org-end-of-meta-data) (let 

Re: [O] Org 8.3.4 - Problems with bulk reschedule in agenda

2016-05-10 Thread Phil Hudson
On Tue, 10 May 2016 at 10:51:17 am BST, elwood...@web.de wrote:

> I'm using Emacs 24.5.1 on Windows 7 with org-mode 8.3.4.
> Unfortunately, bulk actions in the agenda do not work as expected:
> If I mark several lines in the agenda,
> then Shift-B and then d for changing the deadline of the tasks.
> I then can enter the date, but it only affects the first of the selected 
> agenda
> lines, the others stay unchangend.

Some ideas on what to try, in order to narrow down possibilities:

* Does 'B s' (reschedule, instead of re-deadline) fail in the same way
  as 'B d'? How about other bulk actions?
* How about if you unmark only the second entry, leaving 1,3,4...
  marked, in case the problem is specifically the second entry?
* Do all the entries have a deadline to start with? (Shouldn't make a
  difference, but might be useful to know).
* Have you ever used 'edebug'? That would be my next step.
  (info "(elisp) Edebug")
  
-- 
Phil Hudson   http://hudson-it.ddns.net
@UWascalWabbit PGP/GnuPG ID: 0x887DCA63



Re: [O] PATCH: Add new output formats to plantuml

2016-05-10 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> attached please find a patch which adds additional output file types for
>> plantuml.
>
> Applied. Thank you.
>
> Could you provide an entry for ORG-NEWS?

Here it is - hopefully in the right format. The link to the RESULT of
the example needs to be adjusted, image attached.

Cheers,

Rainer

--8<---cut here---start->8---
*** Support for additional plantuml output formats 
The support for output formats of [[http://plantuml.com/][plantuml]] has been 
extended to now include:

All Diagrams:
- png ::
- svg ::
- eps ::
- pdf ::
- vdx ::
- txt :: ASCII art
- utxt :: ASCII art using unicode characters

Class Diagrams:
- xmi ::
- html ::

State Diagrams:
- scxml ::

The output formats are determined by the file extension specified using the 
:file property:

#+begin_src plantuml :file diagram.png
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
#+end_src

#+RESULTS:
[[file:/Users/rainerkrug/diagram.png]]

Please note that *pdf* *does not work out of the box* and needss
additional setup in addition to plantuml. See
[[http://plantuml.com/pdf.html]] for details and setup information.
--8<---cut here---end--->8---



>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] PATCH: programming language indicators in HTML export

2016-05-10 Thread Rasmus
Robert Klein  writes:

> Hi,
>
> Nicolas Goaziou  wrote:
>
>> Hello,
>> 
>> Robert Klein  writes:
>> 
>> > anyone willing to commit this patch I sent back in march?
>> 
>> This patch actually felt through the cracks. Sorry about that. Would
>> you mind sending it again, using git format-patch so I can apply it?
>> 
>
> Please find the patch attached.

I wonder if it would be possible (or even desirable) to build this part of
the css header automatically?  It may be too prone to unexpected bugs.

Rasmus

-- 
The Kids call him Billy the Saint




[O] Org 8.3.4 - Problems with bulk reschedule in agenda

2016-05-10 Thread Elwood151
I'm using Emacs 24.5.1 on Windows 7 with org-mode 8.3.4.

 

Unfortunately, bulk actions in the agenda do not work as expected:

If I mark several lines in the agenda,

then Shift-B and then d for changing the deadline of the tasks.

 

I then can enter the date, but it only affects the first of the selected agenda lines, the others stay unchangend.

 

Is this a general bug in org-mode 8.3.4 ?

 

I have some configuration code which is loaded during startup of emacs which I took from various internet sites,

so I am not sure if something in there might cause this behaviour, but I also do not know what keyword I'd have to search for in the configuration files to find the code which causes it..

 

Kind regards

 

Martin



Re: [O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread Rasmus
Hi,

Thanks for your patches.

Some comments follow. 

"numbch...@gmail.com"  writes:

> - ob-lua
> - ob-php
> - ob-redis
>
> https://github.com/stardiviner/org-mode
>
> Hope maintainer can merge those branches.

First, do you have copyright assignment to the FSF or would you be willing
to?  This is necessary to merge the patches.  Please refer to,

  http://orgmode.org/worg/org-contribute.html

Second, could you send your work as patches?  I.e. use git format-patch.
Note the format of the commit message should be in the ChangeLog format
(refer to the link above).

Thanks,
Rasmus

-- 
History is what should never happen again




Re: [O] speed keys for plain lists?

2016-05-10 Thread Karl Voit
* Bill White  wrote:
>
> Thank you all for the suggestions thus far.  I'll attach the org file
> I'm working with:

Being curious on your motivation: why do you use only plain list items
instead of headings with paragraphs or headings with plain lists?

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] add some babel supports (PHP, Lua, Redis)

2016-05-10 Thread numbch...@gmail.com
I created three branches on my personal public org-mode repo on GitHub.

- ob-lua
- ob-php
- ob-redis

https://github.com/stardiviner/org-mode

Hope maintainer can merge those branches.

[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


Re: [O] Bug: clock in generates bad drawer [8.3.4 (8.3.4-47-gaf853d-elpa @ /home/carlos/.emacs.d/elpa/org-20160502/)]

2016-05-10 Thread Carlos Noguera
Hi Nicolas,


Here you have a trace with an uncompiled Org. Let me know if you need
something else.

Carlos.

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
insert(":" nil ":\n")
(save-excursion (insert ":" drawer ":\n"))
(let ((end (point-marker))) (goto-char beg) (save-excursion (insert ":"
drawer ":\n")) (org-flag-drawer t) (org-indent-region (point) end)
(forward-line) (if org-log-states-order-reversed nil (goto-char end)
(beginning-of-line -1)) (set-marker end nil))
(let ((beg (point))) (insert (mapconcat (function (lambda (p)
(save-excursion (goto-char p) (org-trim (delete-and-extract-region ...
...) positions "\n") "\n:END:\n") (let ((end (point-marker)))
(goto-char beg) (save-excursion (insert ":" drawer ":\n")) (org-flag-drawer
t) (org-indent-region (point) end) (forward-line) (if
org-log-states-order-reversed nil (goto-char end) (beginning-of-line -1))
(set-marker end nil)))
(cond ((null positions) (org-end-of-meta-data) (if (bolp) nil (insert
"\n")) (if (and org-clock-into-drawer (or (not (wholenump
org-clock-into-drawer)) (< org-clock-into-drawer 2))) (progn (let ((beg
(point))) (insert ":" drawer ":\n:END:\n") (org-indent-region beg (point))
(goto-char beg) (org-flag-drawer t) (forward-line) ((or drawer (and
(wholenump org-clock-into-drawer) (>= (1+ count) org-clock-into-drawer)))
(org-end-of-meta-data) (let ((beg (point))) (insert (mapconcat (function
(lambda (p) (save-excursion ... ...))) positions "\n") "\n:END:\n") (let
((end (point-marker))) (goto-char beg) (save-excursion (insert ":" drawer
":\n")) (org-flag-drawer t) (org-indent-region (point) end) (forward-line)
(if org-log-states-order-reversed nil (goto-char end) (beginning-of-line
-1)) (set-marker end nil (org-log-states-order-reversed (goto-char (car
(last positions (t (goto-char (car positions
(let ((clock-re (concat "^[ ]*" org-clock-string)) (count 0) positions
first) (save-excursion (while (re-search-forward clock-re end t) (let
((element (org-element-at-point))) (if (eq (org-element-type element)
(quote clock)) (progn (setq positions (cons ... positions) count (1+
count))) (cond ((null positions) (org-end-of-meta-data) (if (bolp) nil
(insert "\n")) (if (and org-clock-into-drawer (or (not (wholenump
org-clock-into-drawer)) (< org-clock-into-drawer 2))) (progn (let ((beg
...)) (insert ":" drawer ":\n:END:\n") (org-indent-region beg (point))
(goto-char beg) (org-flag-drawer t) (forward-line) ((or drawer (and
(wholenump org-clock-into-drawer) (>= (1+ count) org-clock-into-drawer)))
(org-end-of-meta-data) (let ((beg (point))) (insert (mapconcat (function
(lambda ... ...)) positions "\n") "\n:END:\n") (let ((end (point-marker)))
(goto-char beg) (save-excursion (insert ":" drawer ":\n")) (org-flag-drawer
t) (org-indent-region (point) end) (forward-line) (if
org-log-states-order-reversed nil (goto-char end) (beginning-of-line -1))
(set-marker end nil (org-log-states-order-reversed (goto-char (car
(last positions (t (goto-char (car positions)
(let* ((beg (line-beginning-position)) (end (save-excursion
(outline-next-heading) (point))) (org-clock-into-drawer
(org-clock-into-drawer)) (drawer (org-clock-drawer-name))) (if
find-unclosed (progn (let ((open-clock-re (concat "^[ ]*" org-clock-string
" \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" " *\\sw+
+[012][0-9]:[0-5][0-9]\\)\\][ ]*quot;))) (while (re-search-forward
open-clock-re end t) (let ((element ...)) (if (and ... ...) (progn ...
...))) (if drawer (progn (goto-char beg) (let ((drawer-re (concat "^[
]*:" (regexp-quote drawer) ":[ ]*quot;))) (while (re-search-forward
drawer-re end t) (let ((element ...)) (if (eq ... ...) (progn ...)))
(goto-char beg) (let ((clock-re (concat "^[ ]*" org-clock-string)) (count
0) positions first) (save-excursion (while (re-search-forward clock-re end
t) (let ((element (org-element-at-point))) (if (eq (org-element-type
element) (quote clock)) (progn (setq positions ... count ...)) (cond
((null positions) (org-end-of-meta-data) (if (bolp) nil (insert "\n")) (if
(and org-clock-into-drawer (or (not ...) (< org-clock-into-drawer 2)))
(progn (let (...) (insert ":" drawer ":\n:END:\n") (org-indent-region beg
...) (goto-char beg) (org-flag-drawer t) (forward-line) ((or drawer
(and (wholenump org-clock-into-drawer) (>= (1+ count)
org-clock-into-drawer))) (org-end-of-meta-data) (let ((beg (point)))
(insert (mapconcat (function ...) positions "\n") "\n:END:\n") (let ((end
...)) (goto-char beg) (save-excursion (insert ":" drawer ":\n"))
(org-flag-drawer t) (org-indent-region (point) end) (forward-line) (if
org-log-states-order-reversed nil (goto-char end) (beginning-of-line -1))
(set-marker end nil (org-log-states-order-reversed (goto-char (car
(last positions (t (goto-char (car positions))
(catch (quote exit) (let* ((beg (line-beginning-position)) (end
(save-excursion (outline-next-heading) (point))) (org-clock-into-drawer
(org-clock-into-drawer)) (drawer