Exporting comments to comments?

2020-02-19 Thread Allen S. Rout



I'd like to write an org-mode document, export it to markdown, and have
comments exist in the markdown.


I feel like I'm thinking about the process incorrectly, and it's hard to
search around because the discussions around 'org-mode comments' focus
on org data for which authors would like to _prevent_ export.

I saw some old conversations about making links to the hacked-in
comment: URI scheme, but that seemed quite hackish indeed.

I thought about making a block of a 'comment' type, but of course all
the workflow for that is, again, focused on either preventing its export
in the first place, or making sure that it's exported in a visible
manner in the output.  ("I want to print the comments in my LaTeX..").


So... am I missing something obvious?  Anyone else trying something similar?


- Allen S. Rout




[O] back matter in Org documents.

2016-08-18 Thread Allen S. Rout


I've got a document structure I'd like to use, and I've been thinking
about how to do it.   I thought I'd float the idea, and see if anyone
has attempted something similar.

I'm writing some prose, in which I'm referring to email messages.  In
magical rainbow-pony land, my use case would look something like

---

Text text text blah blah relevant point, see [[ref: ./2004-01-13.eml]]
blah blah more prose.



A footnote/endnote signifier would be placed in the prose at the point
of the ref, and the contents of the file would be included in an
appendix section.

I've been searching on 'appendix', and the references seem mostly to
talk about _formatting_ the section we deem an appendix, in the
appropriate style.   I understand the value of this, but it's not my case.

Should I just define a section, #+INCLUDE each email I care about, and
do an internal link?  That's not awful, but it's not nearly as
high-speed and sexy.


- Allen S. Rout




[O] "global" variables in a babel document...

2016-05-17 Thread Allen S. Rout
org-version
org "8.2.10"
emacs-version
"24.5.1"


I'm seeing what seems to be some inconsistent treatment of :var header
args.  Or maybe I'm just missing something.   I'm trying to follow:

http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html#Header-arguments-in-Org-mode-properties

and I find that the local :var works (of course) and the outline level
one also works, but the document-level one does not.

Minimal example, with my results, below.

I'm wondering if I'm thinking about the problem wrong.  What I'm trying
to accomplish is setting, at a document level, a few variables which I
would like to be accessible in every code block in this document.

I know I can set them independently on every block, but that seems
tiresome.


- Allen S. Rout

-
#+PROPERTY:header-args:var tsmuser="query"

* foo
 :PROPERTIES:
 :header-args: :var tsmpass="query"
 :END:

#+name: toy
#+begin_src sh :var bloop="foo"
echo sss ${bloop} ddd
echo sss ${tsmpass} ddd
echo sss ${tsmuser} ddd
#+end_src

#+RESULTS: toy
| sss | foo   | ddd |
| sss | query | ddd |
| sss | ddd   | |
-





Re: [O] orgmode and R?

2015-08-03 Thread Allen S. Rout
On 08/03/2015 12:51 PM, Jude DaShiell wrote:
> Can the orgmode spreadsheet access R either directly or indirectly through 
> maybe babel?  If this is possible, do any tutorials exist with some worked 
> examples?  I have R and emacs-R-mode installed so I can access R from 
> emacs at least.
> 

Yes.

http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html

is the first hit on "org-mode R" from google.

There is extensive art on the topic.


- Allen S. Rout




[O] More export filter examples out there?

2015-03-17 Thread Allen S. Rout

I'm trying to accomplish a custom export task which I'd hoped to be
pretty simple:  something like:


In each status section, only export the first child headline.


After several dumb ideas, I decided that doing it with a filter was
probably the Right Place.  I built a filter intended to be used on

:filter-parse-tree

and attempted to express:

If you're parent is a headline
and your parent's title is 'Status'
and you're not the first of your siblings

then don't be included.  I've added my malfunctioning filter below,to
clearly display my "thinking".

I don't seem to be able to get the title as a string.  org-export-data
seems to expect a different 'info' than the 'info' present at filter
time.  I get complaints about

org-export-data: Wrong type argument: hash-table-p, nil

if I uncomment the attempt to string compare the title.


I'm finding my experience with XSLT to be a handicap; I bring
expectations to the table that are misguided.  Is there a pretty-printer
or other dump for the export parse tree?   The dump I sometimes get in
*Messages* is not all that readable.

Should I be thinking of this as a parse-table operation, or should I be
reasoning about it from :filter-headline?


More generally, anyone got some art for some similar reconstruction
they've done, which they might like to share?


- Allen S. Rout




(defun ox-asr-only-first-status  ( tree backend info )
  " Arrange that, under headlines marked 'Status', only the first of
them is included.

"
  ( org-element-map tree (remq 'item org-element-all-elements)

( lambda (e)
  ( let* ( ( parent   ( org-element-property :parent e) )
   ( first-sib( car (org-element-contents parent )))
   ( parent-type  ( org-element-type parent ))
   ( parent-title ( org-element-property :title e))
;  ( pt-string( org-export-data parent-title info ))
   )

(if (and
 ( eq parent-type 'headline )
 ( not (eq e first-sib ))
;( string= (org-export-data parent-title) "Status")
 )
( org-element-set-contents e  "-->" parent-title "<---  "
(org-element-contents e))
  )

)
  )

)


  tree
  )





Re: [O] Org is awesome

2014-04-04 Thread Allen S. Rout
On 03/22/2014 03:52 AM, Bastien wrote:

> 
>> ORG IS AWESOME.
> 
> Tell it to the world with a blog entry :)


I searched worg for 'colophon' ('cite' of course had lots of hits..)

It might be nice if there were something analogous to

http://astrostatistics.psu.edu/su07/R/html/utils/html/citation.html

for those authors who felt like providing pointers.  This 'reproducable
research' thing is picking up steam.  Stylized citations for the
production systems couldn't but help.

"Yeah, Allen, why don't you write one?"   Koff.  OK, here's a stab,
riffing on the R citation() function.  Please consider this a bikeshed
at which to briefly aim your paint cannons.


---

 To cite org-mode in publications use:

  Free Software Foundation, Inc. (2004 - 2014) org-mode: Outline-based
  notes management and organizer.  http://orgmode.org/

A BibTeX entry for LaTeX users is

  @Manual{,
title = {org-mode: Outline-based notes management and organizer.},
author = {{Carsten Dominik et. alia}},
organization = {Free Software Foundation, Inc.},
address = {51 Franklin Street, Fifth Floor; Boston, MA 02110-1301},
year = {2014},
url = {http://orgmode.org/},
  }

---




Re: [O] So many reading on gmane?

2014-04-04 Thread Allen S. Rout
On 04/03/2014 08:49 AM, Rainer M Krug wrote:
> This seems very strange - but it is the fact that gmane seems to be not
> available the reason why this list is so quiet today
> 

USENET uber alles; bevor alles; schließlich;  überhaupt.  ;)

- Allen S. Rout
- Nein, ich spreche kein Deutsch






Re: [O] asynchronous code evaluation

2013-09-04 Thread Allen S. Rout
On 09/04/2013 09:23 AM, Johannes Rainer wrote:
>
> well, I'm using emacs/org for my data analyses in R. I thus combine
> documentation (i.e. the conclusions drawn from e.g. plots created in R)
> and the R code to perform the analysis in my org file. Since I'm
> analysing high throughput data some tasks to handle the data are quite
> time consuming.
> 

In the past, I have solved that problem by adding a makefile in the
directory, which produces a separate fragment to be consumed/included by
the org file.  Make based on the updated data, publish based on the
static outuput of the make process.

If you let the sim run "in the background" while you edit, you'll likely
get to a point, whilst tweaking or such, that you have dispatched
several long-running jobs in parallel, and only care about the last
result.  That's probably counterproductive. :)


- Allen S. Rout





Re: [O] New logo

2013-04-01 Thread Allen S. Rout
On 04/01/2013 02:35 PM, Evan Misshula wrote:
> Apologies for any breech of protocol.  EM
> 

Ew.

- Allen S. Rout






Re: [O] New logo

2013-04-01 Thread Allen S. Rout
On 04/01/2013 02:28 PM, Brian van den Broek wrote:

> 
> That's not in keeping with the spirit of the thing. Knowing allusions (as
> above) are fine, but overtly pointing it? That's not cricket!


Mmm.  Maybe a _REALLY_ big turkey on a platter?

- Allen S. Rout






Re: [O] Offer for taking over maintainership

2013-02-14 Thread Allen S. Rout
On 02/14/2013 10:36 AM, Jose E. Marchesi wrote:
> 
> Note: Fear leads to anger; anger leads to hate; hate leads to the dark
> side.
> 

Hate leads to suffering.  Get it right.

Was that a shark we just jumped over?

On 02/13/2013 04:31 PM, Allen S. Rout wrote:
>
> It would probably be most peaceful not to discuss Jambunathan's offer on
> this forum.   I expect that the count of +1s to the offer will
> communicate the list's collective opinion.
>

No, really.

- Allen S. Rout




Re: [O] Offer for taking over maintainership

2013-02-13 Thread Allen S. Rout
On 02/13/2013 03:45 PM, John Wiegley wrote:

>  I didn't even realize Bastien was looking for a replacement.


There's no technical reason someone interested in making an offer should
necessarily wait for a declared vacancy.  It seems a straightforward
move of no-confidence, soliciting support.



It would probably be most peaceful not to discuss Jambunathan's offer on
this forum.   I expect that the count of +1s to the offer will
communicate the list's collective opinion.


- Allen S. Rout





Re: [O] GNU Emacs ported to Android

2012-08-22 Thread Allen S. Rout

On 08/22/2012 04:17 AM, 'Mash (Thomas Herbert) wrote:

On 2012-08-21 18:42+0100, Ian Barton wrote:

On 21/08/12 16:22, Karl Voit wrote:


Anybody else sharing experiences with Emacs or HW-keyboards on
Android?


Thanks for the heads up. Off to play. The android Hackers Keyboard
has Ctrl, Alt, etc. I use it to run Emacs via a terminal. However, a
hardware keyboard that worked would be great.

Ian.



Tempted to get one of these at some point.
http://www.freedominput.com/freedom-accessories/freedom-pro-keyboard



I own it.  It doesn't work, at least 2.2.1 on my MyTouch 4G (and my G1, 
but...)


The problem is not with the hardware per se;  the keyboard driver in 
_android_ (not at the bluetooth layer) specifically omitted the key 
modifier concept, so ctrl, M-, alt just don't happen.


I've been hoping that the Android-as-USB-host stuff announced at the 
last IO would unscrew that problem, but haven't followed its progress much.


- Allen S. Rout







Re: [O] are super-hidden technical blocks required?

2012-08-06 Thread Allen S. Rout

On 08/04/2012 02:10 PM, Ilya Shlyakhter wrote:


One common use would be to store the creation & last-modification dates
of each entry.  I've tried various ways of doing it and they all were
too obtrusive to use on _every_ entry.   Time-stamping of all entries
would be extremely useful, just as time-stamping of files is.
But I don't want to see the timestamps during normal Org usage.



As a user, if your code is decorating my tree, I want to know it.  If 
you hide it, I'd be mad.   Org is my life in plain text, not WordPerfect 
with reveal-codes.



- Allen S. Rout




Re: [O] A week off

2012-07-17 Thread Allen S. Rout

On 07/16/2012 06:49 PM, Bastien wrote:

Dear all,

I'm taking a week off, with no internet connectivity.

I'll be back online on July 24th.



Mm, so does that mean we fill his inbox with packing peanuts or something?

- Allen S. Rout





Re: [O] Plotting (with gnuplot) using dates timestamps

2012-03-26 Thread Allen S. Rout

On 03/26/2012 09:37 AM, Alan Schmitt wrote:

Hello,

I'm trying to plot the following table, but the dates part is all wrong. Is 
there a way to tell gnuplot what the date format is?



I've found gnuplot's date support to be torment.

You might want to investigate using R for these tasks:  R understands 
what a date is at a fundamental level, and doesn't give you any crap 
about it.


Better still, once you climb over the activation energy of changing 
graphing idioms, a huge vista of new capabilities are open to you.


- Allen S. Rout




Re: [O] Rendering error, or am I missing something? -- case 3.

2012-03-01 Thread Allen S. Rout

On 03/01/2012 02:54 PM, Eric Schulte wrote:

I've just pushed up a fix for this issue, please let me know if it
doesn't work on your system.



Pulled and reinstalled, all looks well.   Thanks for the quick response, 
and the encouragement.  I'll keep on trying to break stuff. :)


- Allen S. Rout





Re: [O] Is babel just ... unstable at the moment?

2012-03-01 Thread Allen S. Rout

On 03/01/2012 03:19 PM, Eric Schulte wrote:

Hi Allen,

[...] You've discovered a couple of edge cases and you seem to have a
knack for coming up with pernicious examples.



Why sir, I blush!   *fans self*

I just proudly repeated this comment to my co-workers.  One of them 
commented "They seem to know you!". :)


- Allen S. Rout





[O] Is babel just ... unstable at the moment?

2012-03-01 Thread Allen S. Rout


So I keep running into very strange babel behaviors.

In addition to the whacked-out rendering oddities I've been posting 
about,  I've just executed a static R block a half dozen times and 
gotten three or four different results blocks.   I'm not going to try to 
minimal-example this one, it seems too timing sensitive to be worth 
attempting replication.


I'm using the blocks-calling-other-blocks behavior rather heavily, and 
the variation seems to be that, on some calls, output from dependencies 
is just getting pasted into the output from the dependant block.


Worse, there was one occasion on which it seems I got an output line 
from 'last'  C-c C-c  in 'this' run's output block.


I've been seeing comments about changes to the babel block formats 
recently, so it's perhaps plausible that git HEAD just isn't stable. 
Should I back off?



- Allen S. Rout






[O] Minimal example... Is this intended ?

2012-02-29 Thread Allen S. Rout
I've attached 'minimal.org',  which demonstrates (for me) an odd 
behavior in current git head (I encountered this just after doing a git 
pull).


There are two ls listings in this file, one after the 'foo' block, and 
prefixed by a results: tag.   The other is before the block, and not so 
prefixed.


The trailing, prefixed block was generated when I had no space after the 
string 'foo' in the NAME: line.   If I add one space, then the results 
block which comes before is generated.


I can't think this is a deliberate feature;  can anyone else duplicate 
these results?


- Allen S. Rout


| total  | 324 | | |||   |  
 |
| -rw-rw-r-- |   1 | asr | asr |   1323 | 2012-02-15 | 15:40 | db-data  
 |
| -rw-r--r-- |   1 | asr | asr |   1632 | 2011-05-31 | 14:06 | dbsizing 
 |
| -rw-r--r-- |   1 | asr | asr |   3235 | 2011-05-31 | 14:05 | dbsizing~
 |
| -rw-rw-r-- |   1 | asr | asr | 50 | 2012-02-15 | 16:22 | dsmerror.log 
 |
| -rw-rw-r-- |   1 | asr | asr |157 | 2012-02-15 | 15:40 | Makefile 
 |
| -rw-rw-r-- |   1 | asr | asr |  3 | 2012-02-15 | 15:40 | Makefile~
 |
| -rw-rw-r-- |   1 | asr | asr |   1393 | 2012-02-29 | 16:01 | minimal.org  
 |
| -rw-rw-r-- |   1 | asr | asr |   1224 | 2012-02-29 | 15:53 | minimal.org~ 
 |
| -rw-r--r-- |   1 | asr | asr |   7929 | 2012-02-29 | 15:53 | notes.org
 |
| -rw-r--r-- |   1 | asr | asr |   6057 | 2012-02-29 | 15:21 | notes.org~   
 |
| -rw-r--r-- |   1 | asr | asr | 148474 | 2012-02-29 | 15:23 | notes.pdf
 |
| -rw-r--r-- |   1 | asr | asr |   6488 | 2012-02-29 | 15:23 | notes.tex
 |
| -rw-r--r-- |   1 | asr | asr |   6599 | 2012-02-29 | 15:18 | notes.tex~   
 |
| -rw-r--r-- |   1 | asr | asr | 106646 | 2011-11-02 | 13:46 | 
some_filename.png |
| drwxr-xr-x |   2 | asr | asr |   4096 | 2011-11-07 | 14:57 | upgrade-docs 
 |
#+NAME: foo 
#+BEGIN_SRC sh 
ls -l 
#+END_SRC

#+RESULTS: foo
| total  | 324 | | |||   |  
 |
| -rw-rw-r-- |   1 | asr | asr |   1323 | 2012-02-15 | 15:40 | db-data  
 |
| -rw-r--r-- |   1 | asr | asr |   1632 | 2011-05-31 | 14:06 | dbsizing 
 |
| -rw-r--r-- |   1 | asr | asr |   3235 | 2011-05-31 | 14:05 | dbsizing~
 |
| -rw-rw-r-- |   1 | asr | asr | 50 | 2012-02-15 | 16:22 | dsmerror.log 
 |
| -rw-rw-r-- |   1 | asr | asr |157 | 2012-02-15 | 15:40 | Makefile 
 |
| -rw-rw-r-- |   1 | asr | asr |  3 | 2012-02-15 | 15:40 | Makefile~
 |
| -rw-rw-r-- |   1 | asr | asr | 48 | 2012-02-29 | 15:55 | minimal.org  
 |
| -rw-rw-r-- |   1 | asr | asr |   1224 | 2012-02-29 | 15:53 | minimal.org~ 
 |
| -rw-r--r-- |   1 | asr | asr |   7929 | 2012-02-29 | 15:53 | notes.org
 |
| -rw-r--r-- |   1 | asr | asr |   6057 | 2012-02-29 | 15:21 | notes.org~   
 |
| -rw-r--r-- |   1 | asr | asr | 148474 | 2012-02-29 | 15:23 | notes.pdf
 |
| -rw-r--r-- |   1 | asr | asr |   6488 | 2012-02-29 | 15:23 | notes.tex
 |
| -rw-r--r-- |   1 | asr | asr |   6599 | 2012-02-29 | 15:18 | notes.tex~   
 |
| -rw-r--r-- |   1 | asr | asr | 106646 | 2011-11-02 | 13:46 | 
some_filename.png |
| drwxr-xr-x |   2 | asr | asr |   4096 | 2011-11-07 | 14:57 | upgrade-docs 
 |



Re: [O] Changing [X] by something else

2012-02-10 Thread Allen S. Rout

On 02/09/2012 11:54 AM, François Pinard wrote:

Nicolas Goaziou  writes:


It may be a bit ugly at times, but don't we all feel at home with
plain text?


We surely do.  Yet, now that we all swim within Unicode -- aren't we?


Nope.

- Allen S. Rout




Re: [O] Changing [X] by something else

2012-02-10 Thread Allen S. Rout

On 02/09/2012 11:26 AM, Nicolas Goaziou wrote:

Hello,

pin...@iro.umontreal.ca (François Pinard) writes:


I notice in org.el that [X] is hard-wired, while I would have liked the
possibility of changing it by [✓] in my things, which I find both softer
and cleaner.  Could these ([ ], [-] and [X]) be turned into variables?
The difficulty might be to recognize them properly, I guess.



I don't think that we should allow basic structural elements to
change. As you said, it will make Org documents less interoperable, but
also less _recognizable_. What would happen to Org if every user could
come up with its own syntax? Could we even talk about an "Org format"
anymore?



M. Pinard may want to look into changing the way that glyph displays... 
 If we were to define a font face which was used for checkboxes, he 
could then specify for that font an edited font which displays his 
desired checkmark in the character formerly knows as  'X'.



- Allen S. Rout




Re: [O] org-jira.el... and Org conventions (Bastien, Carsten and all)

2012-01-03 Thread Allen S. Rout

On 01/03/2012 10:53 AM, Bao Haojun wrote:



So my point is, if someone try to make transition easy, they should do
it on the company level, such as from Jira to Redmine. Org mode feels
kind of personal to me, and I feel good enough to be able to sync
between company issue tracking system and my org-mode, no need for it to
be able to transit to another issue tracking system's org-mode.



It shouldn't be necessary for the org-mode user to learn 'How Haojun 
thinks about ticket systems' to use jira, and then also learn 'how 
[someone] thinks about ticket systems' to then use the (imagined?) TRAC 
integration.


It should be enough to understand 'How org-mode thinks about ticket 
systems'.   Unfortunately, in order to do this, it is necessary for 
org-mode to have an opinon. :)   Which it doesn't, yet.




- Allen S. Rout




Re: [O] Not overwriting unchanged source code files when tangling

2011-11-22 Thread Allen S. Rout

On 11/19/2011 01:32 PM, Holger Hoefling wrote:

Hi everyone,

I wanted to thank everyone for their helpful suggestions and wanted to
share the best solutions I heard of and found.

One solution is to include a rule in the makefile for every sourcecode
file that that copies it and only updates the copy if something has
changed (see Nick's email below).



Or tangle to one directory, and then copy to another;  then there's one 
rule for all of the transitions.



work/%: tangle/%
@cmp --silent  $< $@ || ( echo "Updating $@" ; cp $< $@ )

I liked Nick's "cmp" invocation; I started out with diff. :)


- Allen S. Rout




Re: [O] would take more than an org-mode strip-down.

2011-10-03 Thread Allen S. Rout

On 09/27/2011 01:04 PM, James Levine wrote:


I thought I’d zoom out and tell you what a consumer experience is
like:


I'm replying off the list.  BTW, are you either The Conductor, or The
Author? ;)

Your experience seems to be informed by a sense that 'org-mode' is
eager for market share or some such.  I think you'll find that's not a
common case.  Certainly, org-mode afficionados are eager to expound on
their preferred tools; but that doesn't mean they're after mass-market
appeal.

For example:


2) Some things are just better with a gui.


to a project subtitled "Your life in plain text" suggests your
perspective is not aligned with that of many of the project
participants.  I do not mean by this a disparagement of your
perspective, merely discriminating it from that of the average nerd.



Your composition style is literate and prolific; you might enjoy this
series of essays by Neal Stephenson, entitled "In the beginning was
the Command Line".

http://steve-parker.org/articles/others/stephenson/

(also available from the author's website in other formats)

http://www.cryptonomicon.com/beginning.html


but the discussion of 'fallibility...' includes several paragraphs
which I feel might be illuminating, especially on the topic of
documentation.

http://steve-parker.org/articles/others/stephenson/fallibility.shtml

In My Opinion, the current docs in org-mode are targeted at those who
expect to have their own heads and shoulders inside the 'engine
compartment' of org and emacs.  This makes them a poor tool to
communicate with End-Users.  But this might be acceptable, because
there's no hood on the engine, and the bloody thing is steered with a
rudder and laterals, instead of the nice sane wheel and pedals
everyone else uses. :)


- Allen S. Rout




Re: [O] Not merging org-lparse, org-xhtml & org-odt to the core

2011-08-24 Thread Allen S. Rout

On 08/24/2011 06:55 AM, Štěpán Němec wrote:


I find it quite surprising that people on this list, including Bastien,
are even willing to reply to the dirt you're spitting up.



Jambunathan is abrupt and speaks without much concern for the feelings 
of the recipients of his messages.  He has great concern for the exact 
meaning of his words, and for being technically correct.   This makes 
him an extremely uncomfortable conversational partner, and an extremely 
rewarding collaborator.


I'd suggest trying to avoid emotional involvement with things that he 
says.


He's not even a patch on Xah Lee. :)

- Allen S. Rout




Re: [O] PERL, org-mode and literal document input.

2011-05-06 Thread Allen S. Rout
"Eric Schulte"  writes:

> alternately you could just include your yaml as an example block
>
> #+results: yaml-config
> : erpalpha:...

This is what I've eventually done.  It feels dirty; I'm asserting the
"results" block of a nonexistent src, and saying "edit this".  But
perhaps I should just deal with it.

Am I silly to want to be able to label it 'srcname' instead of
'results'?  My elisp-fu is not good enough to let me define 

:var-but-read-the-src-block 

- Allen S. Rout





[O] PERL, org-mode and literal document input.

2011-05-02 Thread Allen S. Rout


Greetings. 

I've got a YAML config file and some processing I'm doing to it.  I'd
love to have both the bits inside the maintenance document I'm writing
to manage a service.  This seems a perfect use for code blocks and their
evaluation.  However, I get behavior out of my attempt to do this which
I find strange.

I include a minimal, failing example below.

The problem "appears" to be somewhere in the :var reference designed to
introduce the other code block.  There are two problems, one pretty
egregious, the other somewhat subtle.

Egregious first:  

For some reason, whatever process sucks up config_yml and inserts it
into '$config' in mogrify_pl just elides the first two lines. 

Additionally, the contents of the variable are very strangely
formatted.   The contents of most of the first YAML document (less the
first two lines) are each on a separate line.  

However, the last of the first doc and all of the second doc are  in a
single line.


Subtle:

The last few newlines are also elided.  This might not seem to be a big
deal, but YAML really wants to end with a trailing newline.  I figure I
should be able to express that in the doc, and not tag one on in my
code. 

... 

If I add a #+begin_src line to config_yml, and then build a results
section by hand, and copy the identical document there, then the
variable is imported more or less as I'd expect: $config is one large
scalar value, with the contents of config_yml inserted.  The trailing
newlines are still stripped, but this is better at least.


I've been searching for something like "Echo this" to put in my
begin_src; it would seem a little silly but not awful to define a
process to just copy the contents of the source block to the result, and
go from there.   But it's inelegant, to say the least. 

... 

So: Is there a conventional way I should get org to treat the source
block 'the same way' it treats the results block?  Failing that, is
there a common idiom to run a source block to get the result "Echo me
verbatim into the results block" ? 

I see profligate use of org-babel-trim in the code.  Does that mean that
permitting leading or trailing whitespace is a regular source of
problems?  I didn't want to start dinking with it casually. 

... 


Any pointers would be deeply appreciated. 


*** YAML transform. 

#+srcname: config_yml
---
erpalpha:
   - alpha-rac-1.erp.ufl.edu
   - alpha-rac-2.erp.ufl.edu
erpbeta:
   - beta-rac-1.erp.ufl.edu
   - beta-rac-2.erp.ufl.edu
---
erpalpha:
  FS: /export/alpha
  nodes:
erpalpha: ''
erpbeta: RO

erpbeta:
  FS: /export/beta
  nodes:
erpalpha: RO
erpbeta: 


#+end_src


#+srcname: mogrify_pl
#+begin_src perl :results output :var config=config_yml()
  use YAML();
  use Data::Dumper;

  # $stream = join("",<$foo>);

print "===$config===\n";

print $#config,"\n";
  
foreach $line (@{$config})
{ print "[$line]\n"; }

print Dumper($config);


# ($nodegroups,$filespaces) = YAML::Load($config);
#  print YAML::Dump($nodegroups,$filespaces);
  
#+end_src

#+results: mogrify_pl
#+begin_example
===ARRAY(0x853b818)===
-1
[alpha-rac-1.erp.ufl.edu]
[alpha-rac-2.erp.ufl.edu
erpbeta:]
[beta-rac-1.erp.ufl.edu]
[beta-rac-2.erp.ufl.edu
---
erpalpha:
  FS: /export/alpha
  nodes:
erpalpha: ''
erpbeta: RO

erpbeta:
  FS: /export/beta
  nodes:
erpalpha: RO
erpbeta:]
$VAR1 = [
  'alpha-rac-1.erp.ufl.edu',
  'alpha-rac-2.erp.ufl.edu
erpbeta:',
  'beta-rac-1.erp.ufl.edu',
  'beta-rac-2.erp.ufl.edu
---
erpalpha:
  FS: /export/alpha
  nodes:
erpalpha: \'\'
erpbeta: RO

erpbeta:
  FS: /export/beta
  nodes:
erpalpha: RO
erpbeta:'
];
#+end_example


- Allen S. Rout




[Orgmode] Re: Generic LaTeX class support (scrlttr2/isodoc)

2011-02-10 Thread Allen S. Rout
a...@ufl.edu (Allen S. Rout) writes:

> I'm trying to use your lisp to generate isodoc letters.  I'm wondering
> what tex processing commands you are using?

I'm closing in on the discrepancy. The exported TeX which Jambunathan
sent was 'similar' to what I'm getting, but there were a few important
differences.

Most importantly, I'm getting an additional newline between key and
value:

---
opening =

My dear john
,
---
instead of 
---
opening =
My dear john
,
---

This appears to fotch up the LaTex, and put those strings in a spot out
of the document entirely.


If I remove line 1137

(insert "\n")

from org-latex.el, this change in spacing goes away, but of course I
have no idea why it was put there.  Oddly, git-blame suggests that line
went in  in 2009, well before Jambunathan posted his isodoc files.

Does anyone who's been tinkering with the latex export code want to
expound on why that newline's in there?  Is it silly to just suggest
"Can we take it out?" 


- Allen S. Rout


___
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: Introducing gnugol - an org-mode-output web search client

2011-01-06 Thread Allen S. Rout
Dave Taht  writes:

> So over the holiday I wrote a command line web search client with an
> emacs interface and called it "gnugol". It uses the google json and bing
> json APIs to search the web, and outputs the results in plain text, in
> whatever format you're working in, notably, org, so you can navigate the
> results in the mind-set you're in.

[...]

On unrelated surfing (reddit), I ran into this:

http://surfraw.alioth.debian.org/

Do you think it's possible that your two powers combined, would make you
INVINCIBLE?


I don't know how much they dink with the return stream; it may be "not
at all", which would be inauspicious for a combination.  But if they're
doing any sort of output capture/filter, then adding an org-mode flavor
to the list might be really straightforward.



- Allen S. Rout



___
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: Clean capture from command line?

2010-11-18 Thread Allen S. Rout

Friedrich Delgado  writes:

> I use zsh and I already use this:
>
> ,[ ~/bin/uriescapepwd.pl ]
>   #!/usr/bin/perl -w
>   use URI::Escape qw/ uri_escape uri_escape_utf8 /;
>   use Cwd qw/getcwd abs_path/;
>   $pwd = abs_path(getcwd);
>   print uri_escape_utf8($pwd);
> `

Woot, one step. 

Then I also did a quick filter.

---
use URI::Escape qw/ uri_escape uri_escape_utf8 /;
use Cwd qw/getcwd abs_path/;

print uri_escape_utf8(<>);
---

At that point, I could do: 

---

emacsclient  -c 
org-protocol://capture:/I/file:`~/bin/uriescapepwd`/`~/bin/uriescapepwd`/`/usr/bin/zenity
 --entry --text="New TODO" |~/bin/uriescape`



The 'I' selects template, in which I'm using :immediate-finish.  That's
one.

For the 'Close the client frame' purpose, I applied the attached patch,
and then I could, in my own myorg.el file:

-

( defun asr-org-capture-finalize ()
  "If we set the correct property in the capture template, then delete frame."
  ( if (org-capture-get :asr-delete-frame-on-finalize)
 (delete-frame)
  )
)


(add-hook 'org-capture-after-finalize-hook 'asr-org-capture-finalize )

-


which lets me define a capture template with property

:asr-delete-frame-on-finalize 1

and then use that template.

Thanks, Eric and Friedrich... 


- Allen S. Rout


>From 2086fe4be30d5383b9db4d5db91da6b03357c128 Mon Sep 17 00:00:00 2001
From: Allen S. Rout 
Date: Wed, 17 Nov 2010 12:52:02 -0500
Subject: [PATCH 3/3] Add post-finalize hook

---
 lisp/org-capture.el |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 2abe5c7..5d2f8d3 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -313,6 +313,12 @@ The remember buffer is still current when this hook runs."
   :group 'org-capture
   :type 'hook)
 
+(defcustom org-capture-after-finalize-hook nil
+  "Hook that is run right after a capture process is finalized.
+  Suitable for window cleanup"
+  :group 'org-capture
+  :type 'hook)
+
 ;;; The property list for keeping information about the capture process
 
 (defvar org-capture-plist nil
@@ -548,6 +554,8 @@ bypassed."
 
   ;; Restore the window configuration before capture
   (set-window-configuration return-wconf))
+
+(run-hooks 'org-capture-after-finalize-hook)
 (when abort-note
   (cond
((equal abort-note 'clean)
-- 
1.7.0.4

___
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] Clean capture from command line?

2010-11-16 Thread Allen S. Rout


I'm one of the legion gradually slipping more and more of my day-to-day
process into org-mode.  (Thanks, Carsten!)

One of the things I'd like to be able to do is capture a new TODO from a
command line.  e.g.

shell$ capture "Fred wants a new database VM, 60G"

and maybe eventually something obnoxious with e.g. zenity, so that a key
chord popped up a text dialog which would just seamlessly get fed to
org-capture.  Basically, I want to make the notation and just keep
sailing. Of course, I've got the relevant org files open in an emacs on
another desktop: miles and miles away. :) The obvious solution

shell$ emacsclient -c -e "(org-capture)"

(and maybe a '-t', to keep it in the tty) 

has a problem: when I finish the capture, I'm left with the session, and
worse, when I try to close the emacsclient, (C-x #) it tells me "No
server buffers remain to edit", and I have to M-x delete-frame.
Harshing my buzz, definitely.


A gmane search on 'capture command line' in this group didn't seem to
help much.  Am I thinking about the problem the wrong way?  How do
you-all do that sort of ad-hoc capture?



- Allen S. Rout


___
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