[O] Archiving logbook entries

2014-07-30 Thread Giorgio Valoti
Hi all,
I remember a discussion some time ago about archiving the logbook
entries, but I can’t find it on Gmane.

If someone has a link to to the thread, by any chance, I would be really
grateful.

Thank you in advance.

--
Giorgio Valoti




[O] Link to original Org file with batch mode, a follow-up

2011-07-04 Thread Giorgio Valoti

Il giorno 04/lug/2011, alle ore 06:58, Giorgio Valoti ha scritto:

 Hi,
 when I try to tangle files in batch mode, using a command like this:
 
 emacs -batch ~/Developer/PROJECTS/gmp/project.org --eval=(org-babel-tangle)
 
 the resulting files do not have links to the original file, i.e.:
 
 !-- [[][GUI:1]] --
 
 while if I tangle from emacs I get this, as expected:
 
 !-- [[id:5E3B176A-50C7-4DC3-A54F-D769000D8D8A][GUI:1]] --
 
 Is there a way to generate links in batch mode? Or perhaps should I use a 
 different way to invoke tangling from the command line?


While looking at this, I discovered that :comments no web option does not work 
IDs, but only with paths, i.e. with this file:

# [[file:~/Desktop/org-links-test.org::*A%20section][A-section:1]]

ls -la

# A-section:1 ends here



(org-babel-detangle) works

but not with this:

# [[id:5E3B176A-50C7-4DC3-A54F-D769000D8D8A][A-section:1]]

ls -la

# A-section:1 ends here



Also, (org-babel-detangle) does not seem to work with nested blocks:

#! /bin/bash

# [[file:~/Desktop/org-links-test.org::*Main%20block][main-block]]

# [[file:~/Desktop/org-links-test.org::*Block%201][block1]]
echo 'this is the first block!'
# block1 ends here


# [[file:~/Desktop/org-links-test.org::*Block%202][block2]]
echo 'the second block!'
# block2 ends here

# main-block ends here



generated from this file:

* Detangling nested block

** Block 1
   #+srcname: block1
   #+begin_src sh
 echo 'this is the first block'
   #+end_src

** Block 2
   #+srcname: block2
   #+begin_src sh
 echo 'the second block'
   #+end_src

** Main block
   #+srcname: main-block
   #+begin_src sh :comments noweb :noweb yes :tangle script2.sh :shebang #! 
/bin/bash
 block1
 block2 
   #+end_src


Hope this helps




Ciao
--
Giorgio Valoti




[O] Link to original Org file with batch mode

2011-07-03 Thread Giorgio Valoti
Hi,
when I try to tangle files in batch mode, using a command like this:

emacs -batch ~/Developer/PROJECTS/gmp/project.org --eval=(org-babel-tangle)

the resulting files do not have links to the original file, i.e.:

!-- [[][GUI:1]] --

while if I tangle from emacs I get this, as expected:

!-- [[id:5E3B176A-50C7-4DC3-A54F-D769000D8D8A][GUI:1]] --

Is there a way to generate links in batch mode? Or perhaps should I use a 
different way to invoke tangling from the command line?

Thank you in advance


--
Giorgio Valoti




Re: [Orgmode] Unable to select source code blocks

2011-02-26 Thread Giorgio Valoti

Il giorno 26/feb/2011, alle ore 01.08, Eric Schulte ha scritto:

 […]
 
 The problem doesn’t seem related to the autocomplete system, it’s the
 org-babel-src-block-names function that returns an empty list. I don’t
 know why, the org-babel-src-name-w-name-regexp used by that function
 seems ok at a cursory look.
 
 
 Could you attach a small file with named code blocks which aren't caught
 by this function?  I just ran the following in by file of scraps of
 code examples and got 60 names returned
 
 #+begin_src emacs-lisp
  (length (org-babel-src-block-names))
 #+end_src

How embarrassing! I used this

  #+begin_src emacs-lisp
 (org-babel-src-block-names)
  #+end_src

which returns nil or so I thought. I was expecting to see the list of source 
blocks in the results. 

Using your snippet on the same file:

  #+begin_src emacs-lisp
 (length (org-babel-src-block-names))
  #+end_src

  #+results:
  : 19

However, using eval-last-sexp I get a list with nil items. Is it correct?


Ciao
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unable to select source code blocks

2011-02-26 Thread Giorgio Valoti

Il giorno 26/feb/2011, alle ore 17:05, Eric Schulte ha scritto:

 […]
 
 You could also try executing the function directly by calling
 `eval-expression' M-: (org-babel-src-block-names) within the Org-mode
 buffer.

I get the same results. 

 
 also, make sure you have the latest version of Org-mode.

I’m using version 7.4 with emacs 23.2. Do you think I should use the 
development version? I’d have no problem using it but Org has become such an 
important tool (my thanks to all the contributors, btw!) that I’m reluctant 
switching to a non-official version.


Grazie
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unable to select source code blocks

2011-02-25 Thread Giorgio Valoti

Il giorno 23/feb/2011, alle ore 08.19, Eric S Fraga ha scritto:

 […]
 
 Hi,
 
 I don’t know if I’m missing something but I can’t get the
 org-babel-goto-named-src-block to work. When I invoke it on the sample
 file below the autocompletion shows nil and nothing else and if insert
 the source code block name I get a no match. I’m using org 7.4 with
 Emacs 23.2.
 
 […]
 
 this works just fine for me; I don't know what you mean by
 autocompletion but I use ido-everywhere and both test and test2 appear
 in the prompt for =org-babel-goto-named-src-block=.
 
 Hi Eric,
 I don’t use ido-mode (maybe I should? Seems cool!). By autocomplete I meant 
 tab completion. 
 
 Right.  I'm surprised that autocompletion doesn't work; if ido can find
 the possible entries, autocompletion should also be able to, I would
 have thought.
 
 Maybe somebody else can chime in, somebody that doesn't use ido?
 
 I do recommend ido in any case!

The problem doesn’t seem related to the autocomplete system, it’s the 
org-babel-src-block-names function that returns an empty list. I don’t know 
why, the org-babel-src-name-w-name-regexp used by that function seems ok at a 
cursory look.




Ciao
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Unable to select source code blocks

2011-02-22 Thread Giorgio Valoti

Il giorno 21/feb/2011, alle ore 12.51, Eric S Fraga ha scritto:

 Giorgio Valoti giorgi...@me.com writes:
 
 Hi,
 
 I don’t know if I’m missing something but I can’t get the
 org-babel-goto-named-src-block to work. When I invoke it on the sample
 file below the autocompletion shows nil and nothing else and if insert
 the source code block name I get a no match. I’m using org 7.4 with
 Emacs 23.2.
 
 * Source code navigation test
  #+srcname: test
  #+begin_src sh
echo 'hello world'
  #+end_src
 
  #+results: test
  : hello world
 * Another item, another source code block
  #+srcname: test2
  #+begin_src sh
echo 'ciao mondo'
  #+end_src
 
  #+results: test2
  : ciao mondo
 * and so on
 
 Thank you in advance
 --
 Giorgio Valoti
 
 Giorgio,
 
 this works just fine for me; I don't know what you mean by
 autocompletion but I use ido-everywhere and both test and test2 appear
 in the prompt for =org-babel-goto-named-src-block=.

Hi Eric,
I don’t use ido-mode (maybe I should? Seems cool!). By autocomplete I meant tab 
completion. 


--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Unable to select source code blocks

2011-02-14 Thread Giorgio Valoti
Hi,
I don’t know if I’m missing something but I can’t get the 
org-babel-goto-named-src-block to work. When I invoke it on the sample file 
below the autocompletion shows nil and nothing else and if insert the source 
code block name I get a no match. I’m using org 7.4 with Emacs 23.2.

* Source code navigation test
  #+srcname: test
  #+begin_src sh
echo 'hello world'
  #+end_src

  #+results: test
  : hello world
* Another item, another source code block
  #+srcname: test2
  #+begin_src sh
echo 'ciao mondo'
  #+end_src

  #+results: test2
  : ciao mondo
* and so on

Thank you in advance
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Hiding deadlines for completed (but not DONE) tasks

2011-01-28 Thread Giorgio Valoti

Il giorno 27/gen/2011, alle ore 19.41, Matt Lundin ha scritto:

 David Maus dm...@ictsoc.de writes:
 
 At Wed, 12 Jan 2011 21:09:33 +0100,
 Michael Brand wrote:
 
 On Wed, Jan 12, 2011 at 19:06, Giorgio Valoti giorgi...@me.com wrote:
 mmmh, maybe there’s just something wrong with my conf:
 
 (setq org-todo-keywords (quote ((sequence TODO(t) STARTED(n) | 
 DONE(d!/!))
  (sequence WAITING(w@/!) SOMEDAY(s!) | CANCELLED(c@/!))
  (sequence APPT(a!) ERRAND(e!) ONSITE(o!) | HOME(h!/!))
  (sequence APERTO(f!) | CHIUSO(F!/!))
  (sequence QUOTE(q!) QUOTED(Q!) | APPROVED(A@) EXPIRED(E@) 
 REJECTED(R@)
 
 When I tag an item as CANCELLED, the agenda hides it; when I tag it as 
 CHIUSO it still shows up.
 
 I can not see anything wrong with this configuration and I hope that
 someone else can tell more.
 
 This config looks okay and I can't reproduce the problem. 
 
 I can't reproduce the problem either.

Yes, I was using a previous version of org. I just updated it yesterday and the 
problem is fixed.

 
 However: It is true that a done task with a deadline stays on the
 agenda (C-a a) if the deadline is/was today.
 
 This is the default setting, but it can also be changed by setting
 org-agenda-skip-deadline-if-done to t.
 
 Best,
 Matt


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Notes reviews with sparse trees

2011-01-28 Thread Giorgio Valoti

Il giorno 27/gen/2011, alle ore 19.32, Matt Lundin ha scritto:

 Giorgio Valoti giorgi...@me.com writes:
 
 since I started using Org I collected a bunch of notes in a journal
 file and I’d like to review them on a regular schedule. Ideally, I’d
 like to mark a given entry with a review timestamp so I can skip it
 the next I review the journal file and then use a sparse tree to see
 only the notes that I haven’t reviewed in a while.
 
 The problem is that I can’t get a sparse tree using these timestamps
 because it works only with deadlines and schedules. Does anybody know
 how to work around this limitation, short of using a regexp?
 
 You can use tags/property matches for this.
 
 For all inactive timestamps more than two weeks in the past:
 
 C-c / m TIMESTAMP_IA-2w

That’s perfect!


 […]
 
 And so on...
 
 Please see the following for more details:
 
 (info (org) Matching tags and properties)
 (info (org) Special properties)
 
 http://orgmode.org/worg/org-tutorials/advanced-searching.html#special-properties


Thank you, Matt.

--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Notes reviews with sparse trees

2011-01-25 Thread Giorgio Valoti

Il giorno 25/gen/2011, alle ore 09.05, suvayu ali ha scritto:

 On Tue, Jan 25, 2011 at 7:00 AM, Giorgio Valoti giorgi...@me.com wrote:
 The problem is that I can’t get a sparse tree using these timestamps because 
 it works only with deadlines and schedules. Does anybody know how to work 
 around this limitation, short of using a regexp?
 
 Well my suggestions is with using regexps, not what you asked. In any
 org buffer look at this variable:
 
 
 org-deadline-time-regexp is a variable defined in `org.el'.
 Its value is \\DEADLINE: *\\([^]+\\)
 Local in buffer notes.org; global value is nil
 
  Automatically becomes buffer-local when set in any fashion.
 
 Documentation:
 Matches the DEADLINE keyword together with a time stamp.
 
 
 Now you could put your time stamps with a special tag, say LAST:.
 You can choose to add it as keyword and fontify with the same face as
 DEADLINE, org-special-keyword-face. Then you can write your own defun
 using org-sparse-tree and a regex based on the above which uses the
 LAST: keyword to find the time stamps just like DEADLINEs. Does that
 work for you?

I didn’t think about using custom functions but it should work. 

Thank you a lot.


--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Notes reviews with sparse trees

2011-01-24 Thread Giorgio Valoti
Hi,
since I started using Org I collected a bunch of notes in a journal file and 
I’d like to review them on a regular schedule. Ideally, I’d like to mark a 
given entry with a review timestamp so I can skip it the next I review the 
journal file and then use a sparse tree to see only the notes that I haven’t 
reviewed in a while. 

The problem is that I can’t get a sparse tree using these timestamps because it 
works only with deadlines and schedules. Does anybody know how to work around 
this limitation, short of using a regexp?

Thank you in advance
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Hiding deadlines for completed (but not DONE) tasks

2011-01-12 Thread Giorgio Valoti
Hi, 
by default, a task with a deadline shows up in the agenda until is marked DONE. 
Reading the docs it seems there’s no way to specify other statuses to ignore. I 
use some other states, like CANCELLED or CLOSED that I’d like to hide as well. 
Is there a way to do this? 

Thank you in advance
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Hiding deadlines for completed (but not DONE) tasks

2011-01-12 Thread Giorgio Valoti

Il giorno 12/gen/2011, alle ore 18.16, Michael Brand ha scritto:

 Hi Giorgio
 
 On Wed, Jan 12, 2011 at 17:25, Giorgio Valoti giorgi...@me.com wrote:
 by default, a task with a deadline shows up in the agenda until is marked 
 DONE. Reading the docs it seems there’s no way to specify other statuses to 
 ignore. I use some other states, like CANCELLED or CLOSED that I’d like to 
 hide as well. Is there a way to do this?
 
 I guess you need to configure your todo keywords with the vertical bar, see
 http://orgmode.org/manual/Workflow-states.html#Workflow-states

mmmh, maybe there’s just something wrong with my conf:

 (setq org-todo-keywords (quote ((sequence TODO(t) STARTED(n) | 
 DONE(d!/!))
  (sequence WAITING(w@/!) SOMEDAY(s!) | CANCELLED(c@/!))
  (sequence APPT(a!) ERRAND(e!) ONSITE(o!) | HOME(h!/!))
  (sequence APERTO(f!) | CHIUSO(F!/!))
  (sequence QUOTE(q!) QUOTED(Q!) | APPROVED(A@) EXPIRED(E@) 
 REJECTED(R@)

When I tag an item as CANCELLED, the agenda hides it; when I tag it as CHIUSO 
it still shows up.


Ciao
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Include files to be used in literate programming

2010-09-13 Thread Giorgio Valoti

Il giorno 13/set/2010, alle ore 14.47, Dan Davison ha scritto:

 Giorgio Valoti giorgi...@me.com writes:
 […]
 
 Is there a way to expand values from included files?
 
 Hi Giorgio,
 
 I don't know of a way currently but I agree that it is desirable. It
 does seem temtping to want to use #+INCLUDE for this purpose;
 however #+INCLUDE is an /export/ construct, and tangling is not
 (technically at least) an Org-mode export method.

Ah, here’s why.

 So some options that
 come to my mind are:
 
 1. I am overlooking an existing way of doing this.
 
 2. Implement #+INCLUDE when tangling, optionally or by default.
 
 3. Implement a general way of including blocks of code from other files
   in such a way that they behave as 'normal' code blocks. This would
   have several potentially useful consequences.

What’s the difference between options 2 and 3? I mean, if we #+INCLUDE when 
tangling how is it different from including code blocks? Or do you see option 3 
as a more granular way to refer to external entities, something comparable to a 
programming language import statement?


 
 4. It seems that it should be possible to get what you want by first
   using `org-export-as-org' followed by `org-babel-tangle'. However,
   `org-export-as-org' doesn't currently include #+INCLUDE'd files. I
   wonder if it should. A hack to do what you want is below (You'll be
   prompted for a file name to save the Org export buffer to.):

Thank you, Dan. It could be a good enough interim solution.


Ciao
--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Include files to be used in literate programming

2010-09-12 Thread Giorgio Valoti
Hi all,
I’ve just switched from OmniFocus and began using Org mode. But I also 
discovered that it can be used for literate programming and I’d like to ask if 
is there a way to use an included file in the tangling phase. In other words, I 
have a file which includes a commons.org file, like this:

=== commons.org contents ===
* Variabili comuni
  :PROPERTIES:
  :END:
#+SRCNAME: entity-name
#+BEGIN_SRC :noweb yes
nome_tabella
#+END_SRC


=== main.org contents ===
#+INCLUDE: commons.org

* Sezione in SQL
  :PROPERTIES:
  :END:
#+SRCNAME: sql-module
#+BEGIN_SRC sql :tangle module.sql :noweb yes
  select *
  from table entity-name;
#+END_SRC

entity-name should come from the commons but it’s not.

Is there a way to expand values from included files?

Thank you in advance.

--
Giorgio Valoti


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode