Re: [O] Should C-c C-c always jump between a footnote and its definition? C-c C-x f, too?

2014-06-21 Thread Nicolas Richard
Grant Rettke g...@wisdomandwonder.com writes:

 On Fri, Jun 20, 2014 at 5:13 PM, Nicolas Goaziou m...@nicolasgoaziou.fr 
 wrote:
 I cannot reproduce it, neither on maint nor on master. Each time, cursor
 ends up on line 3898.

 Understood. Thank you much for trying.

 I will convert the document to in-line footnotes.

You tried with org 8.2.7, whereas Nicolas tried with latest maint. A
navigation bug was fixed meanwhile, so it'd be worth trying the latest
maint version before changing your data. (the bugfix isn't in 8.2.7a
unfortunately afaict).

-- 
Nico.



Re: [O] BEGIN_LATEX_HEADER [cont]

2014-06-21 Thread Nicolas Goaziou
Hello,

Aaron Ecay aarone...@gmail.com writes:

 The first is that editing non-trivial latex code embedded in an elisp
 string quickly becomes tedious, whereas it’s much pleasanter in org
 using org-edit-special, syntax highlighting of src blocks, etc.

This is a no-op since you only do it a limited number of times, i.e.
once for each document type.

 The second is that it’s impossible to share without distributing elisp
 code.  From the twin standpoints of reproducible research and security,
 I think org ought to maximize the degree to which export use cases are
 sharable without resorting to executing elisp code.

This is also a no-op. You cannot be serious about reproducible research
if you don't share `org-export-async-init-file' anyway.

Eventually, if you insist on writing your full preamble within the
document, you can start to write it in a LaTeX-mode buffer, copy it in
your Org document and add #+LATEX_HEADER:  in front of each line.
This last step is done easily with `string-rectangle' (C-x r t).


Regards,

-- 
Nicolas Goaziou



Re: [O] Bulk select and tag

2014-06-21 Thread Bastien
Hi Chris,

Chris Henderson henders...@gmail.com writes:

 Wondering how can I select multiple ** items and apply tag on them.

(setq org-loop-over-headlines-in-active-region t)

Then create an active region with multiple headlines and hit C-c C-q.

HTH,

-- 
 Bastien



Re: [O] Get links from Firefox/Safari into orgmode

2014-06-21 Thread Daniel Franke
hi Rizvi,

thanks for your reply! As far as i can see you run that from

emacs = firefox/safari

but i want it like

browser = emacs

Thank you so much! :)

Regards,
Daniel

On 20 Jun 2014, at 20:05, Haider Rizvi hari...@gmail.com wrote:

 Daniel Franke dan...@dfranke.com writes:
 
 as the subject says, I would like to get links from any browser (i almost 
 don’t care which
 one) into org mode. 
 
 Since you mention Safari, assume you are running on a Mac. Here is what you 
 are looking for. 
 
 ;;; setup org-mac-link-grabber
 (require 'org-mac-link)
 (add-hook 'org-mode-hook (lambda () 
  (define-key org-mode-map (kbd C-c g) 'org-mac-grab-link)
  ))
 
 
 Regards, 
 -- 
 Haider
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


[O] How to never have the Footnote heading generated?

2014-06-21 Thread Grant Rettke
Good afternoon,

I want only to use in-line footnotes and never to have them
automatically entered into an auto created
Footnote heading. Rather I want that auto-generated, just like it is
now. My goal is to allow refactoring
literature with footnotes without having to update anything else in
that document (barring references).

Is there a setting to get that behavior. I read the docs and am not seeing it.

Kind regards,

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] [PATCH] -for review- Tangling with variable transfer of variables

2014-06-21 Thread Charles C. Berry

On Fri, 20 Jun 2014, Rainer M Krug wrote:


Attached please find =the reworked patch.

1) uses local() and closes connection
2) does not leave a variable cal;led file behind



Seems to work on a few test cases.

I'd move the strings to defconsts.

Putting a newline before each `%S' will outdent the first line of 
:var value when it is echoed in the session log so it will be easier to 
view.


===

With Eric's input on this:

Would you also change this at the end of org-babel-R-assign-elisp:

res}) name file header row-names max
-(format %s - %s name (org-babel-R-quote-tsv-field value
+(format %s - %S name
+   (if (stringp value) value (prin1-to-string value)

??

I think this is innocuous for plain strings with no internal quotes, but 
allows almost anything to be passed to R as a string.


So
:var x=[1 2 3 4 5]

will be passed to R as x - [1 2 3 \4\ 5]

instead of x - [1 2 3 4 5] which throws an error.

And this just works:

#+NAME: latex-capt
#+BEGIN_SRC latex
  \begin{math}
y = X\beta,
\mbox{where } \beta = %beta%
  \end{math}
#+END_SRC

#+BEGIN_SRC R :var ytxt=latex-capt :results raw :wrap latex
beta - 1.234
sub(%beta%,beta,ytxt)
#+END_SRC


HTH,

Chuck



Re: [O] Get links from Firefox/Safari into orgmode

2014-06-21 Thread Haider Rizvi
Daniel Franke dan...@dfranke.com writes:

 emacs = firefox/safari
That's correct.

 browser = emacs

Probably the best is to use an Applescript like below, and save it in
~/Library/Scripts/Applications/Safari. You can kick off this
Applescript using a variety of methods (Quicksilver, menu bar, etc.)

http://www.tuaw.com/2006/08/08/tuaw-tip-enable-the-applescript-menu/


tell application Safari
set theUrl to URL of document 1
set theName to the name of the document 1
set theOrglink to [[  theUrl  ][  theName  ]]
set the clipboard to theOrglink
end tell

activate application Emacs

-- this last bit is iffy, since Emacs will not always have an org file
--  open in the frame that pops up. 
tell application System Events
keystroke y using control down
end tell

Hope this helps.

Regards, 
-- 
Haider




Re: [O] Thoughts on weaving variable documentation

2014-06-21 Thread Grant Rettke
Understood. Thanks for sharing and elaborating.

The use case on my mind was for people scouring the Internet for
interesting things
inside of other people's configuration files.

That is what I did for a while, but now I just load stuff and use
Emacs to read the documentation.

Grant Rettke | ACM, ASA, FSF, IEEE, SIAM
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Sat, Jun 21, 2014 at 12:58 AM, Aaron Ecay aarone...@gmail.com wrote:
 Hi Grant,

 2014ko ekainak 20an, Grant Rettke-ek idatzi zuen:

 Good morning,

 A lot of people are weaving their Emacs init files for the obvious
 reason: it is difficult to remember why
 we configured stuff and other people definitely won't know why we did
 it. There is a common operation
 that occurs though when other people read our Emacs init:

 1. They open it up in Emacs
 2. Find what looks interesting
 3. Do a C-h f or C-h v on it and learn about it

 Makes total sense.

 What I got curious about is for this specific use case, people
 scanning other people's configs, how I
 could make it easier. A thought is to weave the docstrings for
 variables right into the weaved file any
 time a variable is set. I am thinking something like this:

 1. When the weave occurs
 2. Look at each line of code that starts with a setq
 3. Look up the docstring for the variable
 4. TBD: Weave that documentation into the output.

 That is the idea, at least.

 My question is:
 1. What are the standard mechanisms to do something like this within
 the ob lifecycle?
 2. What do you think in general?

 I don’t really see the use case.  One of the best parts of developing
 elisp in emacs is the level of interactive documentation:
 describe-function, find-function, interactive info manuals, etc.  It’s
 there when you need it, but not in the way when you don’t.  I almost
 never read elisp code in a non-emacs environment (except for short
 snippets in blog posts, I suppose).

 FWIW, my wishlist for literate programming in org/elisp is something
 like (in approximately increasing order of estimated difficulty):

 - allow find-function/variable to jump to the location in an org file
   where something is defined, rather than the tangled elisp file.

 - allow org-mode text “near” a function definition to be used as the
   function’s docstring (for describe-function et al.):

 ,
 | docstring docstring docstring
 | #+begin_src elisp
 |   (defun foo ()
 | ...)
 | #+end_src
 `

 rather than:

 ,
 | #+begin_src elisp
 |   (defun foo ()
 | docstring docstring docstring
 | ...)
 | #+end_src
 `

 - allow more features of underlying source code editing modes to be used
   in org buffers directly (no org-edit-special context switch needed).
   For me, this would include:
   - eval-defun (C-M-x)
   - paredit
   - eldoc
   - auto-complete (company etc.)
   For your use case, a mode which shows the docstring for a fn/var in a
   tooltip on mouseover/keystroke could be added (I couldn’t find
   anything like this already existing for emacs-lisp-mode, which is
   kind of surprising to me – but I did not look very hard)

 - make it easier to develop parts of org using these LP features.

 Cheers,

 --
 Aaron Ecay



Re: [O] Get links from Firefox/Safari into orgmode

2014-06-21 Thread Daniel Franke
On 21 Jun 2014, at 22:34, Haider Rizvi hari...@gmail.com wrote:

 Daniel Franke dan...@dfranke.com writes:
 
 emacs = firefox/safari
 That's correct.
 
 browser = emacs
 
 Probably the best is to use an Applescript like below, and save it in
 ~/Library/Scripts/Applications/Safari. You can kick off this
 Applescript using a variety of methods (Quicksilver, menu bar, etc.)
 
 http://www.tuaw.com/2006/08/08/tuaw-tip-enable-the-applescript-menu/
 
 
 tell application Safari
   set theUrl to URL of document 1
   set theName to the name of the document 1
   set theOrglink to [[  theUrl  ][  theName  ]]
   set the clipboard to theOrglink
 end tell
 
 activate application Emacs
 
 -- this last bit is iffy, since Emacs will not always have an org file
 --  open in the frame that pops up. 
 tell application System Events
   keystroke y using control down
 end tell
 
 Hope this helps.
 
 Regards, 
 -- 
 Haider
 
 

Good evening Haider.

thank you so much for your input, this helps a lot!! :) Now i have a working 
solution.

I used the script you suggest with a small change :

tell application Safari
set theUrl to URL of document 1
set theName to the name of the document 1
set theOrglink to [[  theUrl  ][  theName  ]]
set the clipboard to theOrglink
end tell


activate application Emacs
tell application System Events
keystroke v using {command down}
keystroke return
end tell
activate application Safari

and then I opened it with the application Fastscripts 
(http://www.red-sweater.com/fastscripts/). No i have the option to add the 
bookmark by keystroke  to the 
actual open Emacs window.

Regards,
Daniel!




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] BEGIN_LATEX_HEADER [cont]

2014-06-21 Thread Aaron Ecay
Hi Nicolas,

2014ko ekainak 21an, Nicolas Goaziou-ek idatzi zuen:
 
 Hello,
 
 Aaron Ecay aarone...@gmail.com writes:
 
 The first is that editing non-trivial latex code embedded in an elisp
 string quickly becomes tedious, whereas it’s much pleasanter in org
 using org-edit-special, syntax highlighting of src blocks, etc.
 
 This is a no-op since you only do it a limited number of times, i.e.
 once for each document type.

If you do it once, then it’s not a no-op, by definition.  I think you
mean that you disagree in the amount which you weight this as a concern,
which is a reasonable opinion to have.  But phrasing it in the way you
did is inaccurate and rather curt.

FWIW, in my experience latex (or any) code rarely flows from mind to
keyboard perfectly in the first attempt; there is some period of
revision, during which convenient editing matters.

 
 The second is that it’s impossible to share without distributing elisp
 code.  From the twin standpoints of reproducible research and security,
 I think org ought to maximize the degree to which export use cases are
 sharable without resorting to executing elisp code.
 
 This is also a no-op. You cannot be serious about reproducible research
 if you don't share `org-export-async-init-file' anyway.

This is also not true (or it’s some kind of value judgment).  Org’s
default settings + #+bind + local variables can do quite a bit.

 
 Eventually, if you insist on writing your full preamble within the
 document, you can start to write it in a LaTeX-mode buffer, copy it in
 your Org document and add #+LATEX_HEADER:  in front of each line.
 This last step is done easily with `string-rectangle' (C-x r t).

This is basically making the user do (something like) org-edit-special
manually.  It can probably be automated somewhat – I’ll work on a patch.

Thanks,

-- 
Aaron Ecay



Re: [O] [RFC] [PATCH] org-mtags: remove

2014-06-21 Thread Aaron Ecay
2014ko ekainak 14an, Aaron Ecay-ek idatzi zuen:
 
 * contrib/lisp/org-mtags.el: Delete file.
 * lisp/org.el (org-structure-template-alist): Remove foo-style tags.
 (org-complete-expand-structure-template): Don't handle foo-style tags.
 ---
  contrib/lisp/org-mtags.el | 255 
 --
  lisp/org.el   |  43 
  2 files changed, 20 insertions(+), 278 deletions(-)
  delete mode 100644 contrib/lisp/org-mtags.el
 
 The recent discussion of org-structure-template-alist[1] made me take
 a look at that variable, and I realized it includes infrastructure for
 an outdated method of using foo-style tags instead of canonical org
 syntax.  The implementation in contrib was never updated to the new
 exporter, and the approach seems out of line with the goals of that
 project.  So this patch removes this extension from core and contrib.
 
 Does anyone have an opinion on whether this is a good idea?
 
 Thanks,
 Aaron
 
 [1] http://mid.gmane.org/87egz0sbfc@gmail.com

I pushed this patch to master, since there was no feedback.  It can be
reverted if it causes any problems, of course (and if you notice it
does, please feel free to revert it yourself).

-- 
Aaron Ecay



[O] [ANN] ox-extras (was: BEGIN_LATEX_HEADER [cont])

2014-06-21 Thread Aaron Ecay
2014ko ekainak 21an, Aaron Ecay-ek idatzi zuen:

[...]

 Eventually, if you insist on writing your full preamble within the
 document, you can start to write it in a LaTeX-mode buffer, copy it in
 your Org document and add #+LATEX_HEADER:  in front of each line.
 This last step is done easily with `string-rectangle' (C-x r t).
 
 This is basically making the user do (something like) org-edit-special
 manually.  It can probably be automated somewhat – I’ll work on a
 patch.

This is now implemented in a new library in contrib, ox-extras.  This is
intended as a semi-official, semi-curated repository for helpful pieces of
org export hooks and customizations.  Differently than worg, the aim is to
make it easy for users to load the snippets through the ox-extras-activate
function.  Even so, I hope this will be an “executable wiki” where anyone
(who has commit access to the org repo) is free to contribute new hook
functions and improve existing ones.

In the present case, if you execute

(ox-extras-activate '(latex-header-blocks))

you will be able to use blocks of the following form:

#+header: :header yes
#+begin_latex
  \foo{}
  \bar{}
#+end_latex

These will be transformed so that the begin/end wrapper is removed and
each line is prepended with #+latex_header: on export.  They can be
edited as latex code with the usual org-edit-special function (C-c ').

The #+header: :header yes line is a bit confusing.  The first #+header:
is part of org syntax that allows us to tag blocks (and other elements)
with plists.  The :header yes in the plist indicates that this block
should be treated as a latex_header, and not a normal type of latex
block.

Thanks,

-- 
Aaron Ecay



Re: [O] proposal to have ignoreheading tags/properties

2014-06-21 Thread Aaron Ecay
Hi Eric,

Thanks for your work on this code.  Partially inspired by this discussion,
I’ve just created contrib/lisp/ox-extras.el, which I hope will become a
home for useful export hook functions like this one.  Would you like to
add your code there (or would you mind if I did so)?

Thanks,

-- 
Aaron Ecay



Re: [O] BEGIN_LATEX_HEADER [cont]

2014-06-21 Thread Ken Mankoff

On 2014-06-21 at 20:42, Aaron Ecay wrote:
 2014ko ekainak 21an, Nicolas Goaziou-ek idatzi zuen:
 
 Aaron Ecay aarone...@gmail.com writes:
 
 The first is that editing non-trivial latex code embedded in an
 elisp string quickly becomes tedious, whereas it’s much pleasanter
 in org using org-edit-special, syntax highlighting of src blocks,
 etc.
 
 This is a no-op since you only do it a limited number of times, i.e.
 once for each document type.

 If you do it once, then it’s not a no-op, by definition.  I think you
 mean that you disagree in the amount which you weight this as a
 concern, which is a reasonable opinion to have.  But phrasing it in
 the way you did is inaccurate and rather curt.

 FWIW, in my experience latex (or any) code rarely flows from mind to
 keyboard perfectly in the first attempt; there is some period of
 revision, during which convenient editing matters.

It is not a 1x operation, it is a per-document operation. For example,
in my use-case that started this whole discussion, each publication
requires tweaking a dozen or more lines of biblatex config.

  -k.



Re: [O] How to never have the Footnote heading generated?

2014-06-21 Thread Matt Lundin
Grant Rettke g...@wisdomandwonder.com writes:

 I want only to use in-line footnotes and never to have them
 automatically entered into an auto created Footnote heading.

An easy way to create inline footnotes is to use the following setting:

(setq org-footnote-auto-label nil)

Then, when you call org-footnote-action, simply press return for an
anonymous (i.e., inline) footnote.

 - The footnote looks like this.[fn:: Like this one]

Best,
Matt



[O] Invalid function

2014-06-21 Thread Thomas S. Dye
Aloha all,

Today I updated Org mode from its git repo using the makefile I've had
for a long time.  It usually works flawlessly, but today it didn't:

In toplevel form:
ox.el:77:1:Error: Invalid function: Org
Done (Total of 65 files compiled, 43 failed, 3 skipped)

What's going on?

Worg suggests that the invalid function problem might be solved by
running make clean and then make again, but doing this didn't help me.

All the best,
Tom

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



Re: [O] Invalid function

2014-06-21 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

Hi,

 ox.el:77:1:Error: Invalid function: Org

Is that line 77 in /lisp/ox.el? Maybe have a look ...

-- 
cheers,
Thorsten




Re: [O] Invalid function

2014-06-21 Thread Thomas S. Dye
Thorsten Jolitz tjol...@gmail.com writes:

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi,

 ox.el:77:1:Error: Invalid function: Org

 Is that line 77 in /lisp/ox.el? Maybe have a look ...

Nothing that looks like Org there.  And there are still the other 42
failures ...

Tom

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



Re: [O] [PATCH] -for review- Tangling with variable transfer of variables

2014-06-21 Thread Aaron Ecay
Hi Rainer,

2014ko ekainak 21an, Charles C. Berry-ek idatzi zuen:
 
 On Fri, 20 Jun 2014, Rainer M Krug wrote:
 
 Attached please find =the reworked patch.
 
 1) uses local() and closes connection
 2) does not leave a variable cal;led file behind
 
 
 Seems to work on a few test cases.
 
 I'd move the strings to defconsts.
 
 Putting a newline before each `%S' will outdent the first line of 
 :var value when it is echoed in the session log so it will be easier to 
 view.

+1 to both of the above suggestions but otherwise the patch looks good
and I think it should be applied.

-- 
Aaron Ecay



Re: [O] [babel][PATCHES] exporting inline source code

2014-06-21 Thread Aaron Ecay
Hi Nicolas,

These both seem like good patches to me.  Did you run the test suite to
make sure that no tests are broken by them?  It would also be good if
you added some tests for this functionality – the example included at
the bottom of your email is a good starting point.  The other babel
export tests live in the file testing/lisp/test-ob-exp.el, so that’s the
spot to look for examples.

Have you heard back from the FSF about your copyright assignment?

Thanks for the patches,

-- 
Aaron Ecay