Re: [O] [feature request] More flexible repeats

2011-09-24 Thread Michael Steeves

On 9/24/11 7:16 AM, John Wiegley wrote:

Dave Abrahams  writes:



I have habits that I need to perform, e.g., every weekday, or four times a
week.  I don't see a way to express that.  If I could schedule a task for
+1.4d or +1.75d (respectively), I'd be happy.


Habits aren't really for scheduling, they're for monitoring a simple kind of
consistency.  So, if you *actually* need to do something four times a week,
habits aren't the best way to express that need.



It's funny that this topic came up on the mailing list just now -- I've 
been working on integrating org-mode more into my daily workflow, and am 
starting to put some habits in and was trying to figure out how to make 
the habits repeat in the way I want them to.


If I have something that I want to track in terms of consistency, and 
want to do it during the weekdays, is there a way I could express that 
other then having a series of 5 habits, one for each day of the week, 
each one of which would repeat every week?



-Mike
--
Michael Steeves (stee...@raingods.net)



[O] Suppressing interpeter output in code blocks

2013-06-05 Thread Michael Steeves
Apologies if this is documented somehere, but I haven't been having much
luck in trying to find the answer to this.

If I have an org doc with some python code in it

#+begin_src python :session testing :results output
a = 1
b = 2
c = a + b
print "Hello, world."
#+end_src

when I evaluate the block, the output is

#+RESULTS:
: Python 2.7.5 (default, May 19 2013, 13:26:46)
: [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))]
on darwin
: Type "help", "copyright", "credits" or "license" for more information.
: >>> >>> Hello, world.

Is there any way to suppress all the extra text, and just get the
"Hello, world." string as my output?




-Mike
-- 
Michael Steeves (stee...@raingods.net)



Re: [O] Suppressing interpeter output in code blocks

2013-06-06 Thread Michael Steeves
On 6/6/13 12:04 PM, Eric Schulte wrote:
> Michael Steeves  writes:
>> Is there any way to suppress all the extra text, and just get the
>> "Hello, world." string as my output?
>>
> 
> #+begin_src python :session testing
> a = 1
> b = 2
> c = a + b
> "Hello, world."
> #+end_src
> 
> #+RESULTS:
> : Hello, world.

Thanks for the reply. Unfortunately I need to set :results to output,
since I'm working with a doc where I'm working through a python script,
and want to run a section, get some output and write some additional
text, then move on to the next block (and all within a session, since
block 2 depends on things from block 1, and so on.

I put together a more descriptive example, but interestingly enough I'm
now getting some inconsistent output when I evaluate the source blocks.

#+BEGIN_SRC python :session testing :results output
print "Hello, World."
print "This is a test."
#+END_SRC

#+RESULTS:
: Hello, World.
: This is a test.

#+BEGIN_SRC python :session testing :results output
a = 1; b = 2
print "A is "+str(a)
print "B is "+str(b)
#+END_SRC

#+RESULTS:
:
: A is 1
: B is 2

#+BEGIN_SRC python :session testing :results output
c = a + b
print "C is "+str(c)
print "Now we're done."
#+END_SRC

#+RESULTS:
:
: C is 3
: Now we're done.

#+BEGIN_SRC python :session testing :results output
y = 3
z = 4
print "Y is "+str(y)
print "Z is "+str(z)
#+END_SRC

#+RESULTS:
:
: >>> Y is 3
: Z is 4

I don't understand why the last chunk provides different output than the
second -- the only real difference is that I put the assignments on one
line (seperated with a semicolon) in the second, and on individual lines
in the last.


-Mike
-- 
Michael Steeves (stee...@raingods.net)