Re: export and split orgmode headers into separate md files?

2020-01-15 Thread Xebar Saram
Thx Deigo for the detailed answer! Really appreciate it!

i think though it’s a bit over my head as i have limited lisp knowledge :)

Does this export to standard markdown files or leanpub format? Honestly at
this stage im willing to export to any flavor of markdown but basic or MMD
would work best. Any tips on how i can adjust the code for that?
if not can i just run your code to get a different markdown format? What
the main function you run after evaluating the code in emacs?
i apologize in advance for the silly questions :)

thx again

Z

On Sun, Jan 12, 2020 at 7:20 AM Diego Zamboni  wrote:

> Hi Z,
>
> I do something similar in my ox-leanpub-book module [1], which exports
> each top-level heading to a different file. The general idea is to use
> =org-map-entries= to loop over the entire buffer [2]. The function you call
> can then check whether the current entry is a header at the level you want
> [3] and then export it to the corresponding file. The title can be used to
> deduct the filename [4].
>
> I found that I had to mark the entire subtree before calling the export
> function [5], otherwise the headline was not getting included in the export.
>
> I based my code originally on this blog post, which might be a simpler
> starting point:
> https://medium.com/@lakshminp/publishing-a-book-using-org-mode-9e817a56d144
> - this code does not select the entire subtree before exporting, which
> means only the contents of the section is exported, but not the headline
> itself.
>
> Hope this helps!
> --Diego
>
> [1] https://github.com/zzamboni/ox-leanpub/tree/book-and-markua
> [2]
> https://github.com/zzamboni/ox-leanpub/blob/book-and-markua/ox-leanpub-book.el#L185-L186
> [3]
> https://github.com/zzamboni/ox-leanpub/blob/book-and-markua/ox-leanpub-book.el#L125
> [4]
> https://github.com/zzamboni/ox-leanpub/blob/book-and-markua/ox-leanpub-book.el#L131-L135
> [5]
> https://github.com/zzamboni/ox-leanpub/blob/book-and-markua/ox-leanpub-book.el#L170-L174
>
>
> On Sun, Jan 12, 2020 at 4:54 AM Xebar Saram  wrote:
>
>> Hi all
>>
>> For work specific needs at uni i have a need to take a comprehensive org
>> file with hundreds of headers and split each header into separate .md files
>> (with the header name as file name//first header in the md file).
>> Has anyone done anything remotely similar? Or if not can someone point
>> me in the right direction on how to even start dealing with this?
>>
>> thx a lot in advance any tips would be very much appreciated
>>
>> kind regards
>>
>> Z
>>
>


export and split orgmode headers into separate md files?

2020-01-11 Thread Xebar Saram
Hi all

For work specific needs at uni i have a need to take a comprehensive org
file with hundreds of headers and split each header into separate .md files
(with the header name as file name//first header in the md file).
Has anyone done anything remotely similar? Or if not can someone point
me in the right direction on how to even start dealing with this?

thx a lot in advance any tips would be very much appreciated

kind regards

Z


[O] sort headers by tags possible?

2019-04-08 Thread Xebar Saram
Hi all

does anyone know if its possible to sort headers by tags?
lets say i have this

* header 1 . :3star:
* header 2 . :4star:
* header 3 . :3star:

can i sort by tags (alphnumeric) so all 3star tags with start followed by
4star etc

thx

best

Z


[O] closing *org-agenda* pops up emacs *calander* buffer?

2018-06-06 Thread Xebar Saram
Hi all

Weird issue. each time i close the *org-agenda* view (using q) i always get
a window with what seems the default emacs calendar (the *calendar*
buffer). I want to go back to the previous buffer i visited before
launching org-agenda.

I cant understand whats causing this. any clues?

this is the buffer that always pops up

https://paste.xinu.at/b9O0/

best

Z


Re: [O] using org-global-properties in capture templates

2017-12-03 Thread Xebar Saram
Hi

thank you Adrian so so much, i hugely appreciate this!

this works perfectly now, thx for pointing me in the right direction

have a great week!

Z

On Sun, Dec 3, 2017 at 3:28 AM, Adrian Bradd <adrian.br...@gmail.com> wrote:

> Hello,
>
> It looks like you have one too many parenthesis around the Rating entry.
> org-global properties is supposed to be a list of cons cells. The below
> should work:
>
> #+BEGIN_SRC elisp
> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
> Austrian Greek Fusion")))
> (add-to-list 'org-global-properties '("Rating_ALL". "- 1 2 3 4 5"))
> #+END_SRC
>
> Below is a version that worked for me with all three properties. I declare
> the properties all in one list instead of adding them.
>
> #+BEGIN_SRC elisp
> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
> Austrian Greek Fusion") ("Effort_ALL" . "0 0:10 0:20 0:30 1:00 2:00 3:00
> 4:00 6:00 8:00") ("Rating_ALL" . "- 1 2 3 4 5")))
>
>  (setq org-capture-templates
>   '(("f" "Food"
> entry
> (file+headline  "~/tmp/tmp.org" "Inbox")
> "* COOK %^{Recipe Name}
> :PROPERTIES:
> :ID: %(org-id-uuid)
> :Time: %^{minutes|-|10|15|30|60}
> :Effort: %^{Effort}p
> :Rating: %^{Rating}p
> :Cuisine: %^{Cuisine}p
> :END:
> "
> "Capture Template for food recipe")))
> #+END_SRC
>
> HTH,
>
> Adrian
>
> On 22 November 2017 at 04:52, Xebar Saram <zelt...@gmail.com> wrote:
>
>> Hi all
>>
>> sorry to nudge but after spending alot of time on this , googling etc
>> cant seem to get it to work. any help, tips or pointing me in the right
>> direction would really be appreciated!
>>
>> Z
>>
>> On Sat, Nov 4, 2017 at 5:31 PM, Xebar Saram <zelt...@gmail.com> wrote:
>>
>>> sorry to bother again but still stuck with this
>>>
>>> i tried to add another org-global-property entry (i assume thats
>>> possible) but then i didnt get completion for the second one.
>>> this is what i used
>>>
>>> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
>>> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
>>> Austrian Greek Fusion")))
>>> (add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))
>>>
>>> can anyone point me to the correct syntax for adding additional
>>> org-global-properties?
>>>
>>> thx alot in advance
>>>
>>> Z
>>>
>>>
>>> On Sat, Oct 28, 2017 at 9:44 PM, Xebar Saram <zelt...@gmail.com> wrote:
>>>
>>>> thx so much
>>>>
>>>> that works well. i tried to add another org-global-property entry (i
>>>> assume thats possible) but then i didnt get completion for the second one.
>>>> this is what i used
>>>>
>>>> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
>>>> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
>>>> Austrian Greek Fusion")))
>>>> (add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))
>>>>
>>>> i assume my syntax is wrong?
>>>>
>>>> thx!
>>>>
>>>> Z
>>>>
>>>> On Sat, Oct 28, 2017 at 12:37 PM, Nicolas Goaziou <
>>>> m...@nicolasgoaziou.fr> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Xebar Saram <zelt...@gmail.com> writes:
>>>>>
>>>>> > ;; Effort and global properties
>>>>> > (setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00
>>>>> 2:00
>>>>> > 3:00 4:00 6:00 8:00")))
>>>>> >
>>>>> >
>>>>> >
>>>>> > (add-to-list 'org-capture-templates
>>>>> > '("f" "Food"
>>>>> > entry
>>>>> > (file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
>>>>> > "Inbox")
>>>>> > "* COOK %^{Recipe Name}
>>>>> > :PROPERTIES:
>>>>> > :ID: %(org-id-uuid)
>>>>> > :Effort_ALL: %^{Effort_ALL}p
>>>>> > :END:
>>>>> > "
>>>>> > "Capture Template for food recipe"
>>>>> > ))
>>>>>
>>>>> "XYZ_ALL" is a special property defining allowed values for "XYZ". In
>>>>> you case, you will get completion for "Effort" with:
>>>>>
>>>>>   :Effort: %^{Effort}p
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> --
>>>>> Nicolas Goaziou
>>>>>
>>>>
>>>>
>>>
>>
>


Re: [O] #+NAME: in a property drawer

2017-11-23 Thread Xebar Saram
Sorry for the noise, this was resolved in the proper thread relating to this

The solution it so to use ':noweb-ref NAME' as an argument in the drawer

best

Z


Re: [O] mirror text in same/other org buffer

2017-11-23 Thread Xebar Saram
Ok found the answer "hidden" away in a org manual page.. :)

The solution it so to use ':noweb-ref NAME' as an argument in the drawer

sorry for the noise

Z

On Fri, Nov 24, 2017 at 8:20 AM, Xebar Saram <zelt...@gmail.com> wrote:

> Hi again, i posted a separate issue on multiple code blocks in babel
> creating 1 config but then realized this actually is very appropriate for
> this thread...apologize for that.
>
> @Kaushal, the method you suggested works really well for 1 code block=1
> config file. but what happens when my config file is made out of 1 few
> babel code blocks that i tangle together into 1 config file. for example:
>
>  * tmux conf
>  :PROPERTIES:
>  :header-args: :noweb yes  :tangle /zeltak@132.72.155.204:~/.tmux.conf
>  :END:
>
> * Mouse
>   :PROPERTIES:
>   :ID:   ba8ce7aa-2b3b-43be-816d-ea2ab515a999
>   :END:
> #+BEGIN_SRC conf
> #-->  mouse
> setw -g mouse on
> set-option -g status-keys vi
> #+END_SRC
>
> * Theme and look
>   :PROPERTIES:
>   :ID:   85257f51-1306-4caf-a055-a6df3afac1a5
>   :END:
> #+BEGIN_SRC conf
> #--> THEME AND LOOK
> #default theme picker
> source /home/zeltak/.tmux/neonB
> #source /home/zeltak/.tmux/solarized-dark
> #+END_SRC
>
> how do i add a name (#+NAME) argument that covers all the sub headers that
> will make '.tmux.conf'.
> and then using noweb how does one reffer to that name <> that
> will cover all the tiny blocks that create the tmux.conf?
>
> best!
>
> Z
>
>
> On Thu, Nov 23, 2017 at 8:16 AM, Xebar Saram <zelt...@gmail.com> wrote:
>
>> thx!
>>
>> that works well for me :D
>>
>> best and happy holidays :)
>>
>> Z
>>
>> On Wed, Nov 22, 2017 at 1:40 PM, Kaushal Modi <kaushal.m...@gmail.com>
>> wrote:
>>
>>> On Wed, Nov 22, 2017, 4:55 AM Xebar Saram <zelt...@gmail.com> wrote:
>>>
>>>> Hi alll
>>>>
>>>
>>> Hello
>>>
>>> Im looking for a way to to mirror/auto populate a section of text in
>>>> another location in the same org buffer and/or other org file.
>>>>
>>>> for example, i manage my config files in org mode for multiple
>>>> machines. i want to have a section like this
>>>>
>>>> #+BEGIN_SRC conf :mkdirp yes :tangle ~/machine A
>>>> CODE
>>>> #+END_SRC
>>>> where the same content of CODE is mirroed/auto generated in another
>>>> code block for machine B
>>>>
>>>> #+BEGIN_SRC conf :mkdirp yes :tangle ~/machine B
>>>> CODE
>>>> #+END_SRC
>>>>
>>>> is this in anyway possible?
>>>>
>>>
>>> You cannot have real-time mirroring of content in the Org file itself.
>>>
>>> But you can implement that DRY model by using Noweb references (See the
>>> "Noweb reference syntax" node in the Org manual).
>>>
>>> You can put the CODE in a separate src block with :noweb-ref set to foo,
>>> and then wherever in other code blocks you want to mirror that, you simply
>>> put <>.
>>>
>>> As I said you won't see the mirroring happen live in the Org buffer. But
>>> you will see the mirroring done in the exported files.
>>>
>>> PS: For non-code mirroring (in exported files), there's also do:
>>>
>>>   #+INCLUDE: "./can-be-same-file.org::#CUSTOM_ID" :only-contents t
>>>
>>> (See the "Include files" node in the Org manual for more.)
>>>
>>> --
>>>
>>> Kaushal Modi
>>>
>>
>>
>


Re: [O] mirror text in same/other org buffer

2017-11-23 Thread Xebar Saram
Hi again, i posted a separate issue on multiple code blocks in babel
creating 1 config but then realized this actually is very appropriate for
this thread...apologize for that.

@Kaushal, the method you suggested works really well for 1 code block=1
config file. but what happens when my config file is made out of 1 few
babel code blocks that i tangle together into 1 config file. for example:

 * tmux conf
 :PROPERTIES:
 :header-args: :noweb yes  :tangle /zeltak@132.72.155.204:~/.tmux.conf
 :END:

* Mouse
  :PROPERTIES:
  :ID:   ba8ce7aa-2b3b-43be-816d-ea2ab515a999
  :END:
#+BEGIN_SRC conf
#-->  mouse
setw -g mouse on
set-option -g status-keys vi
#+END_SRC

* Theme and look
  :PROPERTIES:
  :ID:   85257f51-1306-4caf-a055-a6df3afac1a5
  :END:
#+BEGIN_SRC conf
#--> THEME AND LOOK
#default theme picker
source /home/zeltak/.tmux/neonB
#source /home/zeltak/.tmux/solarized-dark
#+END_SRC

how do i add a name (#+NAME) argument that covers all the sub headers that
will make '.tmux.conf'.
and then using noweb how does one reffer to that name <> that
will cover all the tiny blocks that create the tmux.conf?

best!

Z


On Thu, Nov 23, 2017 at 8:16 AM, Xebar Saram <zelt...@gmail.com> wrote:

> thx!
>
> that works well for me :D
>
> best and happy holidays :)
>
> Z
>
> On Wed, Nov 22, 2017 at 1:40 PM, Kaushal Modi <kaushal.m...@gmail.com>
> wrote:
>
>> On Wed, Nov 22, 2017, 4:55 AM Xebar Saram <zelt...@gmail.com> wrote:
>>
>>> Hi alll
>>>
>>
>> Hello
>>
>> Im looking for a way to to mirror/auto populate a section of text in
>>> another location in the same org buffer and/or other org file.
>>>
>>> for example, i manage my config files in org mode for multiple machines.
>>> i want to have a section like this
>>>
>>> #+BEGIN_SRC conf :mkdirp yes :tangle ~/machine A
>>> CODE
>>> #+END_SRC
>>> where the same content of CODE is mirroed/auto generated in another code
>>> block for machine B
>>>
>>> #+BEGIN_SRC conf :mkdirp yes :tangle ~/machine B
>>> CODE
>>> #+END_SRC
>>>
>>> is this in anyway possible?
>>>
>>
>> You cannot have real-time mirroring of content in the Org file itself.
>>
>> But you can implement that DRY model by using Noweb references (See the
>> "Noweb reference syntax" node in the Org manual).
>>
>> You can put the CODE in a separate src block with :noweb-ref set to foo,
>> and then wherever in other code blocks you want to mirror that, you simply
>> put <>.
>>
>> As I said you won't see the mirroring happen live in the Org buffer. But
>> you will see the mirroring done in the exported files.
>>
>> PS: For non-code mirroring (in exported files), there's also do:
>>
>>   #+INCLUDE: "./can-be-same-file.org::#CUSTOM_ID" :only-contents t
>>
>> (See the "Include files" node in the Org manual for more.)
>>
>> --
>>
>> Kaushal Modi
>>
>
>


[O] #+NAME: in a property drawer

2017-11-23 Thread Xebar Saram
Hi all and happy holidays!

I want to be able to add a #+NAME to a property drawer that would name a
code block thats split between sub org headers. Im at loss on how this is
done?

this is a current example of a tmux conf thats split with different org sub
headers:

 * tmux conf
 :PROPERTIES:
 :header-args: :noweb yes  :tangle /zeltak@132.72.155.204:~/.tmux.conf
 :END:



* Mouse
  :PROPERTIES:
  :ID:   ba8ce7aa-2b3b-43be-816d-ea2ab515a999
  :END:
#+BEGIN_SRC conf
#-->  mouse
setw -g mouse on
set-option -g status-keys vi
#+END_SRC

* Theme and look
  :PROPERTIES:
  :ID:   85257f51-1306-4caf-a055-a6df3afac1a5
  :END:
#+BEGIN_SRC conf
#--> THEME AND LOOK
#default theme picker
source /home/zeltak/.tmux/neonB
#source /home/zeltak/.tmux/solarized-dark
#+END_SRC


I want to add a name (#+NAME) for all the sub headers that will make
'.tmux.conf'. anyone know how thats done?


Re: [O] mirror text in same/other org buffer

2017-11-22 Thread Xebar Saram
thx!

that works well for me :D

best and happy holidays :)

Z

On Wed, Nov 22, 2017 at 1:40 PM, Kaushal Modi <kaushal.m...@gmail.com>
wrote:

> On Wed, Nov 22, 2017, 4:55 AM Xebar Saram <zelt...@gmail.com> wrote:
>
>> Hi alll
>>
>
> Hello
>
> Im looking for a way to to mirror/auto populate a section of text in
>> another location in the same org buffer and/or other org file.
>>
>> for example, i manage my config files in org mode for multiple machines.
>> i want to have a section like this
>>
>> #+BEGIN_SRC conf :mkdirp yes :tangle ~/machine A
>> CODE
>> #+END_SRC
>> where the same content of CODE is mirroed/auto generated in another code
>> block for machine B
>>
>> #+BEGIN_SRC conf :mkdirp yes :tangle ~/machine B
>> CODE
>> #+END_SRC
>>
>> is this in anyway possible?
>>
>
> You cannot have real-time mirroring of content in the Org file itself.
>
> But you can implement that DRY model by using Noweb references (See the
> "Noweb reference syntax" node in the Org manual).
>
> You can put the CODE in a separate src block with :noweb-ref set to foo,
> and then wherever in other code blocks you want to mirror that, you simply
> put <>.
>
> As I said you won't see the mirroring happen live in the Org buffer. But
> you will see the mirroring done in the exported files.
>
> PS: For non-code mirroring (in exported files), there's also do:
>
>   #+INCLUDE: "./can-be-same-file.org::#CUSTOM_ID" :only-contents t
>
> (See the "Include files" node in the Org manual for more.)
>
> --
>
> Kaushal Modi
>


[O] mirror text in same/other org buffer

2017-11-22 Thread Xebar Saram
Hi alll

Im looking for a way to to mirror/auto populate a section of text in
another location in the same org buffer and/or other org file.

for example, i manage my config files in org mode for multiple machines. i
want to have a section like this

#+BEGIN_SRC conf :mkdirp yes :tangle ~/machine A
CODE
#+END_SRC
where the same content of CODE is mirroed/auto generated in another code
block for machine B

#+BEGIN_SRC conf :mkdirp yes :tangle ~/machine B
CODE
#+END_SRC

is this in anyway possible?


Re: [O] using org-global-properties in capture templates

2017-11-22 Thread Xebar Saram
Hi all

sorry to nudge but after spending alot of time on this , googling etc cant
seem to get it to work. any help, tips or pointing me in the right
direction would really be appreciated!

Z

On Sat, Nov 4, 2017 at 5:31 PM, Xebar Saram <zelt...@gmail.com> wrote:

> sorry to bother again but still stuck with this
>
> i tried to add another org-global-property entry (i assume thats possible)
> but then i didnt get completion for the second one.
> this is what i used
>
> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
> Austrian Greek Fusion")))
> (add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))
>
> can anyone point me to the correct syntax for adding additional
> org-global-properties?
>
> thx alot in advance
>
> Z
>
>
> On Sat, Oct 28, 2017 at 9:44 PM, Xebar Saram <zelt...@gmail.com> wrote:
>
>> thx so much
>>
>> that works well. i tried to add another org-global-property entry (i
>> assume thats possible) but then i didnt get completion for the second one.
>> this is what i used
>>
>> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
>> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
>> Austrian Greek Fusion")))
>> (add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))
>>
>> i assume my syntax is wrong?
>>
>> thx!
>>
>> Z
>>
>> On Sat, Oct 28, 2017 at 12:37 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr
>> > wrote:
>>
>>> Hello,
>>>
>>> Xebar Saram <zelt...@gmail.com> writes:
>>>
>>> > ;; Effort and global properties
>>> > (setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00
>>> 2:00
>>> > 3:00 4:00 6:00 8:00")))
>>> >
>>> >
>>> >
>>> > (add-to-list 'org-capture-templates
>>> > '("f" "Food"
>>> > entry
>>> > (file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
>>> > "Inbox")
>>> > "* COOK %^{Recipe Name}
>>> > :PROPERTIES:
>>> > :ID: %(org-id-uuid)
>>> > :Effort_ALL: %^{Effort_ALL}p
>>> > :END:
>>> > "
>>> > "Capture Template for food recipe"
>>> > ))
>>>
>>> "XYZ_ALL" is a special property defining allowed values for "XYZ". In
>>> you case, you will get completion for "Effort" with:
>>>
>>>   :Effort: %^{Effort}p
>>>
>>>
>>> Regards,
>>>
>>> --
>>> Nicolas Goaziou
>>>
>>
>>
>


Re: [O] using org-global-properties in capture templates

2017-11-04 Thread Xebar Saram
sorry to bother again but still stuck with this

i tried to add another org-global-property entry (i assume thats possible)
but then i didnt get completion for the second one.
this is what i used

(setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
Asian Chinese Israeli Italian American EastEuro Mexican French Persian
Austrian Greek Fusion")))
(add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))

can anyone point me to the correct syntax for adding additional
org-global-properties?

thx alot in advance

Z


On Sat, Oct 28, 2017 at 9:44 PM, Xebar Saram <zelt...@gmail.com> wrote:

> thx so much
>
> that works well. i tried to add another org-global-property entry (i
> assume thats possible) but then i didnt get completion for the second one.
> this is what i used
>
> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
> Austrian Greek Fusion")))
> (add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))
>
> i assume my syntax is wrong?
>
> thx!
>
> Z
>
> On Sat, Oct 28, 2017 at 12:37 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
> wrote:
>
>> Hello,
>>
>> Xebar Saram <zelt...@gmail.com> writes:
>>
>> > ;; Effort and global properties
>> > (setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00 2:00
>> > 3:00 4:00 6:00 8:00")))
>> >
>> >
>> >
>> > (add-to-list 'org-capture-templates
>> > '("f" "Food"
>> > entry
>> > (file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
>> > "Inbox")
>> > "* COOK %^{Recipe Name}
>> > :PROPERTIES:
>> > :ID: %(org-id-uuid)
>> > :Effort_ALL: %^{Effort_ALL}p
>> > :END:
>> > "
>> > "Capture Template for food recipe"
>> > ))
>>
>> "XYZ_ALL" is a special property defining allowed values for "XYZ". In
>> you case, you will get completion for "Effort" with:
>>
>>   :Effort: %^{Effort}p
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] using org-global-properties in capture templates

2017-10-31 Thread Xebar Saram
hi again

cant get to figure this out. any help would be really appreciated!

best

Z

On Sat, Oct 28, 2017 at 9:44 PM, Xebar Saram <zelt...@gmail.com> wrote:

> thx so much
>
> that works well. i tried to add another org-global-property entry (i
> assume thats possible) but then i didnt get completion for the second one.
> this is what i used
>
> (setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
> Asian Chinese Israeli Italian American EastEuro Mexican French Persian
> Austrian Greek Fusion")))
> (add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))
>
> i assume my syntax is wrong?
>
> thx!
>
> Z
>
> On Sat, Oct 28, 2017 at 12:37 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
> wrote:
>
>> Hello,
>>
>> Xebar Saram <zelt...@gmail.com> writes:
>>
>> > ;; Effort and global properties
>> > (setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00 2:00
>> > 3:00 4:00 6:00 8:00")))
>> >
>> >
>> >
>> > (add-to-list 'org-capture-templates
>> > '("f" "Food"
>> > entry
>> > (file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
>> > "Inbox")
>> > "* COOK %^{Recipe Name}
>> > :PROPERTIES:
>> > :ID: %(org-id-uuid)
>> > :Effort_ALL: %^{Effort_ALL}p
>> > :END:
>> > "
>> > "Capture Template for food recipe"
>> > ))
>>
>> "XYZ_ALL" is a special property defining allowed values for "XYZ". In
>> you case, you will get completion for "Effort" with:
>>
>>   :Effort: %^{Effort}p
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] org-display-inline-images not displaying images

2017-10-31 Thread Xebar Saram
i have exactly the same issue

happened after i upgraded org a few days ago from MELPA

On Tue, Oct 31, 2017 at 1:39 AM, Leslie Watter  wrote:

> Hi folks,
>
> Does the org-display-inline-images behavior was changed from 9.0.10 up ?
>
> I'm facing some trouble with it -- from 9.0.10 up images are'nt being
> displayed .
>
> Same configuration, the only change was org-version.
>
> How I'm calling:
>
> --
> #+CAPTION: Criando novo Projeto Maven
> #+LABEL:
> [[./images/git/eclipse/l/novo-projeto-maven.png]]
> --
>
> One weird thing is that, if I generate the image using a ditaa source
> code, this image got displayed correctly, but the others dont. Both are PNG
> files.
>
> Does anyone has any hint ?
>
> Thanks in advance,
>
> LEslie
>
>
> --
> Leslie H. Watter
>


Re: [O] using org-global-properties in capture templates

2017-10-28 Thread Xebar Saram
thx so much

that works well. i tried to add another org-global-property entry (i assume
thats possible) but then i didnt get completion for the second one.
this is what i used

(setq org-global-properties '(("Cuisine_ALL". "- Indian Thai Vietnamese
Asian Chinese Israeli Italian American EastEuro Mexican French Persian
Austrian Greek Fusion")))
(add-to-list 'org-global-properties '(("Rating_ALL". "- 1 2 3 4 5")))

i assume my syntax is wrong?

thx!

Z

On Sat, Oct 28, 2017 at 12:37 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > ;; Effort and global properties
> > (setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00 2:00
> > 3:00 4:00 6:00 8:00")))
> >
> >
> >
> > (add-to-list 'org-capture-templates
> > '("f" "Food"
> > entry
> > (file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
> > "Inbox")
> > "* COOK %^{Recipe Name}
> > :PROPERTIES:
> > :ID: %(org-id-uuid)
> > :Effort_ALL: %^{Effort_ALL}p
> > :END:
> > "
> > "Capture Template for food recipe"
> > ))
>
> "XYZ_ALL" is a special property defining allowed values for "XYZ". In
> you case, you will get completion for "Effort" with:
>
>   :Effort: %^{Effort}p
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] using org-global-properties in capture templates

2017-10-28 Thread Xebar Saram
Hi all

so i just discovered today the org-global-properties

im still strugling to understand how to use it in a capture template

currently i use the %^{prompt}  option to quick select from a list of items
as following

(add-to-list 'org-capture-templates
'("ff" "Food"
entry
(file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
"Inbox")
"* COOK %^{Recipe Name}
:PROPERTIES:
:ID: %(org-id-uuid)
:Time: %^{minutes|-|10|15|30|60}
:END:
"
"Capture Template for food recipe"
))

i have many of these captures and if i change 1 property i need to change
all capture templates. from what i understand the org-global-properties
will allow me to define it once and use it in all capture templates. yet i
cant understand how.

following the manual i tried this

;; Effort and global properties
(setq org-global-properties '(("Effort_ALL". "0 0:10 0:20 0:30 1:00 2:00
3:00 4:00 6:00 8:00")))



(add-to-list 'org-capture-templates
'("f" "Food"
entry
(file+headline (lambda () (concat pmm "/org/files/agenda/food.org"))
"Inbox")
"* COOK %^{Recipe Name}
:PROPERTIES:
:ID: %(org-id-uuid)
:Effort_ALL: %^{Effort_ALL}p
:END:
"
"Capture Template for food recipe"
))


yet when i get to the Effort_ALL part it dosent prompt me for options. i
assume im doing it wrong. can anyone point me in the right direction?

thx

Z


Re: [O] function for inserting a block

2017-10-21 Thread Xebar Saram
thx thats perfect

Z

On Sat, Oct 21, 2017 at 2:59 PM, Marco Wahl <marcowahls...@gmail.com> wrote:

> The following message is a courtesy copy of an article
> that has been posted to gmane.emacs.orgmode as well.
>
> Hi!
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > this looks really cool and would love to try. as a non technical user,
> how
> > does one use the patch to get the functionality? is there a way to
> create a
> > clean function only version from the patch i can try?
>
> You could simply pick the relevant parts from the patch and evaluate
> them.
>
> Concretely you could do:
>
> 1. Copy Eric's code to empty buffer *scratch*.  The relevant code is
>
> #+BEGIN_SRC elisp
> (defcustom org-structure-predefined-blocks
>   '("SRC" "EXAMPLE" "QUOTE" "VERSE" "VERBATIM" "CENTER" "COMMENT" "EXPORT")
>   "Block structure completion names."
>   :group 'org-completion
>   :type '(repeat string)
>   :package-version '(Org . "9.1.3"))
>
> (defun org-insert-structure-template ( type)
>   "Insert a block structure of the type #+BEGIN_FOO/#+END_FOO.
> Prompts for a block type, and inserts the block.  With an active
> region, wrap the region in the block.  With an element under
> point, wrap the element in the block.  Otherwise, insert an empty
> block."
>   (interactive)
>   (setq type (or type (completing-read "Block type: "
>org-structure-predefined-blocks)))
>   (unless (use-region-p)
> (when (org-element-at-point)
>   (org-mark-element)))
>   (let ((s (if (use-region-p)
>(region-beginning)
>  (point)))
> (e (copy-marker (if (use-region-p)
> (region-end)
>   (point))
> t))
> column)
> (when (string-equal (downcase type) "example")
>   (org-escape-code-in-region s e))
> (goto-char s)
> (setq column (current-indentation))
> (beginning-of-line)
> (indent-to column)
> (insert (format "#+BEGIN_%s\n" type))
> (goto-char e)
> (if (bolp)
> (progn
>   (skip-chars-backward " \n\t")
>   (forward-line))
>   (end-of-line)
>   (insert "\n"))
> (indent-to column)
> (insert (format "#+END_%s\n"
> type))
> (set-marker e nil)))
>
> (org-defkey org-mode-map "\C-c\C-xw"'org-insert-structure-template)
> #+END_SRC
>
> 2. In buffer *scratch* do
>
> M-x eval-buffer
>
> 3. Voila!  Check out C-c C-x w in an org mode buffer.
>
>
> Best regards
> Marco
>


Re: [O] function for inserting a block

2017-10-21 Thread Xebar Saram
Hi all

this looks really cool and would love to try. as a non technical user, how
does one use the patch to get the functionality? is there a way to create a
clean function only version from the patch i can try?

thx!

Z

On Sat, Oct 21, 2017 at 12:43 AM, Kaushal Modi 
wrote:

> On Fri, Oct 20, 2017 at 5:15 PM Eric Abrahamsen 
> wrote:
>
>> The template really only inserts the block type, not anything specific
>> like the source language or export backend.
>
>
> Right, but based on the code you have, you can easily add "SRC org", "SRC
> emacs-lisp" to the default value of that list. Looking at that, users can
> also get an idea that they can add their favorite languages to that list
> too.
>
>
>> I think prompting for
>> "second-level" information like that might be a little overkill.
>>
>
> I second that. The first-level prompt also feels a bit slow, honestly,
> compared to using easy templates like " (just an example) to insert the, well, EXAMPLE block as usual. But *if
> region is selected*, it does the wrapping as in your code.
>
> This is what I mean (GIF animation):
>
> https://i.imgur.com/201TISW.gifv
>
> I use hydra to provide those awesome hints.. but the same can be done
> without hydras too.
>
> As for what should be escaped and what shouldn't, I defer to Nicolas,
>> let's see what he says.
>>
> --
>
> Kaushal Modi
>


[O] multiple property values possible similar to multiple tags?

2017-09-08 Thread Xebar Saram
Hi all

I have this example property drawer in a capture template

:PROPERTIES:
:ID: %(org-id-uuid)
:PLACE: %^{Place?|-|@work|@home|@pc|@family|@shop}
:END:

i was wondering, is it possible for a single property to take multiple
value? im thinking something similar to tags like

:TAG1:TAG2:

i would have a property value of

:PLACE: @home @ shop

and if its possible will i be able to search agenda etc values based on
just 1 of these properties?

best

Z


Re: [O] add additional tag (using %^G) to existing tag in org capture

2017-09-07 Thread Xebar Saram
Hi and thx for the response

the issues is that it dosent seem to add an additional tag to the already
defined tag list in the capture (:@work: ) but instead add another :TAG:
field apart from the already existing tag field. so the final result looks
like this:

** TODO TEST  :@work: :TAG:

while i expect the %^G capture to add to the existing tag entry so it looks
like this

** TODO TEST  :@work:TAG:

thx!

Z

On Fri, Sep 8, 2017 at 8:04 AM, Adam Porter <a...@alphapapa.net> wrote:

> Xebar Saram <zelt...@gmail.com> writes:
>
> > is there anyway to add a tag to the current tag in the capture template
> (:@work: above).
>
> Hey Z,
>
> Sorry, I don't understand the question.  Can you clarify what you mean?
>
>
>


[O] match by property in agenda view

2017-09-07 Thread Xebar Saram
Hi all

i Have this item in a property drawer:

:people: %^{people?|-|allan|bob|joel}

now i have this custom agenda view defined


(add-to-list 'org-agenda-custom-commands
'("sk" "wtd"
tags  "people=\"allan\""
((org-agenda-sorting-strategy '(priority-down effort-down)))
))

yet when i launch it it never finds any items which have a  :people: allan
entry in the drawer

what am i missing?

thx

Z


[O] add additional tag (using %^G) to existing tag in org capture

2017-09-07 Thread Xebar Saram
Hi!

I have this current capture

(add-to-list 'org-capture-templates '("bb" "Work.TODO" entry (file+headline
(concat pmm "/org/files/agenda/bgu.org") "TDEN") "* TODO %^G %? :@work:
\n%^T"
))

which seems to work by adding a tag (via the %^G) alongside the current
already defined tag in the capture template.

is there anyway to add a tag to the current tag in the capture template
(:@work: above).

Thx!

Z


Re: [O] org capture properties from a list of strings?

2017-04-26 Thread Xebar Saram
Hi again

once again really appreciate the answer and apologize in advance for my
limited grasp of coding. so i managed i think to follow your example and
now have this as my capture template

(setq org-capture-templates nil)
(setq org-capture-templates-contexts nil)


(add-to-list 'org-capture-templates
'("f" "Food"
entry
(file+headline (concat pmm "/org/files/agenda/food.org") "Inbox")
"* COOK %^{Recipe Name}
:PROPERTIES:
:ID: %(org-id-uuid)
:Time: %^{minutes|%s}
:type: %^{Type?|%s}
:END:


%^{prompt|*** Ingredients}
%?
%^{prompt|*** Preparation}

"

(mapconcat #'identity '("1" "2" "3" "4" "5") "|")
(mapconcat #'identity '("Indian" "Thai" "Vietnamese" "Asian" "Chinese") "|")


"Capture Template for food recipe"
))


yet i only get offered a %s as a option and not the string in my capture
process.

im sure my syntax is way off, can anyone stir me in the right direction?

best

Z

On Tue, Apr 25, 2017 at 7:19 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > thx Nicolas
> >
> > really appreciate your answer! though im very week in coding so im
> > struggling to understand. but perhaps an example will help. the following
> > is a part of my capture:
> >
> > (add-to-list 'org-capture-templates
> > '("ff" "Food"
> > entry
> > (file+headline (concat pmm "/org/files/agenda/food.org") "Inbox")
> > "* COOK %^{Recipe Name}
> > :PROPERTIES:
> > :ID: %(org-id-uuid)
> > :Time: %^{minutes|-|10|15|30|60}
> > :Rating: %^{rating?|-|1|2|3|4|5}
> > :Source:  %x
> > :Cuisine:
> > %^{Cuisine?|-|Indian|Thai|Vietnamese|Asian|Chinese|
> Israeli|Italian|American|EastEuro|Mexican|French|Persian|Austrian}
> > :Type: %^{Type?|-|main|side|starter|sweets|drinks|sauce|breakfast}
> > :Main.ing:
> >  %^{main.ing?|-|chicken|beef|potatos|fish|seafood|shrimp|
> rice|pasta|fruit}
> > :Serves: %^{Serves?|-|1|2|4|6|8}
> > :END:
> >
> > %^{prompt|*** Ingredients}
> > %?
> > %^{prompt|*** Preparation}
> >
> > "
> > "Capture Template for food recipe"
> > ))
> >
> >
> > so do i need a separate  mapconcat #'number-to-string for each property
> > value (time,type etc?)
>
> Yes, you do. However, #'number-to-string is only useful if you're
> inserting numbers. I think you can use the more general
> #'prin1-to-string everywhere instead, e.g.,
>
>   (mapconcat #'prin1-to-string '(Indian Thai Vietnamese Asian Chinese) "|")
>
> or even, using strings
>
>   (mapconcat #'identity '("Indian" "Thai" "Vietnamese" "Asian" "Chinese")
> "|")
>
> > and how dows the %s know which mapconcat command to refer to?
>
> The are processed by order. The first "%s" refers to the first
> mapconcat, the second "%s" to the second mapconcat, and so on...
>
> Regards,
>
> --
> Nicolas Goaziou0x80A93738
>


Re: [O] org capture properties from a list of strings?

2017-04-25 Thread Xebar Saram
thx Nicolas

really appreciate your answer! though im very week in coding so im
struggling to understand. but perhaps an example will help. the following
is a part of my capture:

(add-to-list 'org-capture-templates
'("ff" "Food"
entry
(file+headline (concat pmm "/org/files/agenda/food.org") "Inbox")
"* COOK %^{Recipe Name}
:PROPERTIES:
:ID: %(org-id-uuid)
:Time: %^{minutes|-|10|15|30|60}
:Rating: %^{rating?|-|1|2|3|4|5}
:Source:  %x
:Cuisine:
%^{Cuisine?|-|Indian|Thai|Vietnamese|Asian|Chinese|Israeli|Italian|American|EastEuro|Mexican|French|Persian|Austrian}
:Type: %^{Type?|-|main|side|starter|sweets|drinks|sauce|breakfast}
:Main.ing:
 %^{main.ing?|-|chicken|beef|potatos|fish|seafood|shrimp|rice|pasta|fruit}
:Serves: %^{Serves?|-|1|2|4|6|8}
:END:

%^{prompt|*** Ingredients}
%?
%^{prompt|*** Preparation}

"
"Capture Template for food recipe"
))


so do i need a separate  mapconcat #'number-to-string for each property
value (time,type etc?)

and how dows the %s know which mapconcat command to refer to?

thx alot again

Z


On Tue, Apr 25, 2017 at 11:00 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > kinda stuck with this and cant find any documentation. would also be glad
> > to know its not possible so i can perhaps explore another method :)
> >
> > im basically wondering if instead of manually imputing string separated
> > with | in the  : %^{} capture template i can provide a lisp way to send a
> > pre defined list of strings ("a" "b" "c") etc.. anyone has any clue?
>
> Since it is pre-defined, you can do the following during capture
> definition
>
>   (format "* Headline
>   :PROPERTIES:
>   :Time: %%^{minutes|-|%s}
>   :Rating: %%^{rating?|-|%s}
>   :END:"
>   (mapconcat #'number-to-string '(10 15 30 60) "|")
>   (mapconcat #'number-to-string '(1 2 3 4 5) "|"))
>
> Can't you?
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] org capture properties from a list of strings?

2017-04-25 Thread Xebar Saram
Hi again all

kinda stuck with this and cant find any documentation. would also be glad
to know its not possible so i can perhaps explore another method :)

im basically wondering if instead of manually imputing string separated
with | in the  : %^{} capture template i can provide a lisp way to send a
pre defined list of strings ("a" "b" "c") etc.. anyone has any clue?

best

Z

On Sun, Apr 23, 2017 at 5:41 PM, Xebar Saram <zelt...@gmail.com> wrote:

> Hi all
>
> so i currently have this in my capture templates
>
>
> :PROPERTIES:
> :Time: %^{minutes|-|10|15|30|60}
> :Rating: %^{rating?|-|1|2|3|4|5}
> :END:
>
> i was wondering if instead of manually putting the values in each line i
> can perhaps supply a list like this
>
>
> (defun returns-a-list-of-strings2
> ()
> (list  "1" "2" "3" "4" "5" ))
>
> is that somehow possible where i could have something like this
>
>
> :Rating: %^{rating?|(returns-a-list-of-strings2)}
>
> is that possible at all?
>
> best
>
> Z
>


Re: [O] function-finding-location?

2017-04-23 Thread Xebar Saram
thx guys


z

On Sun, Apr 23, 2017 at 10:07 AM, Michael Welle <mwe012...@gmx.net> wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > today i saw this in the DOCU
> >
> > (file+function "path/to/file" function-finding-location)
> > A function to find the right location in the file.
> >
> > i assume you dont just use "function-finding-location" but rather a
> > specific function. are there examples for such functions?
> something like this would do the trick:
>
> (defun hmw/foo ()
>   (goto-char (org-find-exact-headline-in-buffer "boingfoo")))
>
> You can, of course, use regexp or other means of finding the position in
> the file.
>
> Does that help?
>
> Regards
> hmw
>
>
>


[O] org capture properties from a list of strings?

2017-04-23 Thread Xebar Saram
Hi all

so i currently have this in my capture templates


:PROPERTIES:
:Time: %^{minutes|-|10|15|30|60}
:Rating: %^{rating?|-|1|2|3|4|5}
:END:

i was wondering if instead of manually putting the values in each line i
can perhaps supply a list like this


(defun returns-a-list-of-strings2
()
(list  "1" "2" "3" "4" "5" ))

is that somehow possible where i could have something like this


:Rating: %^{rating?|(returns-a-list-of-strings2)}

is that possible at all?

best

Z


[O] set org-attach-directory location per buffer

2017-04-22 Thread Xebar Saram
Hi!

i was wondering if one could use perhaps local variables in separate org
files to define the location of the attachment folder per file so that for
each folder the attachment will be stored in a separate directory

thx

Z


[O] function-finding-location?

2017-04-22 Thread Xebar Saram
today i saw this in the DOCU

(file+function "path/to/file" function-finding-location)
A function to find the right location in the file.

i assume you dont just use "function-finding-location" but rather a
specific function. are there examples for such functions?

best

Z


Re: [O] Complex conversion of text to org table

2017-03-12 Thread Xebar Saram
Thx Vicente!

Thats a decent idea. can this be all wrapped in a function (i have zero
coding skills :)) ? i have hundreds of these tables to convert :)

best!

Z

On Sun, Mar 12, 2017 at 5:26 PM, Vicente Vera <vicente...@gmail.com> wrote:

> Hello. In this case Org splits into columns everytime it sees a space, so
> "baking soda" ends up in two columns. A brute force solution: replace the
> spaces between words that shouldn't be put into separated columns with an
> underscore:
>
> 1_cup all-purpose_flour
>
> Convert it to an Org table and then do a quick M-x replace-string to
> replace '_' with ' '.
>
> 2017-03-12 15:14 GMT+00:00 Xebar Saram <zelt...@gmail.com>:
>
>> Hi list
>>
>> so im trying to use orgmode to collect food recepies. i have one issue
>> which is to convert text based ingridents list into org tables.
>>
>> for example take this list
>>
>> 3/4 cup milk
>> 2 tablespoons white vinegar
>> 1 cup all-purpose flour
>> 2 tablespoons white sugar
>> 1 teaspoon baking powder
>> 1/2 teaspoon baking soda
>> 1/2 teaspoon salt
>> 1 egg
>> 2 tablespoons butter, melted
>> cooking spray
>>
>> if i mark this as a region and issue 
>> `org-table-create-or-convert-from-region`
>> this is the result
>>
>> | 3/4 | cup | milk| |  || |
>> | |
>> |   2 | tablespoons | white   | vinegar | (%or | better | yet |
>> lemon | juice%) |
>> |   1 | cup | all-purpose | flour   |  || |
>> | |
>> |   2 | tablespoons | white   | sugar   |  || |
>> | |
>> |   1 | teaspoon| baking  | powder  |  || |
>> | |
>> | 1/2 | teaspoon| baking  | soda|  || |
>> | |
>> | 1/2 | teaspoon| salt| |  || |
>> | |
>> |   1 | egg | | |  || |
>> | |
>> |   2 | tablespoons | butter, | melted  |  || |
>> | |
>> | cooking | spray   | | |  || |
>> | |
>>
>>
>> as you can see it got the amount (1/2) and the unit (cup) right yet the
>> actual ingredients is cut into several columns
>>
>> i dont really know how to deal with this. is there a more intelligent
>> way of auto directing the conversion to split it the correct way?
>>
>> if not any suggestions on how to convert it in a better way? perhaps a
>> command to quick delete the separator (|) across all the column?
>>
>> thx alot in advance
>>
>> Z
>>
>
>


[O] Complex conversion of text to org table

2017-03-12 Thread Xebar Saram
Hi list

so im trying to use orgmode to collect food recepies. i have one issue
which is to convert text based ingridents list into org tables.

for example take this list

3/4 cup milk
2 tablespoons white vinegar
1 cup all-purpose flour
2 tablespoons white sugar
1 teaspoon baking powder
1/2 teaspoon baking soda
1/2 teaspoon salt
1 egg
2 tablespoons butter, melted
cooking spray

if i mark this as a region and issue
`org-table-create-or-convert-from-region` this is the result

| 3/4 | cup | milk| |  || |
  | |
|   2 | tablespoons | white   | vinegar | (%or | better | yet |
lemon | juice%) |
|   1 | cup | all-purpose | flour   |  || |
  | |
|   2 | tablespoons | white   | sugar   |  || |
  | |
|   1 | teaspoon| baking  | powder  |  || |
  | |
| 1/2 | teaspoon| baking  | soda|  || |
  | |
| 1/2 | teaspoon| salt| |  || |
  | |
|   1 | egg | | |  || |
  | |
|   2 | tablespoons | butter, | melted  |  || |
  | |
| cooking | spray   | | |  || |
  | |


as you can see it got the amount (1/2) and the unit (cup) right yet the
actual ingredients is cut into several columns

i dont really know how to deal with this. is there a more intelligent way
of auto directing the conversion to split it the correct way?

if not any suggestions on how to convert it in a better way? perhaps a
command to quick delete the separator (|) across all the column?

thx alot in advance

Z


[O] different faces for #+BEGIN_EXAMPLE blocks and #+BEGIN_SRC blocks?

2017-02-10 Thread Xebar Saram
Hi all

Was wondering if it was possible to have different faces (bg,fg etc) for
#+BEGIN_EXAMPLE blocks and #+BEGIN_SRC blocks?

thx alot

Z


[O] just saw this: orgzly code source available now on github

2017-02-06 Thread Xebar Saram
Just saw this today in case anyone is interested :)

https://github.com/orgzly/orgzly-android

Z


Re: [O] editing orgmode code blocks always indents content..anyway to stop this?

2017-02-04 Thread Xebar Saram
On Tue, Jan 31, 2017 at 5:15 PM, Nick Dokos  wrote:

> org-edit-src-content-indentation
>

Hi Nick sorry for that awkward code snippet , i dunno how it got that way
(the setq was missing :))  and why init was giving me any errors. ill check
if now the indentation works and update everyone

thx

Z


Re: [O] editing orgmode code blocks always indents content..anyway to stop this?

2017-01-30 Thread Xebar Saram
On Tue, Jan 31, 2017 at 9:53 AM, Nicolas Goaziou 
wrote:

> org-edit-src-content-indentation
>

thx Nicolas!

i have this set in my config to '0' see here

#+BEGIN_SRC emacs-lisp  :results none
;; don't indent source code
org-edit-src-content-indentation 0
;; don't adapt indentation
org-adapt-indentation nil
;; preserve the indentation inside of source blocks
org-src-preserve-indentation t
#+END_SRC

shouldn't that not indent?


[O] editing orgmode code blocks always indents content..anyway to stop this?

2017-01-30 Thread Xebar Saram
Hi all

i have this weird behaviour where when sometime i edit org code blocks the
text moves (i guess indents) automatically so i start with this

#+BEGIN_SRC emacs-lisp  :results none
(require 'gnus)
(require 'nnir)
#+END_SRC


and the text switches automatically to this:

#+BEGIN_SRC emacs-lisp  :results none
(require 'gnus)
(require 'nnir)
#+END_SRC


is there a setting to disable this?

best

Z


[O] [BUG?] is [org-image-actual-width] deprecated? setting it in config crashes emacs?

2017-01-27 Thread Xebar Saram
Hi all

after bisecting today i discovered today that the thing the kept crashing
emacs was this variable `org-image-actual-width` which was set this way in
my config

(setq org-image-actual-width '(400))

did i not define it correctly? and if so why is it crashing emacs when i
load a org file with images and open a header that will present such an
image?

attached is a backtrace i created when the variable was on

thx

Z
address@hidden:~|⇒  gdb /usr/bin/emacs
GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/emacs...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/emacs 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffe8836700 (LWP 9649)]
[New Thread 0x7fffe7c1d700 (LWP 9650)]
[New Thread 0x7fffe741c700 (LWP 9651)]
[New Thread 0x7fffd21ad700 (LWP )]
[New Thread 0x7fffd19ac700 (LWP 1)]
[New Thread 0x7fffd11ab700 (LWP 10001)]

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x004c4e27 in x_draw_glyph_string ()
(gdb) thread apply all bt

Thread 7 (Thread 0x7fffd11ab700 (LWP 10001)):
#0  0x7fffee7e757e in futex_wait (val=8, addr=0xb148644) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/x86/futex.h:44
#1  0x7fffee7e757e in do_wait (val=8, addr=0xb148644) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/wait.h:67
#2  0x7fffee7e757e in gomp_barrier_wait_end (bar=0xb148640, state=8) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/bar.c:48
#3  0x7fffee7e4d80 in gomp_thread_start (xdata=) at 
/build/gcc-multilib/src/gcc/libgomp/team.c:123
#4  0x71718454 in start_thread () at /usr/lib/libpthread.so.0
#5  0x7145b7df in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7fffd19ac700 (LWP 1)):
#0  0x7fffee7e757e in futex_wait (val=8, addr=0xb148644) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/x86/futex.h:44
#1  0x7fffee7e757e in do_wait (val=8, addr=0xb148644) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/wait.h:67
#2  0x7fffee7e757e in gomp_barrier_wait_end (bar=0xb148640, state=8) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/bar.c:48
#3  0x7fffee7e4d80 in gomp_thread_start (xdata=) at 
/build/gcc-multilib/src/gcc/libgomp/team.c:123
#4  0x71718454 in start_thread () at /usr/lib/libpthread.so.0
#5  0x7145b7df in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7fffd21ad700 (LWP )):
#0  0x7fffee7e757e in futex_wait (val=8, addr=0xb148644) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/x86/futex.h:44
#1  0x7fffee7e757e in do_wait (val=8, addr=0xb148644) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/wait.h:67
#2  0x7fffee7e757e in gomp_barrier_wait_end (bar=0xb148640, state=8) at 
/build/gcc-multilib/src/gcc/libgomp/config/linux/bar.c:48
#3  0x7fffee7e4d80 in gomp_thread_start (xdata=) at 
/build/gcc-multilib/src/gcc/libgomp/team.c:123
#4  0x71718454 in start_thread () at /usr/lib/libpthread.so.0
#5  0x7145b7df in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7fffe741c700 (LWP 9651)):
#0  0x7145248d in poll () at /usr/lib/libc.so.6
#1  0x748d3786 in  () at /usr/lib/libglib-2.0.so.0
#2  0x748d3b12 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x750e0316 in  () at /usr/lib/libgio-2.0.so.0
#4  0x748fb0d5 in  () at /usr/lib/libglib-2.0.so.0
#5  0x71718454 in start_thread () at /usr/lib/libpthread.so.0
#6  0x7145b7df in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffe7c1d700 (LWP 9650)):
#0  0x7145248d in poll () at /usr/lib/libc.so.6
#1  0x748d3786 in  () at /usr/lib/libglib-2.0.so.0
#2  0x748d389c in g_main_context_iteration () at 
/usr/lib/libglib-2.0.so.0
#3  0x7fffe7c254bd in  () at /usr/lib/gio/modules/libdconfsettings.so
#4  0x748fb0d5 in  () at /usr/lib/libglib-2.0.so.0
#5  0x71718454 in start_thread () at /usr/lib/libpthread.so.0
#6  0x7145b7df in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffe8836700 (LWP 9649)):
#0  0x7145248d in poll () at /usr/lib/libc.so.6
#1  0x748d3786 in  () at /usr/lib/libglib-2.0.so.0
#2  0x748d389c in g_main_context_iteration () at 
/usr/lib/libglib-2.0.so.0
#3  

Re: [O] run a function during capture

2017-01-20 Thread Xebar Saram
Alan: once you have your org-board and capture setting finalized , i would
be very interested to get more details on your setup and work flow, this
looks really interesting!

thx

Z

On Thu, Jan 19, 2017 at 6:47 PM, Alan Schmitt <
alan.schm...@polytechnique.org> wrote:

> Hello,
>
> It is possible to run a function at the end of capture? I would like to
> call org-board-archive (that downloads a web page according to some
> properties) before finishing the capture?
>
> Thanks,
>
> Alan
>
> --
> OpenPGP Key ID : 040D0A3B4ED2E5C7
> Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-12: 404.48, 2015-12: 401.85
>


[O] Bug? org-agenda-to-appt returns `Args out of range: 1, 1`

2017-01-10 Thread Xebar Saram
Hi

just reporting what seems like a bug after last org update
when i run the command

`org-agenda-to-appt `

it returns

`Args out of range: 1, 1`

can anyone confirm?

best

Z


Re: [O] show only top level TODO in agenda and ignore sub level TODOS in agenda?

2016-12-27 Thread Xebar Saram
Thanks all for the ideas, i will try them over the next few days

best

Z

On Tue, Dec 27, 2016 at 12:36 PM, Marcin Borkowski <mb...@mbork.pl> wrote:

> ש
> > On Thursday, 22 Dec 2016 at 13:01, Xebar Saram wrote:
> >> Hi all
> >>
> >> i recently had some projects where i would define the overall project
> >> as a TODO and then add some more sub headers with TODOS. the problem
> >> is that i dont want to see all these sub TODOS in the agenda. For
> >> example:
> >>
> >> * TODO start writing paper
> >> ** TODO  collect data
> >> ** TODO  add refernces
> >
> > [...]
> >
> >> is there a property drawer/other trick to achieve this?
> >
> > I don't know but I can suggest using checkboxes for this?
> > info:(org) Checkboxes
> > They work well and are appropriate for when you have sub-tasks for a
> > single task.
>
> How about
>
> (setq org-agenda-todo-list-sublevels nil)
>
> ?
>
> Hth,
>
> --
> Marcin Borkowski
>
>


Re: [O] show only top level TODO in agenda and ignore sub level TODOS in agenda?

2016-12-23 Thread Xebar Saram
Thx stig. while thats an option i would prefer to keep the actual TODOS and
not use lists for this

best

z

On Thu, Dec 22, 2016 at 3:15 PM, Stig Brautaset <stig.brauta...@icloud.com>
wrote:

>
>
> Sent from my iPhone
>
> > On 22 Dec 2016, at 13:01, Xebar Saram <zelt...@gmail.com> wrote:
> >
> > Hi all
> >
> > i recently had some projects where i would define the overall project as
> a TODO and then add some more sub headers with TODOS. the problem is that i
> dont want to see all these sub TODOS in the agenda. For example:
> >
> > * TODO start writing paper
> > ** TODO  collect data
> > ** TODO  add refernces
> > ...
> >
> > i would like only the * TODO start writing paper to show in the Agenda
> view.
> >
> > obviously i dont want it to happen in any header-sub header in all files
> but rather for specific headers.
> >
> > is there a property drawer/other trick to achieve this?
>
> You could perhaps use checklists instead of TODOS for the "inner" ones?
>
> - [ ] some actionable thing
>
> If you put [/] on the immediate parent heading (your todo) then the todo
> will be updated with [4/6] once you action four out of 6 items.
>
> Stig


[O] show only top level TODO in agenda and ignore sub level TODOS in agenda?

2016-12-22 Thread Xebar Saram
Hi all

i recently had some projects where i would define the overall project as a
TODO and then add some more sub headers with TODOS. the problem is that i
dont want to see all these sub TODOS in the agenda. For example:

* TODO start writing paper
** TODO  collect data
** TODO  add refernces
...

i would like only the * TODO start writing paper to show in the Agenda view.

obviously i dont want it to happen in any header-sub header in all files
but rather for specific headers.

is there a property drawer/other trick to achieve this?

best

Z


[O] sending an email to an orgmode file?

2016-12-21 Thread Xebar Saram
Hi

im looking for a simple solution that will allow me to send an email from
my mobile phone and habr that email either be appended to a txt(org) file
or perhaps another solution to get my mobile on the go notes onto my laptop
orgmode file. i tried orgzly and mobile org but i would prefer a simple
solution as to send an email

anyone have any thoughts on this?

best

Z


Re: [O] Remove Org from Emacs repository?

2016-12-18 Thread Xebar Saram
+1 for keeping it in

i often debug my org based init config by launching emacs -Q and its great
to have org built in for that :)

Z

On Sun, Dec 18, 2016 at 7:11 PM, Christian Moe 
wrote:

>
> +1.
>
> (= Keep it in.)
>
> Yours,
> Christian
>
> Carsten Dominik writes:
>
> > Dear all,
> >
> > I'd hate to see Org removed from Emacs.  It took a lot of work to get it
> > in, and I believe that the vast majority of Emacs users does not install
> > packages.  For a newbie to get to Emacs and to be able to open a .org
> file
> > is a big plus.  So my vote goes toward keeping it in.
> >
> > Carsten
> >
> > On Sun, Dec 18, 2016 at 10:22 AM,  wrote:
> >
> >> 2 cents from me...
> >>
> >> Besides I continuously see many users praising Emacs just for Org
> >> presence (they even may be completely non-technical users), I'm
> >> personally think Org may be removed from Emacs distribution because:
> >>
> >> 1) all Reuben's argument seems sane;
> >> 2) there are situations when someone wants particular version of Org,
> >>and it may be not tne one bundled with Emacs. In this case someone
> >>should perform extra steps to ensure things are going the right way.
> >>When Org will be available only from ELPA, it will be SPOT for such
> >> cases.
> >>
> >> Reuben Thomas  writes:
> >>
> >> > Now that Emacs has had package.el for some years, and Org is
> installable
> >> > directly from GNU ELPA, would it be a good idea to remove Org from
> >> Emacs's
> >> > source repository?
> >> >
> >> > The current situation is left over from before Emacs had package.el,
> and
> >> I
> >> > see no compelling reason to keep it. Org is too big and distinct to be
> >> > swallowed by Emacs; it doesn't make much sense to keep its current
> >> half-in,
> >> > half-out state; so logically it seems sensible to take it out.
> >> >
> >> > I am asking this question from an Org point of view; I will ask the
> Emacs
> >> > maintainers separately for their perspective.
> >> >
> >> > I think it would benefit Emacs too, as there would be less code to
> >> maintain
> >> > (even though Org is quasi-external at present, it still has to build
> >> > successfully as part of an Emacs build), and the Emacs distribution
> would
> >> > be slimmer for non-Org users.
> >> >
> >> > Of course, Emacs "distributions" would still be able to include Org
> >> > out-of-the box if they wished.
> >> >
> >> > --
> >> > http://rrt.sc3d.org
> >>
>
>
>


Re: [O] Using an org based init file slows down emacs startup by 50x..help needed :(

2016-12-12 Thread Xebar Saram
thx all

Grant, thats interesting since i did start with the bisecting method and
couldnt identify the culprit.

again using the method here

https://bitbucket.org/holgerschurig/emacsconf/src/416b2bba2d1d334b9c6ddbd56f8c7f8bd8bc4aab?at=master

works SUPER fast (~10 seconds) so for now ill stick with it until i find
the culprit

very strange though

best

Z

On Mon, Dec 12, 2016 at 11:30 PM, Grant Rettke <g...@wisdomandwonder.com>
wrote:

> On Sat, Dec 10, 2016 at 2:36 AM, Xebar Saram <zelt...@gmail.com> wrote:
> > So after a few months of frustration today i discovered the issue that's
> > been bothering me for a long time..the REALLY slow emacs startup
>
> I tangled it on my box like this:
>
> Start Emacs default
>
> emacs --no-init-file
>
> (emacs-version)
>
> "GNU Emacs 24.5.1 (x86_64-apple-darwin15.4.0, NS apple-appkit-1404.46)
>  of 2016-06-08 on vela"
>
> (org-version)
>
> "8.2.10"
>
> In Emacs I evaluated
>
> (defmacro measure-time ( body)
>   "Measure the time it takes to evaluate BODY."
>   `(let ((time (current-time)))
>  ,@body
>  (message "%.06f" (float-time (time-since time)
>
> And timed and tangled it.
>
> It took approximately 8 minutes.
>
> When I tangle it using my config it takes approximately 11 seconds.
>
> I would start with a bisection of the file to try and narrow down when
> and where the slowdown occurs.
>


Re: [O] Using an org based init file slows down emacs startup by 50x..help needed :(

2016-12-10 Thread Xebar Saram
Ok so i think the reason really is that i have way to many lisp code blocks
as suggested. i found out a very interesting post that maybe of interest to
alot of org users

http://www.holgerschurig.de/en/emacs-efficiently-untangling-elisp/

this creates a new function that very efficiently tangles my org file and
the time goes from 6 minutes to 25 seconds!!

this is a link to an example init file

https://bitbucket.org/holgerschurig/emacsconf/src/416b2bba2d1d334b9c6ddbd56f8c7f8bd8bc4aab?at=master

i really think this should go somewhere in the org documentation

best to all

Z

On Sat, Dec 10, 2016 at 2:53 PM, Xebar Saram <zelt...@gmail.com> wrote:

> Ok some more exploring made me realize that also using `M-x
> org-babel-load-file` on the setting.org file and tangling it takes a LONG
> time (like 6-7 minutes) so its not a problem of the init its the actual
> tangling of the file. 6-7 minutes cant be normal right?
>
> im attaching my settings.org file
>
> would appreciate any help
>
> Z
>
>


[O] Using an org based init file slows down emacs startup by 50x..help needed :(

2016-12-10 Thread Xebar Saram
Hi all

So after a few months of frustration today i discovered the issue that's
been bothering me for a long time..the REALLY slow emacs startup (sometimes
5 minutes or more).

The cause is the org mode init file i use. what i currently have in my
setup is

A. this init.el:

(require 'package)
;since we are using use-package-don't autoload anythings
(setq package-enable-at-startup nil)

(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/;))
(add-to-list 'package-archives '("marmalade" . "
https://marmalade-repo.org/packages/;))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/;))
;; org maybe suspect of hanging melpa, if you have hangs disable this first
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/;))
;; Initialize installed package
(package-initialize)

;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))

(org-babel-load-file (expand-file-name "~/.emacs.d/settings.org"))


B. My config stored in settings.org which alot  of lisp code (like 17,000
lines..yeah i like to tinker :))

Using this method i discovered that every time i make a small change to
setting.org and restart emacs the setting.org gets tangled to settings.el
and emacs takes nearly 5!!! minutes to start..yeah thats painful as you can
imagine.

BUT what i discovered today is that if i just stick my config chunks from
setting.org (ie the tangled setting.el file) into init.el, emacs starts
super fast each time, even when i change the init.el file!

can anyone help me with this, i really would appreciate you guys help with
this as its driving me mad :)

thx alot in advance

Z


[O] reproducable orgmode edit crashes emacs..have backtrace..where to report?

2016-12-09 Thread Xebar Saram
Hi all

i have a file (org file) which i edit and 100% crashes emacs all the time

here is a backtrace

https://paste.xinu.at/XCVp/

where does one report this? to this mailing list? somewhere else?

thx alot!

Z


[O] where and how does one request support for ox-html export into single file?

2016-12-05 Thread Xebar Saram
Hi all

i really love in org-reveal that it as support to export into single file
(there is an option to use #+OPTIONS: reveal_single_file:t).

It seems ox-html doesn't support to export into single file. can one add a
feature request somewhere? and if so where and how :)


thx alot


Z


Re: [O] export to single html file (like reveal_single_file:t) in regular html export

2016-11-25 Thread Xebar Saram
ping anyone :) gotta prepare new assignments for students next week :)

On Sat, Nov 19, 2016 at 7:46 AM, Xebar Saram <zelt...@gmail.com> wrote:

> Hi all
>
> i love the option in org revel (reveal_single_file:t) that allows me to
> export a presentation to my students with image support embedded in the
> html file./
>
> ive searched for a way to do it in the normal org to html exporter with no
> success. any clue how that can be done?
>
> best
>
> Z
>


[O] color specific days in different background in org agenda

2016-11-23 Thread Xebar Saram
Hi all

a weird question. i want to be able to color specific days in different
background in org agenda so i have a nice visual queue to not schedule
meeting during theses days so i can focus on actual work :)

any clue if thats possible?

best

z


[O] export to single html file (like reveal_single_file:t) in regular html export

2016-11-18 Thread Xebar Saram
Hi all

i love the option in org revel (reveal_single_file:t) that allows me to
export a presentation to my students with image support embedded in the
html file./

ive searched for a way to do it in the normal org to html exporter with no
success. any clue how that can be done?

best

Z


[O] PSA :) for org-reveal users..easy colors everywhere thx to John Kitchen :D

2016-11-09 Thread Xebar Saram
Hi all!

i just wanted to share this:

http://kitchingroup.cheme.cmu.edu/blog/2016/11/08/New-color-link-in-org-9-0-using-font-lock-to-color-the-text/

in short using the new org 9.0 features one can easily add colors to
headers, lines ,words etc with the new color: link types (the code is at
the site to add the color: link type)

it works fantastically when exporting files and provides a great and easy
way to add colors to you org-reveal slides!


thx so much to John for his awesome blog (and work :))!

Z


Re: [O] Error: org-babel-execute-src-block: No org-babel-execute function for conf!

2016-11-07 Thread Xebar Saram
got it it works now, thx so much!

Z

On Mon, Nov 7, 2016 at 1:43 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > Sorry for not being clearer. im trying to tangle not the whole file
> (which
> > i think is what org-babel-tangle does) but a specific header with all sub
> > headers associated with it (they all create one file). after reading the
> > org documentation at the time i created this function
> >
> > (defun z/org-tangle-at-block  ()
> >  (interactive)
> >  (let ((current-prefix-arg '(16)))
> >(call-interactively #'org-babel-tangle)))
> >
> > so following the previous code blocks example, I previously  went to the
> >  main i3 conf header and then issued the function
> >  z/org-tangle-at-block which would tangle all sub header and blocks to
> one
> > file ( ~/.i3/config).
> > when i try now to run the function i get the
> >
> > user-error: Point is not in a source code block
>
> I don't understand your function. What is the point of the '(16)
> argument, according to your needs? From `org-babel-tangle' docstring,
>
>   With two universal prefix arguments, only tangle blocks for the
>   tangle file of the block at point.
>
> You need to put point on a source block per above, hence the error you
> obtain.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Error: org-babel-execute-src-block: No org-babel-execute function for conf!

2016-11-06 Thread Xebar Saram
Hi and thx again
Sorry for not being clearer. im trying to tangle not the whole file (which
i think is what org-babel-tangle does) but a specific header with all sub
headers associated with it (they all create one file). after reading the
org documentation at the time i created this function

(defun z/org-tangle-at-block  ()
 (interactive)
 (let ((current-prefix-arg '(16)))
   (call-interactively #'org-babel-tangle)))

so following the previous code blocks example, I previously  went to the
 main i3 conf header and then issued the function
 z/org-tangle-at-block which would tangle all sub header and blocks to one
file ( ~/.i3/config).
when i try now to run the function i get the

user-error: Point is not in a source code block


really appreciate your help since currently all my dotfile system is broken
:)

best

Z

On Mon, Nov 7, 2016 at 8:46 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > thx Nicolas for the answer.
> >
> > im still having issues getting this to work
> >
> > here is my modified example
> >
> >  main i3 conf
> >  :PROPERTIES:
> >  :ID:   f17b5518-2695-4484-a958-2fc7b8aa2479
> >  :header-args: :tangle   ~/.i3/config
> >  :END:
> > mod is win key and mod1 is alt key in below config
> > * General definitions
> >   :PROPERTIES:
> >   :ID:   97fcf6e4-a81d-4fe8-badc-6a9b48668ec2
> >   :END:
> >
> > #+BEGIN_SRC conf
> > # i3 general settings
> > #set variable names
> > set $mod Mod4
> > # Use Mouse+$mod to drag floating windows to their wanted position
> > floating_modifier $mod
> > #+END_SRC
> >
> >
> > yet when i try to tangle recursively i get:
>
> I don't know what is to "tangle recursively", but calling
> `org-babel-tangle' on the document above succeeds here.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Error: org-babel-execute-src-block: No org-babel-execute function for conf!

2016-11-06 Thread Xebar Saram
thx Nicolas for the answer.

im still having issues getting this to work

here is my modified example

 main i3 conf
 :PROPERTIES:
 :ID:   f17b5518-2695-4484-a958-2fc7b8aa2479
 :header-args: :tangle   ~/.i3/config
 :END:
mod is win key and mod1 is alt key in below config
* General definitions
  :PROPERTIES:
  :ID:   97fcf6e4-a81d-4fe8-badc-6a9b48668ec2
  :END:
#+BEGIN_SRC conf
# i3 general settings
#set variable names
set $mod Mod4
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
#+END_SRC


yet when i try to tangle recursively i get:

org-babel-execute-src-block: No org-babel-execute function for conf!

is my syntax wrong?

best and thx again

Z


[O] Error: org-babel-execute-src-block: No org-babel-execute function for conf!

2016-11-06 Thread Xebar Saram
Hi all

I have my dot files in orgmode format and have been using it for a year or
so with great success. today i noticed that code block (conf blocks) that i
used to tangle recursively have stopped working and i get this error

org-babel-execute-src-block: No org-babel-execute function for conf!


this is an example of how the code block looks


*** sxhkd
:PROPERTIES:
:ID:   781eaed4-2ce8-49ff-9516-b84de52cfaab
:tangle:   ~/.config/sxhkd/sxhkdrc
:END:
https://github.com/baskerville/sxhkd
 X system
 :PROPERTIES:
 :ID:   4a3ed3e0-fdf8-4fd1-bc2b-2ab87cae3633
 :END:
#+BEGIN_SRC conf
 
 X/SYSTEM


#xkill
control+alt+super+x
xkill

#touchpad on/off
control+alt+super + t
   /home/zeltak/bin/trackpad-toggle.sh


#suspend
control+alt+super + s
 systemctl suspend


#gpaste
shift+control+Insert
   /home/zeltak/bin/roficlip.sh
# copyq menu
# copyq show


#brighntess
XF86MonBrightnessUp
xbacklight -inc 10 # increase screen brightness

XF86MonBrightnessDown
xbacklight -dec 10 # decrease screen brightness



#+END_SRC


any one knows whats changed with latest org?

best

Z


Re: [O] after latest git update get error: "Evaluation of this emacs-lisp code-blockis disabled."

2016-11-04 Thread Xebar Saram
Ok after sending this i saw Johns solution (deleting org plus dir and
reinstall) which worked for me

best

Z

On Fri, Nov 4, 2016 at 9:10 AM, Xebar Saram <zelt...@gmail.com> wrote:

> Hi all
>
> after latest git update i get the following error when i try to eval code
> blocks:
> "Evaluation of this emacs-lisp code-blockis disabled."
>
> i cant seem to find via google any recent changes. this is my current
> relevant conf:
>
> ;; enable prompt-free code running
> (setq org-confirm-babel-evaluate nil;; for running code blocks
>   org-confirm-elisp-link-function nil   ;; for elisp links
>   org-confirm-shell-link-function nil)  ;; for shell links
>
> any clue?
>
> best
>
> Z
>


[O] after latest git update get error: "Evaluation of this emacs-lisp code-blockis disabled."

2016-11-04 Thread Xebar Saram
Hi all

after latest git update i get the following error when i try to eval code
blocks:
"Evaluation of this emacs-lisp code-blockis disabled."

i cant seem to find via google any recent changes. this is my current
relevant conf:

;; enable prompt-free code running
(setq org-confirm-babel-evaluate nil;; for running code blocks
  org-confirm-elisp-link-function nil   ;; for elisp links
  org-confirm-shell-link-function nil)  ;; for shell links

any clue?

best

Z


Re: [O] emacs 25 comment-line dosent work in org mode blocks?

2016-10-15 Thread Xebar Saram
Hi
sorry for the brief explanation. when i use the bind or manually launch
comment-line via M-x inside an org mode code block the like is indented (by
2 spaces) and no comment appears (in a lisp code block). i just tried it
now in a sh (bash) code block and here what it does is add the # at the END
of the line :)

im happy to help test anything else needed and report back

thx!

Z

On Sat, Oct 15, 2016 at 1:05 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > i just discovered that in emacs 25 there is a cool comment-line function
> > (bound to Ctrl+x Ctrl+; ). it dosent seem to work inside org mode blocks.
> > anyone know a work around for this?
>
> What "doesn't work"? Could you expunge a bit?
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] emacs 25 comment-line dosent work in org mode blocks?

2016-10-15 Thread Xebar Saram
Hi all
i just discovered that in emacs 25 there is a cool comment-line function
(bound to Ctrl+x Ctrl+; ). it dosent seem to work inside org mode blocks.
anyone know a work around for this?

best

Z


Re: [O] Capture template creates multiple property drawers, help needed

2016-10-01 Thread Xebar Saram
i had an idea of using lisp to solve the header issue like
with %(org-insert-heading) , but that dosent seem do to anything. here is
the code:

(add-to-list 'org-capture-templates
   '("uu" "resturant"
 entry
(file+headline "/home/zeltak/org/files/agenda/travel.org"
"Inbox")
"* %^{Description}
  :PROPERTIES:
  :ID: %(org-id-uuid)
  :Rating: %^{rating?|-|1|2|3|4|5}
  :price: %^{price in local currancy?|-|0-10|10-20|20-30|30-50|50+}
  :Source: %^{Source?}
  :Type: %^{Type?|meal|breakfeast|dessert|street}
  :Cuisine:
%^{Cuisine?|-|Indian|Thai|Vietnamese|Asian|Chinese|Israeli|Italian|American|EastEuro|Mexican|French|Persian|Austrian|Jewish|Japan}
  :Fav: %^{Fav|yes|no}
  :END:
%(org-insert-heading)
%?
"
))


anyone?

On Sat, Oct 1, 2016 at 6:55 PM, Xebar Saram <zelt...@gmail.com> wrote:

> thx phil
>
> i now remember why i indented the  sub headers. i use a init.el file thats
> an org file (that is i tangle my setting.org) into settings.el at startup
> thus the above capture you kindly shared:
>
>  #+BEGIN_SRC emacs-lisp  :results none
>
>   ** TODO Finalize %?%^{item}
>  SCHEDULED: <%(my-next-next-working-day)>
>   *** TODO Process %\1
>  SCHEDULED: <%(my-next-working-day)>
>    TODO Prepare %\1
>SCHEDULED: %t
> #+END_SRC
>
> will break the actual lisp code blocks.
>
> Does anyone know how to get around in org lisp code blocks in an org
> config?
>
> best
>
> Z
>


Re: [O] Capture template creates multiple property drawers, help needed

2016-10-01 Thread Xebar Saram
thx phil

i now remember why i indented the  sub headers. i use a init.el file thats
an org file (that is i tangle my setting.org) into settings.el at startup
thus the above capture you kindly shared:

 #+BEGIN_SRC emacs-lisp  :results none

  ** TODO Finalize %?%^{item}
 SCHEDULED: <%(my-next-next-working-day)>
  *** TODO Process %\1
 SCHEDULED: <%(my-next-working-day)>
   TODO Prepare %\1
   SCHEDULED: %t
#+END_SRC

will break the actual lisp code blocks.

Does anyone know how to get around in org lisp code blocks in an org config?

best

Z


Re: [O] Capture template creates multiple property drawers, help needed

2016-10-01 Thread Xebar Saram
got it thx Phillip, appreciate it!

in a related continued issue, how does one define a sub header in the
capture that will translate correctly to a lower level header than the main
orc capture?

i have tried both this inside a capture:

  %^{prompt|*** Ingredients}


and also just using 2 stars

** sub header

yet none of them create a sub header. any clue guys?

Z



On Sat, Oct 1, 2016 at 1:26 PM, Philip Hudson <phil.hud...@iname.com> wrote:

> You need to put the timestamp (%u) /after/ the drawer in the template.
>
> On 01/10/2016, Xebar Saram <zelt...@gmail.com> wrote:
> > Hi all
> >
> > so i have this useful to me capture template
> >
> > (add-to-list 'org-capture-templates
> >'("un" "resturant"
> >  entry
> > (file+headline
> > "/home/zeltak/org/files/agenda/travel.org"
> > "NYC")
> > "* TOVISIT %^{Description}
> > %u
> >   :PROPERTIES:
> >   :Rating: %^{rating?|-|1|2|3|4|5}
> >   :price: %^{price in local currancy?|-|0-10|10-20|20-30|30-50|50+}
> >   :Source: %^{Source?}
> >   :Type: %^{Type?|meal|breakfeast|dessert|street}
> >   :Cuisine:
> > %^{Cuisine?|-|Indian|Thai|Vietnamese|Asian|Chinese|
> Israeli|Italian|American|EastEuro|Mexican|French|Persian|Austrian|Japan}
> >   :Fav: %^{Fav|-|yes|no}
> >   :END:
> > %?
> > "
> >))
> >
> >
> > as you can see im constructing a capture template that will add a propery
> > drawer. i must be doping something wrong in my syntax as after a while
> when
> > other input are added to the created header down the road (org-id, date
> > etc) these create another property drawer. this looks like this
> >
> >  TOVISIT Ample hill ice cream
> >  :PROPERTIES:
> >  :ID:   06a84670-baa9-4925-be93-b18252d6b684
> >  :END:
> >[2016-10-01 Sat]
> >  :PROPERTIES:
> > :Rating: -
> > :price: 0-10
> > :Source: http://www.amplehills.com/
> > :Type: dessert
> > :Cuisine: American
> > :Fav:
> > :END:
> >
> > is there anyway to solve this issue? is my capture syntax wrong?
> >
> > best
> >
> > Z
> >
>
>
> --
> phil.hud...@iname.com  PGP/GnuPG ID: 0x887DCA63
>


[O] Capture template creates multiple property drawers, help needed

2016-10-01 Thread Xebar Saram
Hi all

so i have this useful to me capture template

(add-to-list 'org-capture-templates
   '("un" "resturant"
 entry
(file+headline "/home/zeltak/org/files/agenda/travel.org"
"NYC")
"* TOVISIT %^{Description}
%u
  :PROPERTIES:
  :Rating: %^{rating?|-|1|2|3|4|5}
  :price: %^{price in local currancy?|-|0-10|10-20|20-30|30-50|50+}
  :Source: %^{Source?}
  :Type: %^{Type?|meal|breakfeast|dessert|street}
  :Cuisine:
%^{Cuisine?|-|Indian|Thai|Vietnamese|Asian|Chinese|Israeli|Italian|American|EastEuro|Mexican|French|Persian|Austrian|Japan}
  :Fav: %^{Fav|-|yes|no}
  :END:
%?
"
   ))


as you can see im constructing a capture template that will add a propery
drawer. i must be doping something wrong in my syntax as after a while when
other input are added to the created header down the road (org-id, date
etc) these create another property drawer. this looks like this

 TOVISIT Ample hill ice cream
 :PROPERTIES:
 :ID:   06a84670-baa9-4925-be93-b18252d6b684
 :END:
   [2016-10-01 Sat]
 :PROPERTIES:
:Rating: -
:price: 0-10
:Source: http://www.amplehills.com/
:Type: dessert
:Cuisine: American
:Fav:
:END:

is there anyway to solve this issue? is my capture syntax wrong?

best

Z


Re: [O] Add org-bookmark-heading to Org proper?

2016-09-22 Thread Xebar Saram
I *highly* support this. i use

org-bookmark-heading extensivly and its very much part of my base org mode
workflow

thx


best

Z

On Thu, Sep 22, 2016 at 5:33 PM, Adam Porter  wrote:

> As mentioned in <87oa3gs8tc@gmx.us>, some changes to the org-id
> functions are being proposed.  My org-bookmark-heading package uses
> org-id-find, so if that function changes or is removed, I'd have to
> change the package for newer Org versions.
>
> Given that, now might be a good time to consider merging the package
> into Org proper.  It seems like something that should be in Org already,
> being able to make Emacs bookmarks that point to Org headings.  It's
> actually just three functions, so not much of a "package" really.
>
> https://github.com/alphapapa/org-bookmark-heading
>
> Thoughts?  :)
>
>
>


Re: [O] org-agenda: different face (color) per file?

2016-09-16 Thread Xebar Saram
hehe thx

both are way over my head :)

ill just give up on the idea ;-)

thx!

Z

On Fri, Sep 16, 2016 at 9:34 AM, Adam Porter <a...@alphapapa.net> wrote:

> Xebar Saram <zelt...@gmail.com> writes:
>
> > this seems it should be trivial but googling didnt help. my org-agenda
> > view is made out of 5-6 files. can one define a different face (mainly
> > color) per file?
>
> There's no way to do this that I know of, but I guess you could try two
> approaches:
>
> 1.  Advise the code that writes the agenda line-by-line.  You'll have to
> dig through the agenda-making code...
>
> 2.  Write a function to post-process the agenda and adjust the color of
> each line depending on its source file (or its category, which is
> usually the file it comes from).  I'm guessing this would be easier.
>
>
>


[O] org-agenda: different face (color) per file?

2016-09-15 Thread Xebar Saram
Hi all,

this seems it should be trivial but googling didnt help. my org-agenda view
is made out of 5-6 files. can one define a different face (mainly color)
per file?

thx!

Z


[O] org-capture always asks me if i want to deelte excess backup versions of bookmarks?

2016-09-14 Thread Xebar Saram
Hi

i have set bookmark saving to t (bookmark-save-flag 1)

yet now every time i finish a org-capture i get this dialog:

Delete excess backup versions of /home/zeltak/.emacs.d/bookmarks? (y or n) y

i do want to auto save bookmarks, but can i exclude that when capturing in
org?


[O] convert MS power point to org mode?

2016-09-11 Thread Xebar Saram
hi all

anyone have any experience with converting M$ power point to org mode?

i have a bunch of courses i teach with presentations in ppt from a few
years ago and since i now use org-reveal would love to have a quick(ish)
way to convert them to org

best

Z


Re: [O] option for specific setupfile file or export option in org-publish-project-alist?

2016-09-11 Thread Xebar Saram
thx!

the :exclude-tags '("note" "noexport")  fixed the export and it works great
now

"...You can remove them with a hook, or a parse tree filter."

can you perhaps show an example for that or point me to some documentation
on that? im VERY bad at coding :)

thx so much again, really appreciate your help

Z



On Sun, Sep 11, 2016 at 10:59 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > also related can one define specific header names to exclude in export
> (not
> > using tags but just a header name)
> > so ie, i would instead of tagging all headers named "Homework" one by
> one,
> > i would just add a line in the export options saying exclude any header
> > named "Homework"
>
> You can remove them with a hook, or a parse tree filter.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] option for specific setupfile file or export option in org-publish-project-alist?

2016-09-11 Thread Xebar Saram
also related can one define specific header names to exclude in export (not
using tags but just a header name)
so ie, i would instead of tagging all headers named "Homework" one by one,
i would just add a line in the export options saying exclude any header
named "Homework"

thx!

Z

On Sun, Sep 11, 2016 at 9:32 AM, Xebar Saram <zelt...@gmail.com> wrote:

> thx Nicolas, appriciate the answer.
>
> i dont think its working for me but i may be missing the correct syntax
>
> this is how it currently looks
>
>  ("r.base.full"
>   :base-directory "/home/zeltak/org/files/Uni/Courses/R/"
>   :base-extension "org"
>   :publishing-directory "/home/zeltak/org/attach/bgu/
> courses/R/full.html/"
>   :publishing-function z/org-reveal-publish-to-html
>   :recursive t
>   :exclude-tags note noexport
>   :reveal-single-file t)
>
> is the line
>
> :reveal-single-file t
>
> correct syntax?
>
> thx alot!
>
> Z
>
>
> On Sun, Sep 11, 2016 at 12:25 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
> wrote:
>
>> Hello,
>>
>> Xebar Saram <zelt...@gmail.com> writes:
>>
>> > im wondering if anyone knows if its possible (and if so whats the
>> syntax)
>> > to point to a specific setupfile or add specific or export options in
>> > the org-publish-project-alist
>> >
>> > for example i want to publish to 2 different folders once time with the
>> > option #+OPTIONS: reveal_single_file:t and one time without. i cant
>> seem to
>> > find how to do that
>>
>> Try :reveal-single-file publishing option. It is the property associated
>> to the OPTIONS item, according to "ox-reveal.el".
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>
>


Re: [O] option for specific setupfile file or export option in org-publish-project-alist?

2016-09-11 Thread Xebar Saram
thx Nicolas, appriciate the answer.

i dont think its working for me but i may be missing the correct syntax

this is how it currently looks

 ("r.base.full"
  :base-directory "/home/zeltak/org/files/Uni/Courses/R/"
  :base-extension "org"
  :publishing-directory
"/home/zeltak/org/attach/bgu/courses/R/full.html/"
  :publishing-function z/org-reveal-publish-to-html
  :recursive t
  :exclude-tags note noexport
  :reveal-single-file t)

is the line

:reveal-single-file t

correct syntax?

thx alot!

Z


On Sun, Sep 11, 2016 at 12:25 AM, Nicolas Goaziou <m...@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Xebar Saram <zelt...@gmail.com> writes:
>
> > im wondering if anyone knows if its possible (and if so whats the syntax)
> > to point to a specific setupfile or add specific or export options in
> > the org-publish-project-alist
> >
> > for example i want to publish to 2 different folders once time with the
> > option #+OPTIONS: reveal_single_file:t and one time without. i cant seem
> to
> > find how to do that
>
> Try :reveal-single-file publishing option. It is the property associated
> to the OPTIONS item, according to "ox-reveal.el".
>
> Regards,
>
> --
> Nicolas Goaziou
>


[O] option for specific setupfile file or export option in org-publish-project-alist?

2016-09-10 Thread Xebar Saram
Hi all

im wondering if anyone knows if its possible (and if so whats the syntax)
to point to a specific setupfile or add specific or export options in
the org-publish-project-alist

for example i want to publish to 2 different folders once time with the
option #+OPTIONS: reveal_single_file:t and one time without. i cant seem to
find how to do that

best

Z


Re: [O] export to ics a specific buffer every X hours

2016-08-30 Thread Xebar Saram
Thx John, this is *exactly* what i wanted...its just as always my wishes
and code skills dont align

thx so much again

Z


On Tue, Aug 30, 2016 at 4:50 PM, John Kitchin 
wrote:

>
> (defun z/export-to-ics ()
> (interactive)
> (with-current-buffer (find-file-noselect "meetings.org")
> (rename-file (org-icalendar-export-to-ics)
> "/home/zeltak/org/files/export/kcal.ics")
> (message "exported to ics")))
>


Re: [O] export to ics a specific buffer every X hours

2016-08-30 Thread Xebar Saram
anyone? kinda stuck here :)

thx!


z

On Thu, Aug 25, 2016 at 10:32 AM, Xebar Saram <zelt...@gmail.com> wrote:

> Hi again all
>
> so i have a related question so ill continue in this thread. i have been
> using this command succesfully in the last few weeks
>
> (defun z/export-to-ics ()
> (interactive)
> (rename-file (org-icalendar-export-to-ics)
> "/home/zeltak/org/files/export/kcal.ics")
> (message "exported to ics"))
>
>
> this forces me to first open the file i want (meetings.org) and then
> launch the above command. is there a way to auto make the above function to
> auto export meeting.org each time without opening it first?
>
> thx
>
> Z
>
> On Wed, Jul 13, 2016 at 6:27 PM, Philip Hudson <phil.hud...@iname.com>
> wrote:
>
>> You have _two_ concerns here. First is what to do when you save
>> "meetings.org", second is what to do every half hour. Your code
>> handles both of them, essentially correctly, but in the wrong place.
>>
>> On 13 July 2016 at 09:41, Xebar Saram <zelt...@gmail.com> wrote:
>> > Thx
>> >
>> > i do have this now
>> >
>> >   (defun z/save-meeting-to-ics ()
>> > "If the current file is in '~/.dotfiles', the code blocks are
>> tangled"
>> > (when (equal (buffer-file-name)
>> >  (expand-file-name "/home/zeltak/org/files/agenda/
>> meetings.org"))
>>
>> This means the code will only execute if the current buffer is
>> "meetings.org" when it executes. That _is_ what you want when you save
>> meetings.org, but it _is not_ what you want when the timer executes.
>>
>> Break out the body of the `when' form into its own function, and call
>> that function from the timer, instead of `z/save-meeting-to-ics'.
>>
>> >  (rename-file (org-icalendar-export-to-ics)
>> > "/home/zeltak/org/files/export/kcal.ics")
>> >   (message "exported to ics")))
>> >
>> > ;;run every 30 minutes
>> >
>> > (run-with-timer 0 (* 30 60) 'z/save-meeting-to-ics)
>> > ;;(run-with-idle-timer 600 t #'org-agenda-redo) ;; to rebuild it every
>> 600
>> > second
>> > ;;  (add-hook 'after-save-hook #'z/save-meeting-to-ics)
>> >
>> > yet i cant get the ics file to be created niether when i save the
>> > meeting.org file
>>
>> For this, you need to add `z/save-meeting-to-ics' to the Emacs global
>> variable `after-save-hook' using function `add-hook'.
>>
>> > nor every 600 seconds.
>>
>> You mean 1800 seconds, I think.
>>
>> > what am i missing here?
>> >
>> > thx
>> >
>> > Z
>> >
>> > On Sun, Jun 26, 2016 at 9:49 PM, Philip Hudson <phil.hud...@iname.com>
>> > wrote:
>> >>
>> >> On 26 June 2016 at 16:38, Xebar Saram <zelt...@gmail.com> wrote:
>> >> > Hi all
>> >> >
>> >> > so i have pathetic coding skill but managed somehow to come up with
>> this
>> >> >
>> >> >  (defun z/save-meeting-to-ics ()
>> >> > "If the current file is in '~/.dotfiles', the code blocks are
>> >> > tangled"
>> >> > (when (equal (buffer-file-name)
>> >> >  (expand-file-name
>> >> > "/home/zeltak/org/files/agenda/meetings.org"))
>> >> >   (org-icalendar-export-to-ics)
>> >> >   (message "exported to ics")))
>> >> >
>> >> > this does save the org file "meetings.org" to an ICS file in the
>> same
>> >> > folder
>> >> > as the file. but i want to do 2 additional things:
>> >> > 1)save the resulting ICS file to a different directory
>> >> > 2)run this function every X hours (lets say every 2 hours)
>> >> >
>> >> > any clue guys?
>> >> >
>> >> > thx!
>> >> >
>> >> > Z
>> >>
>> >> For 1), change:
>> >>
>> >> (org-icalendar-export-to-ics)
>> >>
>> >> to something like this:
>> >>
>> >> (rename-file (org-icalendar-export-to-ics) your-preferred-pathname)
>> >>
>> >> For 2), evaluate this:
>> >>
>> >> (info "(elisp) Timers")
>> >>
>> >> --
>> >> Phil Hudson   http://hudson-it.ddns.net
>> >> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>> >
>> >
>>
>>
>>
>> --
>> Phil Hudson   http://hudson-it.ddns.net
>> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>>
>
>


Re: [O] export to ics a specific buffer every X hours

2016-08-25 Thread Xebar Saram
Hi again all

so i have a related question so ill continue in this thread. i have been
using this command succesfully in the last few weeks

(defun z/export-to-ics ()
(interactive)
(rename-file (org-icalendar-export-to-ics)
"/home/zeltak/org/files/export/kcal.ics")
(message "exported to ics"))


this forces me to first open the file i want (meetings.org) and then launch
the above command. is there a way to auto make the above function to auto
export meeting.org each time without opening it first?

thx

Z

On Wed, Jul 13, 2016 at 6:27 PM, Philip Hudson <phil.hud...@iname.com>
wrote:

> You have _two_ concerns here. First is what to do when you save
> "meetings.org", second is what to do every half hour. Your code
> handles both of them, essentially correctly, but in the wrong place.
>
> On 13 July 2016 at 09:41, Xebar Saram <zelt...@gmail.com> wrote:
> > Thx
> >
> > i do have this now
> >
> >   (defun z/save-meeting-to-ics ()
> > "If the current file is in '~/.dotfiles', the code blocks are
> tangled"
> > (when (equal (buffer-file-name)
> >  (expand-file-name "/home/zeltak/org/files/agenda/
> meetings.org"))
>
> This means the code will only execute if the current buffer is
> "meetings.org" when it executes. That _is_ what you want when you save
> meetings.org, but it _is not_ what you want when the timer executes.
>
> Break out the body of the `when' form into its own function, and call
> that function from the timer, instead of `z/save-meeting-to-ics'.
>
> >  (rename-file (org-icalendar-export-to-ics)
> > "/home/zeltak/org/files/export/kcal.ics")
> >   (message "exported to ics")))
> >
> > ;;run every 30 minutes
> >
> > (run-with-timer 0 (* 30 60) 'z/save-meeting-to-ics)
> > ;;(run-with-idle-timer 600 t #'org-agenda-redo) ;; to rebuild it every
> 600
> > second
> > ;;  (add-hook 'after-save-hook #'z/save-meeting-to-ics)
> >
> > yet i cant get the ics file to be created niether when i save the
> > meeting.org file
>
> For this, you need to add `z/save-meeting-to-ics' to the Emacs global
> variable `after-save-hook' using function `add-hook'.
>
> > nor every 600 seconds.
>
> You mean 1800 seconds, I think.
>
> > what am i missing here?
> >
> > thx
> >
> > Z
> >
> > On Sun, Jun 26, 2016 at 9:49 PM, Philip Hudson <phil.hud...@iname.com>
> > wrote:
> >>
> >> On 26 June 2016 at 16:38, Xebar Saram <zelt...@gmail.com> wrote:
> >> > Hi all
> >> >
> >> > so i have pathetic coding skill but managed somehow to come up with
> this
> >> >
> >> >  (defun z/save-meeting-to-ics ()
> >> > "If the current file is in '~/.dotfiles', the code blocks are
> >> > tangled"
> >> > (when (equal (buffer-file-name)
> >> >  (expand-file-name
> >> > "/home/zeltak/org/files/agenda/meetings.org"))
> >> >   (org-icalendar-export-to-ics)
> >> >   (message "exported to ics")))
> >> >
> >> > this does save the org file "meetings.org" to an ICS file in the same
> >> > folder
> >> > as the file. but i want to do 2 additional things:
> >> > 1)save the resulting ICS file to a different directory
> >> > 2)run this function every X hours (lets say every 2 hours)
> >> >
> >> > any clue guys?
> >> >
> >> > thx!
> >> >
> >> > Z
> >>
> >> For 1), change:
> >>
> >> (org-icalendar-export-to-ics)
> >>
> >> to something like this:
> >>
> >> (rename-file (org-icalendar-export-to-ics) your-preferred-pathname)
> >>
> >> For 2), evaluate this:
> >>
> >> (info "(elisp) Timers")
> >>
> >> --
> >> Phil Hudson   http://hudson-it.ddns.net
> >> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
> >
> >
>
>
>
> --
> Phil Hudson   http://hudson-it.ddns.net
> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>


Re: [O] function to duplicate current header and change ID

2016-08-11 Thread Xebar Saram
thats perfect John

thx so much...its amazing how far my "code" was ..another example how much
i suck at anything resembling coding ;-)

best

Z


Re: [O] function to duplicate current header and change ID

2016-08-11 Thread Xebar Saram
ok so i have this so far


(defun zxx  ()
  "duplicate and change id of org header"
(interactive)
(org-copy-subtree)
(org-end-of-line)
(newline)
;(org-yank)
(org-paste-subtree)
(org-forward-heading-same-level 1)
(let ((current-prefix-arg '(4)))
(call-interactively #'org-id-get-create))
)


yet it seems very bloated since i cant code ;-) and dosent work as it
dosent really creates a new org-id. any tips?

best

Z


On Wed, Aug 3, 2016 at 7:17 AM, Xebar Saram <zelt...@gmail.com> wrote:

> 1. copy current header and contents (org-copy-subtree) at point
> 2. auto paste it below current header
> 3. change ID
>


[O] crash when editing R blocks in org

2016-08-03 Thread Xebar Saram
Hi all

i have emacs crashing on me when i edit R code blocks in org

here is the terminal output:

https://paste.xinu.at/xg6/

does that give any clues? should i file a bug in org or emacs?

how do proceed with trying to figure out whats causing this?

best

Z


[O] function to duplicate current header and change ID

2016-08-02 Thread Xebar Saram
Hi all

i noticed i use the copy and then paste entire headers (with content) quite
often. the problem i also notice is that creates alot of issues with
duplicate IDS. I wonder if anyone has a function he would like to share or
can help me create a function that will
1. copy current header and contents (org-copy-subtree) at point
2. auto paste it below current header
3. change ID

thx alot!

Z


Re: [O] Can one tangle only the current blocks under header ?

2016-08-02 Thread Xebar Saram
thx so much

Joon: thx this is great. one last question. suppose i have multiple code
blocks under  header like this:

 main i3 conf
 :PROPERTIES:
 :ID:   f17b5518-2695-4484-a958-2fc7b8aa2479
 :tangle:   /home/zeltak/.i3/config
 :END:



is there a way to issue a tangle just for all below the header blocks?

best

Z

On Sun, Jul 31, 2016 at 5:34 PM, Grant Rettke 
wrote:

> You can `:tangle no' on the source block to exclude it from tangling.
>
> You can even tangle one source block to a different or as many files
> as you like during tangling.
> Sincerely,
>
> Grant Rettke
>
>
> On Sat, Jul 30, 2016 at 1:38 PM, Joon Ro  wrote:
> > can one tangle only the current blocks under header or  can you only
> tangle
> > the whole file?
> > the issue is again for dotfiles managed by org that these files are not
> > proper org babel languages and look like this:
> >
> > #+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.conf
> > softvol-max=600
> > #+END_SRC
> >
> > the manual (http://orgmode.org/manual/Extracting-source-code.html) only
> > shows how to tangle the whole file
> >
> > any ideas?
> >
> >
> > If you read the help for org-babel-tangle:
> >
> > With one universal prefix argument, only tangle the block at point.
> > When two universal prefix arguments, only tangle blocks for the
> > tangle file of the block at point.
> >
> >
> > So if you do c-u first before org-babel-tangle, it will only tangle the
> code
> > block at point.
> > I use this a lot so I have the following in my init file:
> >
> > (defun org-babel-tangle-block()
> >   (interactive)
> >   (let ((current-prefix-arg '(4)))
> >  (call-interactively 'org-babel-tangle)))
> >
> > (eval-after-load "org"
> >   '(progn
> >  (define-key org-mode-map (kbd "C-c b") 'org-babel-tangle-block)))
> >
> >
> > So I can just do C-c b and it will just tangle the code block at point.
> >
> > And I agree with you I with the manual
> > (http://orgmode.org/manual/Extracting-source-code.html) has this
> > information.
> >
> > Hope this helps,
> > Joon
> >
>


[O] Can one tangle only the current blocks under header ?

2016-07-30 Thread Xebar Saram
Hi all

can one tangle only the current blocks under header or  can you only tangle
the whole file?
the issue is again for dotfiles managed by org that these files are not
proper org babel languages and look like this:

#+BEGIN_SRC conf :mkdirp yes :tangle ~/.config/mpv/mpv.conf
softvol-max=600
#+END_SRC

the manual (http://orgmode.org/manual/Extracting-source-code.html) only
shows how to tangle the whole file

any ideas?

thx!

Z


Re: [O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread Xebar Saram
Thx John

perfect

Z

On Fri, Jul 29, 2016 at 6:48 PM, John Kitchin <jkitc...@andrew.cmu.edu>
wrote:

> See http://orgmode.org/manual/tangle_002dmode.html#tangle_002dmode
>
> It should do what you need.
>
>
> On Friday, July 29, 2016, Xebar Saram <zelt...@gmail.com> wrote:
>
>> Hi all
>>
>> i have officaly moved over to manage all my dotfiles with orgmode based
>> on this excellent post:
>> https://expoundite.net/guides/dotfile-management
>>
>> one thing im missing is how to make some of these tangled sh files
>> executable after i tangle them (like running chmod +x).
>>
>> any ideas?
>>
>> best
>>
>> Z
>>
>>
>>
>
> --
> John
>
> ---
> 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
>
>
>


[O] make some tangled dotfiles file executable during babel tangling?

2016-07-29 Thread Xebar Saram
Hi all

i have officaly moved over to manage all my dotfiles with orgmode based on
this excellent post:
https://expoundite.net/guides/dotfile-management

one thing im missing is how to make some of these tangled sh files
executable after i tangle them (like running chmod +x).

any ideas?

best

Z


[O] showing the scheduled/due date in agenda view in the header ?

2016-07-24 Thread Xebar Saram
Hi all

i was wondering if there is a way to add the scheduled/due date in agenda
view in the header ?
so it would look like this:

Wednesday  27 July 2016
 meet:9:00.. meet zack <2016-01-18 Mon 17:30-18:00>

best!

Z


Re: [O] issues with duplicate ID's

2016-07-23 Thread Xebar Saram
also: does anyone know of a function to go through all org files and
present a nice buffer with all duplicates and a way to auto remove them

i see why this happens since i often copy org headers to add new function
and the ID is copied alongside

Z

On Fri, Jul 22, 2016 at 8:46 PM, Xebar Saram <zelt...@gmail.com> wrote:

> thx
> it seems many of them are in the corresponding archive files. isnt that
> normal when you archive?
>
> best
>
> Z
>
> On Fri, Jul 22, 2016 at 6:20 PM, Philip Hudson <phil.hud...@iname.com>
> wrote:
>
>> On 22 July 2016 at 12:58, Xebar Saram <zelt...@gmail.com> wrote:
>> > Hi all
>> >
>> > i have been having many warnings on Duplicate ID's past month and
>> finally
>> > have time/energy to ask about this ;-)
>> >
>> > so each time i start emacs or switch org buffers i get a ton of
>> warnings on
>> > Duplicate ID's:
>> >
>> ...
>> >
>> > 2 questions
>> >
>> > a) does this have any affect on orgmode performance or other effects i
>> cant
>> > think of?
>>
>> Breaks MobileOrg, for one.
>>
>> > b) any intelligent way of resolving this?
>>
>> Assuming they are all programmatically assigned and not explicitly
>> referenced by you anywhere: delete all the IDs. New ones will be
>> assigned.
>>
>>
>> --
>> Phil Hudson   http://hudson-it.ddns.net
>> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>>
>
>


Re: [O] issues with duplicate ID's

2016-07-22 Thread Xebar Saram
thx
it seems many of them are in the corresponding archive files. isnt that
normal when you archive?

best

Z

On Fri, Jul 22, 2016 at 6:20 PM, Philip Hudson <phil.hud...@iname.com>
wrote:

> On 22 July 2016 at 12:58, Xebar Saram <zelt...@gmail.com> wrote:
> > Hi all
> >
> > i have been having many warnings on Duplicate ID's past month and finally
> > have time/energy to ask about this ;-)
> >
> > so each time i start emacs or switch org buffers i get a ton of warnings
> on
> > Duplicate ID's:
> >
> ...
> >
> > 2 questions
> >
> > a) does this have any affect on orgmode performance or other effects i
> cant
> > think of?
>
> Breaks MobileOrg, for one.
>
> > b) any intelligent way of resolving this?
>
> Assuming they are all programmatically assigned and not explicitly
> referenced by you anywhere: delete all the IDs. New ones will be
> assigned.
>
>
> --
> Phil Hudson   http://hudson-it.ddns.net
> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>


[O] issues with duplicate ID's

2016-07-22 Thread Xebar Saram
Hi all

i have been having many warnings on Duplicate ID's past month and finally
have time/energy to ask about this ;-)

so each time i start emacs or switch org buffers i get a ton of warnings on
Duplicate ID's:

WARNING: 20 duplicate IDs found, check *Messages* buffer

Duplicate ID "9276e354-d04c-43e4-a11e-27d90359b0a4", also in file
/home/zeltak/org/files/archive/TODO.org_archive
Duplicate ID "08e2584a-dc9f-49f9-b0b2-555d407a499b", also in file
/home/zeltak/org/files/archive/TODO.org_archive
Duplicate ID "da41e5f7-b9cf-4cd7-99e2-fad1f7844ab3", also in file
/home/zeltak/org/files/archive/TODO.org_archive
Made readonly! [2 times]
Duplicate ID "62b49339-cd19-4a3c-a6fd-70dd45be4670", also in file
~/org/files/agenda/dl.org
Made readonly! [2 times]
Duplicate ID "ecc84901-e33e-45c2-8da5-fc6876bccc2a", also in file
~/org/files/archive/TODO.org_archive
Made readonly! [2 times]
Duplicate ID "42c7ae56-5843-403a-84d2-8c12e8c4c03f", also in file
/home/zeltak/org/files/agenda/travel.org
Made readonly!
Duplicate ID "52148936-a9d5-4556-b688-e580676b05a7", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "b8969b3e-17d5-4913-95d1-1e68ec8550a8", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "b0e5fed7-b3c2-4c48-9029-be0a56b02b0f", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "b1bd78ae-83b5-4cb4-a4b5-6db5287f3956", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "5d5567f8-9f16-4b76-adb6-8600ce16e2ec", also in file
/home/zeltak/.emacs.d/settings.org
. this goes on and on ;-)

2 questions

a) does this have any affect on orgmode performance or other effects i cant
think of?

b) any intelligent way of resolving this?

best

Z


Re: [O] orgmode read/source all options from a template file?

2016-07-21 Thread Xebar Saram
Ok got it, you can "source" a template file by using the SETUPFILE option ,
ie;

#+SETUPFILE: /home/zeltak/org/files/Uni/Courses/templates/
org.options.reveal.org


best

z

On Thu, Jul 21, 2016 at 1:15 PM, Xebar Saram <zelt...@gmail.com> wrote:

> Hi all
>
> i was wondering if orgmode had a simple way to read/source all options
> from a template file. for example instead of adding all this to every
> presentation file i create:
>
>  #+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil
>  reveal_control:t
>  #+OPTIONS: reveal_center:t
>  #+OPTIONS: reveal_rolling_links:t reveal_keyboard:t reveal_overview:t
> num:nil
>  #+OPTIONS: reveal_width:1200 reveal_height:800
>   #+OPTIONS: toc:nil
>   # #+REVEAL: split
>   #+REVEAL_MARGIN: 0.1
>   #+REVEAL_MIN_SCALE: 0.5
>
> i would just source a file (txt or orgmode?) with all the pre definitions
>
> any clue?
>
> thx
>
> Z
>


[O] orgmode read/source all options from a template file?

2016-07-21 Thread Xebar Saram
Hi all

i was wondering if orgmode had a simple way to read/source all options from
a template file. for example instead of adding all this to every
presentation file i create:

 #+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil
 reveal_control:t
 #+OPTIONS: reveal_center:t
 #+OPTIONS: reveal_rolling_links:t reveal_keyboard:t reveal_overview:t
num:nil
 #+OPTIONS: reveal_width:1200 reveal_height:800
  #+OPTIONS: toc:nil
  # #+REVEAL: split
  #+REVEAL_MARGIN: 0.1
  #+REVEAL_MIN_SCALE: 0.5

i would just source a file (txt or orgmode?) with all the pre definitions

any clue?

thx

Z


Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-21 Thread Xebar Saram
Hi again

Chuck:

is there a way to modify you nice code regex code snippet to simultaneously
change all example blocks to R blocks in a converted rmd>org file?
so when executing the block all example blocks:


 #+BEGIN_EXAMPLE
 help.search("rnorm")
 #+END_EXAMPLE

will turn into R blocks

 #+BEGIN_SRC R :session Rorg  :results none
 help.search("rnorm")
#+END_SRC


thx!

Z








On Wed, Jul 20, 2016 at 9:00 PM, Xebar Saram <zelt...@gmail.com> wrote:

> ahh i see what you mean.
>
> thats a cool tip yet i find i have to find/replace also for images,
> find/replace to change example blocks to R code blocks etc which is quite
> tedious since i have about 50 of these converted Rmd to org files :)
> ill keep investigating this and report back
>
> thx so much for the tips! :)
>
> Z
>
> On Wed, Jul 20, 2016 at 8:42 PM, Charles C. Berry <ccbe...@ucsd.edu>
> wrote:
>
>> On Wed, 20 Jul 2016, Xebar Saram wrote:
>>
>> thx for the tips!
>>>
>>> when i try to run the source block :
>>>
>>> #+BEGIN_SRC emacs-lisp :results silent
>>>  (replace-regexp "^=[{]r \\([^}]*\\)[}]\\(.*\\)=$"
>>>  "#+name: \\1
>>>  ,#+begin_src R
>>>  \\2
>>>  ,#+end_src")
>>>
>>> #+END_SRC
>>>
>>> i just get a nil in the message area. what am i missing?
>>>
>>>
>>
>> Nothing!
>>
>> The `:results silent' should suppress any output.
>>
>> Anyway, what you should see is that the code chunks that pandoc placed
>> inside equal signs like
>>
>> : ={r my-name} code =
>>
>> are now in src blocks.
>>
>> I think you need to put the src block at the top or add a
>>
>> : (goto-char (point-min))
>>
>> as its first line to be sure it converts all the code chunks.
>>
>>
>> Chuck
>>
>
>


Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Xebar Saram
ahh i see what you mean.

thats a cool tip yet i find i have to find/replace also for images,
find/replace to change example blocks to R code blocks etc which is quite
tedious since i have about 50 of these converted Rmd to org files :)
ill keep investigating this and report back

thx so much for the tips! :)

Z

On Wed, Jul 20, 2016 at 8:42 PM, Charles C. Berry <ccbe...@ucsd.edu> wrote:

> On Wed, 20 Jul 2016, Xebar Saram wrote:
>
> thx for the tips!
>>
>> when i try to run the source block :
>>
>> #+BEGIN_SRC emacs-lisp :results silent
>>  (replace-regexp "^=[{]r \\([^}]*\\)[}]\\(.*\\)=$"
>>  "#+name: \\1
>>  ,#+begin_src R
>>  \\2
>>  ,#+end_src")
>>
>> #+END_SRC
>>
>> i just get a nil in the message area. what am i missing?
>>
>>
>
> Nothing!
>
> The `:results silent' should suppress any output.
>
> Anyway, what you should see is that the code chunks that pandoc placed
> inside equal signs like
>
> : ={r my-name} code =
>
> are now in src blocks.
>
> I think you need to put the src block at the top or add a
>
> : (goto-char (point-min))
>
> as its first line to be sure it converts all the code chunks.
>
>
> Chuck
>


Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Xebar Saram
thx for the tips!

when i try to run the source block :

#+BEGIN_SRC emacs-lisp :results silent
  (replace-regexp "^=[{]r \\([^}]*\\)[}]\\(.*\\)=$"
  "#+name: \\1
  ,#+begin_src R
  \\2
  ,#+end_src")

#+END_SRC

i just get a nil in the message area. what am i missing?

thx

Z

On Wed, Jul 20, 2016 at 8:20 PM, Charles C. Berry <ccbe...@ucsd.edu> wrote:

> On Wed, 20 Jul 2016, Xebar Saram wrote:
>
> thx phil
>>
>> the Rmd format is actually quite different than md so that conversion
>> didnt
>> go well
>>
>>
> I tried this
>
> pandoc -f markdown -t org input-file.Rmd -o output-file.org
>
> then I opened `output-file.org' and put this src block at the very top:
>
> #+BEGIN_SRC emacs-lisp :results silent
>   (replace-regexp "^=[{]r \\([^}]*\\)[}]\\(.*\\)=$"
>   "#+name: \\1
>   ,#+begin_src R
>   \\2
>   ,#+end_src")
>
> #+END_SRC
>
> When I execute that code block, all the converted code chunks become src
> blocks.
>
> This isn't perfect as chunk options are appended to the `#+NAME:...' line,
> but if you want to play with the regexp's you can probably get it to pick
> those out and put them on a separate line. Or just write another src block
> with another `replace-regexp' to fix those lines.
>
> With a little effort you can write a command file for `sed' to do what the
> code block above does and then pipe the pandoc output to that command like
> this:
>
> : pandoc -f markdown -t org input-file.Rmd | \
> : sed -f convert-chunks > output-file.org
>
> and you have an org document ready (or almost ready) to go.
>
>
> HTH,
>
> Chuck
>
>


Re: [O] convert rmarkdown (rmd) files to orgmode?

2016-07-20 Thread Xebar Saram
thx phil

the Rmd format is actually quite different than md so that conversion didnt
go well

i ended up doing a 2 step conversion:

in R (via the GUI or through R -e command line), first convert the Rmd
files to md files:

require(knitr) # required for knitting from rmd to md
require(markdown) # required for md to html
knit('test.rmd', 'test.md') # creates md file

then use pandoc to convert the md files to org:

pandoc -o test.org  test.md

this gives an almost 1:1 org file


thx

Z

On Wed, Jul 20, 2016 at 1:08 PM, Philip Hudson <phil.hud...@iname.com>
wrote:

> pandoc -f markdown -t org myfile.rmd
>
> On 20 July 2016 at 05:28, Xebar Saram <zelt...@gmail.com> wrote:
> > Hi all
> >
> > anyone know of a way to convert rmarkdown (rmd) files to orgmode?
> >
> > im preparing a R course and lots of cool examples in R are in rmd format
> so
> > it could be very useful to me
> >
> > best
> >
> > Z
>
>
>
> --
> Phil Hudson   http://hudson-it.ddns.net
> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>


[O] convert rmarkdown (rmd) files to orgmode?

2016-07-19 Thread Xebar Saram
Hi all

anyone know of a way to convert rmarkdown (rmd) files to orgmode?

im preparing a R course and lots of cool examples in R are in rmd format so
it could be very useful to me

best

Z


Re: [O] export to ics a specific buffer every X hours

2016-07-13 Thread Xebar Saram
Thx

i do have this now

  (defun z/save-meeting-to-ics ()
"If the current file is in '~/.dotfiles', the code blocks are tangled"
(when (equal (buffer-file-name)
 (expand-file-name "/home/zeltak/org/files/agenda/
meetings.org"))
 (rename-file (org-icalendar-export-to-ics)
"/home/zeltak/org/files/export/kcal.ics")
  (message "exported to ics")))

;;run every 30 minutes

(run-with-timer 0 (* 30 60) 'z/save-meeting-to-ics)
;;(run-with-idle-timer 600 t #'org-agenda-redo) ;; to rebuild it every 600
second
;;  (add-hook 'after-save-hook #'z/save-meeting-to-ics)

yet i cant get the ics file to be created niether when i save the
meeting.org file nor every 600 seconds. what am i missing here?

thx

Z

On Sun, Jun 26, 2016 at 9:49 PM, Philip Hudson <phil.hud...@iname.com>
wrote:

> On 26 June 2016 at 16:38, Xebar Saram <zelt...@gmail.com> wrote:
> > Hi all
> >
> > so i have pathetic coding skill but managed somehow to come up with this
> >
> >  (defun z/save-meeting-to-ics ()
> > "If the current file is in '~/.dotfiles', the code blocks are
> tangled"
> > (when (equal (buffer-file-name)
> >  (expand-file-name
> > "/home/zeltak/org/files/agenda/meetings.org"))
> >   (org-icalendar-export-to-ics)
> >   (message "exported to ics")))
> >
> > this does save the org file "meetings.org" to an ICS file in the same
> folder
> > as the file. but i want to do 2 additional things:
> > 1)save the resulting ICS file to a different directory
> > 2)run this function every X hours (lets say every 2 hours)
> >
> > any clue guys?
> >
> > thx!
> >
> > Z
>
> For 1), change:
>
> (org-icalendar-export-to-ics)
>
> to something like this:
>
> (rename-file (org-icalendar-export-to-ics) your-preferred-pathname)
>
> For 2), evaluate this:
>
> (info "(elisp) Timers")
>
> --
> Phil Hudson   http://hudson-it.ddns.net
> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>


[O] make specific orgmode code blocks read only?

2016-07-11 Thread Xebar Saram
Hi!
I was wondering if possible at all and anyone knew of a way to make
specific orgmode code blocks read only? the rest of the org buffer would be
normal just specific code blocks

best

Z


[O] Create org split agenda view, problems with differnt agendas in split windows?

2016-07-02 Thread Xebar Saram
Hi

I have written this crappy code to save a split orgmode agenda views with
different agenda views.

(defun z/buffers-restore-agenda-split   ()
 (interactive)
 (org-agenda nil "a")
 (split-window-right)
 (org-agenda nil "ba")
 (split-window-below)
 (org-agenda nil "bb")
 )

the function does split the windows correctly yet all the views get the
last option ("bb") instead of a different view in each window

any clue why this happens?


thx!


Z


  1   2   3   4   >