[O] doing a capture and jumping to the file

2014-09-26 Thread Alan Schmitt
Hello,

I often find myself doing the following: use a capture template to
nicely setup an entry (often a date tree entry with a link to the
current document), then jump to the newly created headline to start
adding notes. I typically do this during meetings, as I do not want to
stay in the capture buffer all the time.

Is there a way to setup a capture template such that it directly opens
the target file and set-up entry, instead of the capture buffer?

I tried a universal argument before calling org-capture, but it only
jumps to the capture destination and does not set up the entry.

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] meaningfull names for org-src buffers

2014-09-26 Thread Rainer M Krug
Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Hi Charles,

 Charles Berry ccbe...@ucsd.edu writes:
 Andreas Leha andreas.leha at med.uni-goettingen.de writes:

 
 Hi,
 
 Grant Rettke gcr at wisdomandwonder.com writes:
  On Thu, Sep 11, 2014 at 5:05 PM, Adriaan Sticker
  adriaan.sticker at gmail.com wrote:
  I was wondering if it's somehow possible to give named org src buffer the
  name they were give in their #+NAME tag? Now there are just called 
  something like:
  *Org Src test.org[ R ]*
 
  But if you have multiple org-src buffers opened at the same time, its 
  hard to find the correct one back.
 
  Excellent idea. I've got so many small source blocks that it is too
  difficult to make sense of
  keeping multiple source block edit buffers open and limit them to one
  at a time eg
 
  ,
  | (setq org-src-window-setup 'current-window)
  `
 
  How have you come upon your workflow of keeping multiple open and what
  are some of the pros and
  cons that you've found with it?
 
 I'd be interested in this as well.
 
 Regards,
 Andreas
 
 

 Maybe I am answering the wrong question, but org-edit-src-code allows
 you to specify the buffer name:


 You are answering my exact question.


 ,[ C-h f org-edit-src-code RET ]
 | org-edit-src-code is an interactive compiled Lisp function in
 | `org-src.el'.
 | 
 | (org-edit-src-code optional CONTEXT CODE EDIT-BUFFER-NAME)
 | 
 | ...
 `

 So you can do something like this:

 #+BEGIN_SRC emacs-lisp
   (defun org-edit-src-code-plus-name ()
 (interactive)
 (let* ((eop  (org-element-at-point))
(name (or (org-element-property :name (org-element-context eop))
   unnamed))
(lang (org-element-property :language eop))
(buff-name (concat *Org Src  name [  lang  ] *)))
   (org-edit-src-code nil nil buff-name)))
 #+END_SRC

 which leads to a buffer named like *Org Src My-block[ R ] *, where 
 'My-block' is the name of the src block.


 Thanks!  On my first quick tests that works great!  It is in my
 initialization and I'll use that regularly.

 Is there any drawback to this?  Otherwise I'd advocate for
 org-edit-src-code doing that by default.

Haven't tried it out yet, but I second that statement.

Rainer


 HTH,

 It sure does.

 Thanks,
 Andreas




-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpxPBgKlq0Wd.pgp
Description: PGP signature


Re: [O] [patch, ox] Unnumbered headlines

2014-09-26 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Another couple of small changes.

Thank you.

 Using this file:

 * h1
 :PROPERTIES:
 :CUSTOM_ID: h1
 :END:
 ** h2
 :PROPERTIES:
 :unnumbered: t
 :CUSTOM_ID: h2
 :END:
 *** h3
 *** h4
 * h5
 :PROPERTIES:
 :CUSTOM_ID: h5
 :END:
 [[*h1]] [[#h2]] [[*h4]] [[#h5]]
 ** h6

 The output is now

 \section{h1}
 \label{sec-1}
 \subsection*{h2}
 \label{unnumbered-1}
 \subsubsection*{h3}
 \label{unnumbered-2}
 \subsubsection*{h4}
 \label{unnumbered-3}
 \section{h5}
 \label{sec-2}
 \ref{sec-1} \hyperref[unnumbered-1]{h2} \hyperref[unnumbered-3]{h4} 
 \ref{sec-2}
 \subsection{h6}
 \label{sec-2-1}

 Which I think is quite good.

I agree.

 I don't know if the global unnumbered counter is made in the best way.
 I add another plist to info with the number.  This approach is cleaner
 than before since it's the numbering of unnumbered headlines is not in
 `org-export--collect-headline-numbering' which is complicated enough
 as it is.

14 locs long functions do not play in the complicated enough league.
Anyway, your implementation is fine, too.

 Should I write tests for the new behavior?  If so, tests for each
 backend or only for vanilla-ox functions?

Tests for ox.el are mandatory. See test-ox.el

 * ox.el (org-export--collect-headline-numbering): Return nil
 if unnumbered headline.

This is not exactly true: Ignore unnumbered headlines. would be more
appropriate.

 (org-export-get-headline-id): New defun that returns a unique
 ID to a headline.

New function. is enough.

 +   (if number
   (if (atom number) (number-to-string number)
 -   (mapconcat 'number-to-string number .
 +   (mapconcat 'number-to-string number .))
 + ;; unnumbered headline
 + (when (eq 'headline (org-element-type destination))
 +   (format [%s] (org-export-data (org-element-property :title 
 destination) info)

While you're at it: #'number-to-string.

 (ids (delq nil
(list (org-element-property :CUSTOM_ID headline)
 -(concat sec- section-number)
 +(and section-number (concat sec- 
 section-number))
  (org-element-property :ID headline
 -   (preferred-id (car ids))
 +   (preferred-id (org-export-get-headline-id headline info))

I think the following is more in the spirit of the code (you don't
ignore :custom-id property):

  (ids (delq nil
 (list (org-element-property :CUSTOM_ID headline)
   (org-export-get-headline-id headline info)
   (org-element-property :ID headline
  (preferred-id (car ids))

 (extra-ids (mapconcat
 (lambda (id)
   (org-html--anchor
 @@ -2807,21 +2807,7 @@ INFO is a plist holding contextual information.  See
   (org-element-property :raw-link link) info
 ;; Link points to a headline.
 (headline
 -(let ((href
 -   ;; What href to use?
 -   (cond
 -;; Case 1: Headline is linked via it's CUSTOM_ID
 -;; property.  Use CUSTOM_ID.
 -((string= type custom-id)
 - (org-element-property :CUSTOM_ID destination))
 -;; Case 2: Headline is linked via it's ID property
 -;; or through other means.  Use the default href.
 -((member type '(id fuzzy))
 - (format sec-%s
 - (mapconcat 'number-to-string
 -(org-export-get-headline-number
 - destination info) -)))
 -(t (error Shouldn't reach here
 +(let ((href (org-export-get-headline-id destination info))

This chuck needs to be updated since headline-id doesn't
replace :custom-id or :id properties.

  (headline-label
 - (let ((custom-label
 -(and (plist-get info :latex-custom-id-labels)
 - (org-element-property :CUSTOM_ID headline
 -   (if custom-label (format \\label{%s}\n custom-label)
 - (format \\label{sec-%s}\n
 - (mapconcat
 -  #'number-to-string
 -  (org-export-get-headline-number headline info)
 -  -)
 + (format \\label{%s}\n (org-export-get-headline-id headline info)))

Ditto.

 -   (org-html--anchor
 -(or (org-element-property :CUSTOM_ID headline)
 -(concat sec-
 -(mapconcat 'number-to-string
 -   (org-export-get-headline-number
 -headline info) -)))
 +   (org-html--anchor 

Re: [O] ob-R, about :results value verbatim drawer

2014-09-26 Thread Rainer M Krug
Grant Rettke g...@wisdomandwonder.com writes:

 On Wed, Sep 24, 2014 at 2:52 AM, Rainer M Krug rai...@krugs.de wrote:
 would there be interest in pursuing this?

 Yes.

 I'm interested in working with other serious babel users to pool our
 efforts, provide a meaningful contribution, and do it in a way that
 works best for the maintainers.

OK - I will then repost the previous email under a different header and
ask for interested babel users who would like to participate and suggest
a way forward to make this happen.

Thanks for your thumbs up,

Rainer




-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpQdLjyEpOv9.pgp
Description: PGP signature


[O] Header Arguments of Code Blocks - problems and challenges

2014-09-26 Thread Rainer M Krug

Hi

Based on several previous posts, it seems that the use of header
arguments, particularly

- different ways of setting these (from the manual)
,
|  - System-wide header arguments::  Set global default values
|  - Language-specific header arguments::  Set default values by language
|  - Header arguments in Org mode properties::  Set default values for a buffer 
or heading
|  - Language-specific header arguments in Org mode properties::  Set 
language-specific default values for a buffer or heading
|  - Code block specific header arguments::  The most common way to set values
|  - Header arguments in function calls::  The most specific level
`
- Inheritance of these
- how they interact

I now these as a problem of R, but I guess it is general for all
languages suported in org?

To make the usage of these header arguments easier, a proper outline
and description is needed how header arguments for source blocks can
be set and how these interact (inheritance, header-args versus
header-args+ at one and on different levels, different ways of setting
header arguments as above, ...). These header arguments are a *very*
powerful tool and you can do many things - but you can also break
things very easily.

In many cases, I resort to trial and error: 
- this is working, 
- now I want to have that behaviour for this code block, 
- normally I would do it likethis, 
- not working,
- let's try out what is working,
- repeat from the beginning for the next change

But this is far from ideal and leads to spaghetti-code type property
setting which is quite fragile.

I don't think is it only me who has these problems.

So what could be done to remedy this?  I think a few aspects should be
tackeled (in no particular order):

1) a lot of information is in the manual - but spread out in many
   different locations / sections. The first would be to bring these
   sections together and to consolidate them into one section. I don't
   think this should go only into worg.
2) A set of simple and easily to understand examples which build on
   each other are needed. So starting with simple examples and expand
   these to complex examples.
3) These examples should be uaed as tests (maybe there are tests for
   this, but I am not at all familiar with the test framework of org).
4) based on these, the org code should be checked for
   - bugs (obviously)
   - inconsistencies in the approach used for header argument setting
 and inheritance and
   - possibly sugfgest to deprecate certain aspects to simplify it
 (but keep the flexibility which is there at the moment!
5) the property inheritance and hierarchy of different ways of setting
   these should be documented in a structured way. 

To make this happen, I would suggest to get a discussion going to

1) get a few interested users who are willing to activly participate
   in this (There is alread one: Thanks Grant!)
2) discuss how this can be tackled
3) and then, from there, get it going.

Before I end, I must thank the org developers for their hard work they
have put into org - and I am sure that the header arguments framework
has received quite a bit of attention. But (and please correct me if I
am wrong), there is a relatively small overlap between main org
developers and regular org babel users.

And this is where the babel user can contributing to org, even if
their elisp knowledge is not the best.

OK - I hope we can geth this going and make a usefull contribution to
org babel,

Rainer

-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpZHOQQmv0Zd.pgp
Description: PGP signature


pgp7oOEEzMn7I.pgp
Description: PGP signature


Re: [O] [RFC] [PATCH] [babel] read description lists as lists of lists

2014-09-26 Thread Nicolas Goaziou
Hello,

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

 Isn’t the org-element format also easy to work on?  It requires a bit
 more than just car and cdr, but it’s well documented and used in many
 places across the code base (= cognitive burden to use is lower).  It’s
 also easy to produce in the sense that org-element.el already exists for
 independent reasons; we just have to use it.

It is not as easy to produce ex nihilo, i.e., without any Org syntax
under point. But, really, I do not mind if both radio lists and Babel
move to this internal syntax. It will require much more work, though.

Also, it doesn't mean we can remove or replace `org-list-parse-list' and
`org-list-to-generic'.

 Radio lists is a feature, org-list-to-generic is an implementation.  We
 can change the implementation without changing the user-visible aspects
 of the feature.  IOW, nothing about the user-facing functionality of
 org-list-to-generic requires it to accept a particular type of argument
 (as long as that arg is some representation or other of a list).

I agree.

 One approach would be to detect when it’s called from a non-org-mode
 buffer, and copy the text into a temporary org-mode buffer for parsing.
 Then org-element would be available.

Of course, if the internal representation is changed to Elements', that
is probably the way to go.

 IDK.  You’re probably in a better position to know that than I am.  There’s
 only one message even mentioning them (very tangentially) in my 2-ish years
 of messages from the list: http://mid.gmane.org/87obc6scty@pank.eu.
 I’m not advocating their removal or deprecation, but they certainly seem
 like the tail and not the dog when considering what parts of org ought to
 wag what others.

I think you are missing my point.

Again, I'm fine with any improvement needed for Babel, but other, even
remotely, related parts should be moved along. This is about
consistency. I certainly don't want to see various parts of Org drift
away. Or, to put it differently: mind the tail, do not act as if the dog
had none.

 Why?  Babel’s representation is for babel.

Which I strongly frown upon.

 org-list-parse-list/-to-generic’s is for radio lists (although as I’ve
 said this connection seems accidental rather than essential).  Babel
 calls org-list-parse-list, but I don’t see why it should be forbidden
 from doing more processing on the result before passing it along
 (indeed, it already does some processing to remove the list type
 indicators, remove nested structure, etc.).

It is best to use as much common ground as possible. We should strive to
decrease need for such processing, not the other way.

As I already stated in my first answer, in the long run, it is the only
sane way to proceed. I agree it is less work to simply tweak Babel right
now and ignore the whole Org ecosystem, but it does no good to Org as
a whole.

 I dunno if I’d call my proposal an “internal plain list representation,”
 but rather “babel’s interpretation of plain lists.”

See above.

 Ordered and unordered lists are lists of strings (exactly as now).
 Description lists are lists of 2-element lists, each of the form
 (“TERM” “DESCRIPTION”) (unlike now, when they are lists of strings of
 the form “TERM :: DESCRIPTION”).

 It might be nice to handle nested lists somehow, if a sensible design
 can be created, but it looks like babel just discards them currently.
 So I propose to leave this unchanged, for the present at least:

`org-list-parse-list' handles nested lists just fine. Another advantage
of not re-inventing the wheel in every part of Org.


Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] doing a capture and jumping to the file

2014-09-26 Thread Daimrod
Alan Schmitt alan.schm...@polytechnique.org writes:

 Hello,

Hello Alan,

 I often find myself doing the following: use a capture template to
 nicely setup an entry (often a date tree entry with a link to the
 current document), then jump to the newly created headline to start
 adding notes. I typically do this during meetings, as I do not want to
 stay in the capture buffer all the time.

 Is there a way to setup a capture template such that it directly opens
 the target file and set-up entry, instead of the capture buffer?

 I tried a universal argument before calling org-capture, but it only
 jumps to the capture destination and does not set up the entry.

You can customize your capture templates with `M-x org-capture RET C'.
Look especially at the plist keywords `:immediate-finish` and
`:jump-to-captured`.

Best,

-- 
Daimrod/Greg


signature.asc
Description: PGP signature


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-09-26 Thread Nicolas Goaziou
Hello,

Omid omidl...@gmail.com writes:

 Apologies for waking up this old thread. But is this feature, for
 which Achim proposed a patch early on, going to be included in the Org
 mode? As of Org-mode version 8.2.7c (8.2.7c-71-g60418c-elpa)

 #+INCLUDE: myfile.html html

 still does not do a literal include.

IIRC, this feature is applied on master (i.e., future Org 8.3) not in
maint, which you are currenty using.


Regards,

-- 
Nicolas Goaziou



Re: [O] [ANN] Merge export-block type within special-block

2014-09-26 Thread Nicolas Goaziou
Hello,

KDr2 killy.d...@gmail.com writes:

 I found this was fixed on both maint and master branch :)
 Thanks for all your works, but would you tell us how did you do it? or give
 the commit id? (Sorry I did not find it by myself...)

This is not really fixed. I just reverted the code base to its initial
state, which is bugged in a different, and less visible, way. The
problem needs further discussion to move on.


Regards,

-- 
Nicolas Goaziou



Re: [O] Formal description of Org files

2014-09-26 Thread Eric S Fraga
On Sunday, 21 Sep 2014 at 14:10, Gustav Wikström wrote:

[...]

 (For me, the biggest limitation of Org mode is lacking tools to
 utilize it on the run. The aim of this is thus to feed thoughts on how
 to simplify processes that can expand Org mode into those more
 mobile domains).

Just curious: what is it you wish to do in a mobile environment.  I have
everything I need with MobileOrg and running full emacs + org on an
OpenPandora.  Obviously, your needs may be different than mine.

(email composed on train offline on my OpenPandora in Emacs with gnus ;-)

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf


signature.asc
Description: PGP signature


[O] passing LC_ALL environment variable to org export call

2014-09-26 Thread Johannes Rainer
dear all,

I stumbled across a strange problem. I’m using org-mode to perform analyses in 
R and I have one block of R-code in which I use mclapply to perform parallel 
calculations. evaluating this code block using C-c C-c works fine, but I get a 
segfault error when I export the org file.

This has to do something with the LC_ALL environment variable as I can 
reproduce the same error above in R in a terminal after “unset LC_ALL”.

Is there a way to pass environment variables to the export call?

thanks!


[O] Header Arguments of Code Blocks - problems and challenges

2014-09-26 Thread Rainer M Krug

Hi

Based on several previous posts, it seems that the use of header
arguments, particularly

- different ways of setting these (from the manual)
,
|  - System-wide header arguments::  Set global default values
|  - Language-specific header arguments::  Set default values by language
|  - Header arguments in Org mode properties::  Set default values for a buffer 
or heading
|  - Language-specific header arguments in Org mode properties::  Set 
language-specific default values for a buffer or heading
|  - Code block specific header arguments::  The most common way to set values
|  - Header arguments in function calls::  The most specific level
`
- Inheritance of these
- how they interact

I now these as a problem of R, but I guess it is general for all
languages suported in org?

To make the usage of these header arguments easier, a proper outline
and description is needed how header arguments for source blocks can
be set and how these interact (inheritance, header-args versus
header-args+ at one and on different levels, different ways of setting
header arguments as above, ...). These header arguments are a *very*
powerful tool and you can do many things - but you can also break
things very easily.

In many cases, I resort to trial and error: 
- this is working, 
- now I want to have that behaviour for this code block, 
- normally I would do it like this, 
- not working,
- let's try out what is working,
- repeat from the beginning for the next change

But this is far from ideal and leads to spaghetti-code type property
setting which is quite fragile.

I don't think is it only me who has these problems.

So what could be done to remedy this?  I think a few aspects should be
tackeled (in no particular order):

1) a lot of information is in the manual - but spread out in many
   different locations / sections. The first would be to bring these
   sections together and to consolidate them into one section. I don't
   think this should go only into worg.
2) A set of simple and easily to understand examples which build on
   each other are needed. So starting with simple examples and expand
   these to complex examples.
3) These examples should be uaed as tests (maybe there are tests for
   this, but I am not at all familiar with the test framework of org).
4) based on these, the org code should be checked for
   - bugs (obviously)
   - inconsistencies in the approach used for header argument setting
 and inheritance and
   - possibly sugfgest to deprecate certain aspects to simplify it
 (but keep the flexibility which is there at the moment!
5) the property inheritance and hierarchy of different ways of setting
   these should be documented in a structured way. 

To make this happen, I would suggest to get a discussion going to

1) get a few interested users who are willing to activly participate
   in this (There is alread one: Thanks Grant!)
2) discuss how this can be tackled
3) and then, from there, get it going.

Before I end, I must thank the org developers for their hard work they
have put into org - and I am sure that the header arguments framework
has received quite a bit of attention. But (and please correct me if I
am wrong), there is a relatively small overlap between main org
developers and regular org babel users.

And this is where the babel user can contributing to org, even if
their elisp knowledge is not the best.

OK - I hope we can geth this going and make a usefull contribution to
org babel,

Rainer

-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgp56CCHrzi8L.pgp
Description: PGP signature


Re: [O] Bug: Export to html inserts strange unicode characters at line breaks because of fci-mode [8.2.7c (8.2.7c-64-g01f736-elpa @ /home/kmodi/.emacs.d/elpa/org-20140915/)]

2014-09-26 Thread Nicolas Goaziou
Hello,

Kaushal kaushal.m...@gmail.com writes:

 I have fci-mode installed and enabled for programming modes.

 When org exports to html, htmlize figures out the syntax highlighting of
 the code by calling  =(funcall lang-mode)=.

 That activates =fci-mode=.

 =fci-mode= shows the fill column using a unicode character. The issue is
 that org export to html exports that character as well.

 Those characters show up in html as below!
 http://i.imgur.com/8WplTqw.png

 So the solution is to fix the =orx-html-fontify-code= function.

I don't think so. `fill-column-indicator' is not even in core Emacs. We
shouldn't provide a workaround for every package out there.

Can't you simply disable this minor mode before exporting buffer, in
a hook such as `org-export-before-parsing-hook'?


Regards,

-- 
Nicolas Goaziou



Re: [O] Boxquote for code in UTF-8 export

2014-09-26 Thread Sebastien Vauban
Hello,

Nicolas Goaziou wrote:
 Sebastien Vauban writes:

 I'd advice to use UTF-8 characters more wildly available in the
 different fonts for drawing the Boxquote around code, in function
 `org-ascii--box-string'.

 The results is that only \u250C and \u2514 are universal (except in
 Lucida Sans Typewriter which implements almost nothing -- unlike
 DejaVu Sans Mono which implements almost everything).

 There are three characters required. You are only suggesting two.

Yes.

 What should be the third?

The third is present in (almost?) all fonts. No problem with it.

 Anyhow, do you want to provide a patch?

Here it is.

Best regards,
  Seb

* ox-ascii.el (org-ascii--box-string): Choose more universal Unicode
characters for boxquote corners.

---
 lisp/ox-ascii.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el
index 6f2b43a..6316e59 100644
--- a/lisp/ox-ascii.el
+++ b/lisp/ox-ascii.el
@@ -542,7 +542,7 @@ Empty lines are not indented.
   Return string S with a partial box to its left.
 INFO is a plist used as a communication channel.
   (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
-(format (if utf8p ╭\n%s\n╰ ,\n%s\n`)
+(format (if utf8p ┌\n%s\n└ ,\n%s\n`)
(replace-regexp-in-string
 ^ (if utf8p │  | )
 ;; Remove last newline character.
-- 
2.1.1




Re: [O] [help] need help with a skip function

2014-09-26 Thread Samuel Loury
Subhan Michael Tindall subh...@familycareinc.org writes:

 Hi, I'm looking for an example org-agenda-skip-function that I can use to 
 include all items for an agenda (IE alltodo) that have a certain property set 
 (value doesn't particularly matter)
 IE:
* TODO H1
  :PROPERTIES:
  :P1: date
  :END:
* TODO H2
  :PROPERTIES:
  :END:
 So that H1 gets included, but H2 does not.
 I know, it's simple to do with a search-type agenda, but unfortunately a bug 
 in sorting for inactive time stamps makes that route unsuitable for my 
 purposes.


 Thanks!
 Subhan
I would do

--8---cut here---start-8---
(defun my/skip-if-not-p1 ()
 (not (org-entry-get (point) P1)))
...

(setq org-agenda-custom-commands
  '(
(p Todo entries with property p1
 (
  (todo nil)
  )
 (
  (org-agenda-skip-function 'my/skip-if-not-p1)
  )
 )
)
)
--8---cut here---end---8---

I have not tested it so beware the typo and reasoning errors but the
idea is there.

I think you could use org-element.el instead of the probably obsolete
`org-entry-get' but I don't know it well enough to propose a solution...

I hope it helps.

Best regards
-- 
Konubinix
GPG Key: 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A


pgpyux0YJXMb7.pgp
Description: PGP signature


Re: [O] Bug: Export to html inserts strange unicode characters at line breaks because of fci-mode [8.2.7c (8.2.7c-64-g01f736-elpa @ /home/kmodi/.emacs.d/elpa/org-20140915/)]

2014-09-26 Thread Kaushal
The problem is that `(funcall prog-mode)' in `org-html-fontify-code'
enables fci-mode. So disabling it in `org-export-before-parsing-hook' won't
work.

But your reply gave me another idea..

I can remove enabling of fci-mode from my prog mode hook in
`org-export-before-parsing-hook'.

But then where can I rehook it? I can't find a hook like
`org-export-after-processing-hook'. Can you suggest a hook that can work
for this use case?

--
Kaushal Modi
On Sep 26, 2014 6:01 AM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:

 Hello,

 Kaushal kaushal.m...@gmail.com writes:

  I have fci-mode installed and enabled for programming modes.
 
  When org exports to html, htmlize figures out the syntax highlighting of
  the code by calling  =(funcall lang-mode)=.
 
  That activates =fci-mode=.
 
  =fci-mode= shows the fill column using a unicode character. The issue is
  that org export to html exports that character as well.
 
  Those characters show up in html as below!
  http://i.imgur.com/8WplTqw.png
 
  So the solution is to fix the =orx-html-fontify-code= function.

 I don't think so. `fill-column-indicator' is not even in core Emacs. We
 shouldn't provide a workaround for every package out there.

 Can't you simply disable this minor mode before exporting buffer, in
 a hook such as `org-export-before-parsing-hook'?


 Regards,

 --
 Nicolas Goaziou



[O] Difference between eval and export

2014-09-26 Thread Johannes Rainer
hi all!

I am wondering what the difference between the eval of a source block and the 
export of a buffer is in terms of the process in which the code is evaluated. 
Is the org-export call starting a new process? 
Is there a way to specify environment variables for the export process?

thanks in advance for any information!

best, jo


Re: [O] doing a capture and jumping to the file

2014-09-26 Thread Alan Schmitt
On 2014-09-26 11:14, Christian Moe m...@christianmoe.com writes:

 Hi,

 Doesn't C-u C-c C-c from the capture buffer do the trick?

It does, thanks a lot!

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] doing a capture and jumping to the file

2014-09-26 Thread Alan Schmitt
On 2014-09-26 11:06, Daimrod daim...@gmail.com writes:

 You can customize your capture templates with `M-x org-capture RET C'.
 Look especially at the plist keywords `:immediate-finish` and
 `:jump-to-captured`.

Thank you for the suggestion. Looking at the info manual I found the
documentation for immediate-finish, but not for
jump-to-captured. I found it in the code and it seems to be exactly
what I want.

Thanks again,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Formal description of Org files

2014-09-26 Thread Grant Rettke
Eric do you use org in Emacs on the Pandora?

Just curious also to know where Emacs on Pandora users hang out?

On Fri, Sep 26, 2014 at 3:12 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:
 On Sunday, 21 Sep 2014 at 14:10, Gustav Wikström wrote:

 [...]

 (For me, the biggest limitation of Org mode is lacking tools to
 utilize it on the run. The aim of this is thus to feed thoughts on how
 to simplify processes that can expand Org mode into those more
 mobile domains).

 Just curious: what is it you wish to do in a mobile environment.  I have
 everything I need with MobileOrg and running full emacs + org on an
 OpenPandora.  Obviously, your needs may be different than mine.

 (email composed on train offline on my OpenPandora in Emacs with gnus ;-)

 --
 : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf



-- 
Grant Rettke
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] Difference between eval and export

2014-09-26 Thread Johannes Rainer
thanks Grant for this information.

I was just wondering, because it seemed to me that some environment variables 
(from the shell) are present in the, while they some (LC_ALL) are not present 
in the export process. 
In my case, the export call fails with an error message, while there is no 
problem if I evaluate source block per source block from the buffer.

At present I am therefore looking for a way to specify environment variables in 
the export process, but I have no idea how to do that...

On 26 Sep 2014, at 15:11, Grant Rettke g...@wisdomandwonder.com wrote:

 On Fri, Sep 26, 2014 at 5:43 AM, Johannes Rainer
 johannes.rai...@gmail.com wrote:
 I am wondering what the difference between the eval of a source block and 
 the export of a buffer is in terms
 of the process in which the code is evaluated.
 
 When you evaluate a source block, it executes in the processed defined
 by your configuration. Then the results of that evaluation are stored
 according to your configuration. For example store the results in an
 example block.
 
 Exporting is the conversion for the org file content into and file
 format. During that process, you can configure whether or not you want
 evaluation of source blocks to occur during that process.




Re: [O] Difference between eval and export

2014-09-26 Thread Grant Rettke
My eye is on you post about that topic because I would also like to know.



On Fri, Sep 26, 2014 at 8:17 AM, Johannes Rainer
johannes.rai...@gmail.com wrote:
 thanks Grant for this information.

 I was just wondering, because it seemed to me that some environment variables 
 (from the shell) are present in the, while they some (LC_ALL) are not present 
 in the export process.
 In my case, the export call fails with an error message, while there is no 
 problem if I evaluate source block per source block from the buffer.

 At present I am therefore looking for a way to specify environment variables 
 in the export process, but I have no idea how to do that...

 On 26 Sep 2014, at 15:11, Grant Rettke g...@wisdomandwonder.com wrote:

 On Fri, Sep 26, 2014 at 5:43 AM, Johannes Rainer
 johannes.rai...@gmail.com wrote:
 I am wondering what the difference between the eval of a source block and 
 the export of a buffer is in terms
 of the process in which the code is evaluated.

 When you evaluate a source block, it executes in the processed defined
 by your configuration. Then the results of that evaluation are stored
 according to your configuration. For example store the results in an
 example block.

 Exporting is the conversion for the org file content into and file
 format. During that process, you can configure whether or not you want
 evaluation of source blocks to occur during that process.




-- 
Grant Rettke
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, ox] Unnumbered headlines

2014-09-26 Thread Rasmus
Hi Nicolas,

Thanks for all time you've put into the comments.  I appreciate it,
and I will try to revise the patches over the weekend.

Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Using this file:

 * h1
 :PROPERTIES:
 :CUSTOM_ID: h1
 :END:
 ** h2
 :PROPERTIES:
 :unnumbered: t
 :CUSTOM_ID: h2
 :END:
 *** h3
 *** h4
 * h5
 :PROPERTIES:
 :CUSTOM_ID: h5
 :END:
 [[*h1]] [[#h2]] [[*h4]] [[#h5]]
 ** h6

 The output is now

 \section{h1}
 \label{sec-1}
 \subsection*{h2}
 \label{unnumbered-1}
 \subsubsection*{h3}
 \label{unnumbered-2}
 \subsubsection*{h4}
 \label{unnumbered-3}
 \section{h5}
 \label{sec-2}
 \ref{sec-1} \hyperref[unnumbered-1]{h2}
 \hyperref[unnumbered-3]{h4} \ref{sec-2}
 \subsection{h6}
 \label{sec-2-1}

 Which I think is quite good.

 I agree.

I worry about this approach based on some observations Alan sent
off-list.  When you export the quoted document with num:nil all labels
will be of the form unnumbered-N, loosing all structure in labels.

Also, some labels are still unassigned in html for unnumbered
headlines, e.g. the text- (which is a function of parents' section
numbers) and outline-container-sec-.

Do you think it's better to solve the remaining issues, and accept
that when num:nil exported documents will be quite altered compared to
previously, or should I try to introduce a more informative ID for
numbered an unnumbered headlines alike?

If following the latter path, the most obvious approach (to me) would
be to have a separate :headline-id
and :headline-numbering.  :headline-id could be collected using
something like `org-export--collect-headline-numbering', but labels
would not necessarily reflect the printed section numbers,
though :headline-numbering would still be correct.

What do you think?

—Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers



Re: [O] passing LC_ALL environment variable to org export call

2014-09-26 Thread Rasmus
Hi Johannes,

Johannes Rainer johannes.rai...@gmail.com writes:

 I stumbled across a strange problem. I’m using org-mode to perform
 analyses in R and I have one block of R-code in which I use mclapply
 to perform parallel calculations. evaluating this code block using C-c
 C-c works fine, but I get a segfault error when I export the org file.

 This has to do something with the LC_ALL environment variable as I can
 reproduce the same error above in R in a terminal after “unset
 LC_ALL”.

 Is there a way to pass environment variables to the export call?

Check the two functions `getenv' and `setenv' and the variable
`org-export-async-init-file'.  You should be able to cook something
up.

It sound like there's an issue with your system-setup.  I'd look into
that before.

Hope it helps,
Rasmus

-- 
Lasciate ogni speranza, voi che leggete questo.




Re: [O] Cooperating with oneself using the cloud?

2014-09-26 Thread Rasmus
Hi,

Tim O'Callaghan t...@linux.com writes:

 I have no instructions per-se. I did consider git, using git-annexe or
 similar tool, but the pre-internet encryption i require does not
 easily happen out of the box. If you are only syncing between your own
 git servers though and do not care so much file level encryption
 git-annexe a remarkable tool. I still cannot get my head around how it
 works (symlinks galore!) but it seems ideal for personal sync (but not
 to github). This is the nearest thing i've seen to dropbox.
 https://git-annex.branchable.com/

At this point I would not recommend git-annex to my worst enemy, even
though I use it.  Annex is not at all transparent (to me), and I
struggle a lot when it doesn't just worksᵀᴹ [which is somehow rarely
the case for me].

That being said, it does do client-side encryption.  It will even
setup a key for you in the webapp.  Only requirement is that you have
git-annex on your central server, but I think an installation by an
unprivileged user is fine.  You have to transfer the key to your other
systems yourself.

Also, you can get rid of the symlinks with direct mode.  I sometimes
go into indirect mode to do $GIT_STUFF manually.

—Rasmus

-- 
May contains speling mistake




[O] Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)

2014-09-26 Thread Ken Mankoff

I'm experiencing a strange Org bug in the latest few versions.

If I have a #+CAPTION line, I can type my figure caption as I would
expect. But as soon as I pass the 70th column, the spacebar triggers an
error. I can type letters after the 70th column, but not a space. When I
press the spacebar on the 70th or higher column, the mini-buffer says:

Buffer ` *temp*-624801' still has clients; kill it? (y or n)

I see no effect if I press y or n, and can continue to type letters, but
any additional spaces repeats the error.

If I change the line from #+CAPTION to anything else (##+CAPTION
#+CAPTIONN etc.) the bug does not exhibit.

  -k.



Re: [O] Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)

2014-09-26 Thread Rasmus
Ken Mankoff mank...@gmail.com writes:

 I'm experiencing a strange Org bug in the latest few versions.

 If I have a #+CAPTION line, I can type my figure caption as I would
 expect. But as soon as I pass the 70th column, the spacebar triggers an
 error. I can type letters after the 70th column, but not a space. When I
 press the spacebar on the 70th or higher column, the mini-buffer says:

 Buffer ` *temp*-624801' still has clients; kill it? (y or n)

 I see no effect if I press y or n, and can continue to type letters, but
 any additional spaces repeats the error.

 If I change the line from #+CAPTION to anything else (##+CAPTION
 #+CAPTIONN etc.) the bug does not exhibit.

I can't reproduce using the latest version of org.  

Does this happen when you start Emacs with emacs -q?  If not, it could
be some third-party package causing the error.

Try also M-x toggle-debug-on-error and make the error reappear.  This
should give insights in where the error occurs.

–Rasmus

-- 
⠠⠵




[O] Fwd: Enforcing newlines in plain text export

2014-09-26 Thread Richard Lawrence
Hi Kaushal,

I am forwarding your message to the Org mode list; you only sent it to
me and Nicolas...

Kaushal kaushal.m...@gmail.com writes:

 I came across
 https://lists.gnu.org/archive/html/emacs-orgmode/2014-09/msg00466.html
 through this emacs SE page:
 http://emacs.stackexchange.com/questions/255/new-line-in-title-of-an-org-mode-exported-html-document

 The question I had asked on stackexchange was: How to export a mid-line
 newline consistently in all formats.

In paragraphs, all you need to do is end a line with \\ to force a
line break.  This works for LaTeX, HTML, and plain text export, at least.

This doesn't work in other kinds of syntax, like headlines, but you may
not need it there.

 But I couldn't figure out how to convey a newline character when exporting
 to plain text (ascii).

 I tried,

 #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@ @@ascii:\n@@

 But that simply puts out \n verbatim in the exported txt file.

I don't know the answer to this specific issue---you might need to
create a custom export filter---but hopefully you can just use \\
instead of a macro like this.

Do you need to enforce line breaks *outside of* a paragraph in plain
text export?  If so, what case are you worried about specifically?

Best,
Richard

OpenPGP Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646

(See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)



Re: [O] Enforcing newlines in plain text export

2014-09-26 Thread Kaushal
The reason I switched to using this {{{NEWLINE}}} macro is that I wanted
consistent results wherever I used it for any kind of export.

Example:

-
#+TITLE: First Line of Title // Second Line of Title
-

Above works for only latex  pdf exports.
HTML export of above keeps the `//` characters verbatim.

So I did the below:

-
#+MACRO: NEWLINE @@latex:\\@@ @@html:br@@
#+TITLE: First Line of Title {{{NEWLINE}}} Second Line of Title
-

The above solution looks clean to me, but now that doesn't work for ascii
exports as I don't know what to put in between @@ascii:@@ to get a
newline in ascii exports.


Interesting thing is that `//` work fine at the end of the lines.
If I have the below:

-
Some text in org file on first line //
Some text in org file on second line //
Some text in org file on third line
-

.. then the pdf, html, ascii exports interpret `//` as a newline character.

For consistency, now I use:

-
Some text in org file on first line {{{NEWLINE}}}
Some text in org file on second line {{{NEWLINE}}}
Some text in org file on third line
-

I am just waiting to know the magic characters for ascii exports that can
give me newlines by using the above macro. Then I don't have to worry
whether I am using `//` at the end of the line or in the middle of a line.

The end result would be:

-
#+MACRO: NEWLINE @@latex:\\@@ @@html:br@@
@@ascii:NEWLINE_CHARACTERS_FOR_ASCII_EXPORT@@
#+TITLE: First Line of Title {{{NEWLINE}}} Second Line of Title
Some text in org file on first line {{{NEWLINE}}}
Some text in org file on second line {{{NEWLINE}}}
Some text in org file on third line
-







--
Kaushal Modi

On Fri, Sep 26, 2014 at 11:52 AM, Richard Lawrence 
richard.lawre...@berkeley.edu wrote:

 Hi Kaushal,

 I am forwarding your message to the Org mode list; you only sent it to
 me and Nicolas...

 Kaushal kaushal.m...@gmail.com writes:

  I came across
  https://lists.gnu.org/archive/html/emacs-orgmode/2014-09/msg00466.html
  through this emacs SE page:
 
 http://emacs.stackexchange.com/questions/255/new-line-in-title-of-an-org-mode-exported-html-document
 
  The question I had asked on stackexchange was: How to export a mid-line
  newline consistently in all formats.

 In paragraphs, all you need to do is end a line with \\ to force a
 line break.  This works for LaTeX, HTML, and plain text export, at least.

 This doesn't work in other kinds of syntax, like headlines, but you may
 not need it there.

  But I couldn't figure out how to convey a newline character when
 exporting
  to plain text (ascii).
 
  I tried,
 
  #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@ @@ascii:\n@@
 
  But that simply puts out \n verbatim in the exported txt file.

 I don't know the answer to this specific issue---you might need to
 create a custom export filter---but hopefully you can just use \\
 instead of a macro like this.

 Do you need to enforce line breaks *outside of* a paragraph in plain
 text export?  If so, what case are you worried about specifically?

 Best,
 Richard

 OpenPGP Key ID: CF6FA646
 Fingerprint: 9969 43E1 CF6F A646

 (See http://www.ocf.berkeley.edu/~rwl/encryption.html for more
 information.)



Re: [O] Enforcing newlines in plain text export

2014-09-26 Thread Kaushal
 Do you need to enforce line breaks *outside of* a paragraph in plain
 text export?  If so, what case are you worried about specifically?

I forgot to answer this question.. I need to force line breaks in cases
like these

-
For example, to execute the =example_1= test and run in the {{{NEWLINE}}}

=/some/long/path/that/wouldn't/fit/along/with/the/above/line/in/the/same/line=
directory,
do the following..
-

In the above example, org-export will not wrap the text between the
verbatim formatting characters =.
To ensure that the exported formats (html/pdf/ascii) look clean, I have to
force a newline character just before that long string.

Now using \\ here instead of {{{NEWLINE}}} works but then I have to
ensure that I place the \\ character at the very end. If they are placed
mid-line then they will be interpreted as newline by latex but simply \\
character by html exporter.

For consistency, the {{{NEWLINE}}} approach looks better; hoping that
org-mode will support a special newline character for ascii exports at some
time:

-
#+MACRO: NEWLINE @@latex:\\@@ @@html:br@@ @@ascii:NEWLINE_CHARACTERS_
FOR_ASCII_EXPORT@@
-



--
Kaushal Modi

On Fri, Sep 26, 2014 at 12:04 PM, Kaushal kaushal.m...@gmail.com wrote:

 The reason I switched to using this {{{NEWLINE}}} macro is that I wanted
 consistent results wherever I used it for any kind of export.

 Example:

 -
 #+TITLE: First Line of Title // Second Line of Title
 -

 Above works for only latex  pdf exports.
 HTML export of above keeps the `//` characters verbatim.

 So I did the below:

 -
 #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@
 #+TITLE: First Line of Title {{{NEWLINE}}} Second Line of Title
 -

 The above solution looks clean to me, but now that doesn't work for ascii
 exports as I don't know what to put in between @@ascii:@@ to get a
 newline in ascii exports.


 Interesting thing is that `//` work fine at the end of the lines.
 If I have the below:

 -
 Some text in org file on first line //
 Some text in org file on second line //
 Some text in org file on third line
 -

 .. then the pdf, html, ascii exports interpret `//` as a newline character.

 For consistency, now I use:

 -
 Some text in org file on first line {{{NEWLINE}}}
 Some text in org file on second line {{{NEWLINE}}}
 Some text in org file on third line
 -

 I am just waiting to know the magic characters for ascii exports that can
 give me newlines by using the above macro. Then I don't have to worry
 whether I am using `//` at the end of the line or in the middle of a line.

 The end result would be:

 -
 #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@
 @@ascii:NEWLINE_CHARACTERS_FOR_ASCII_EXPORT@@
 #+TITLE: First Line of Title {{{NEWLINE}}} Second Line of Title
 Some text in org file on first line {{{NEWLINE}}}
 Some text in org file on second line {{{NEWLINE}}}
 Some text in org file on third line
 -







 --
 Kaushal Modi

 On Fri, Sep 26, 2014 at 11:52 AM, Richard Lawrence 
 richard.lawre...@berkeley.edu wrote:

 Hi Kaushal,

 I am forwarding your message to the Org mode list; you only sent it to
 me and Nicolas...

 Kaushal kaushal.m...@gmail.com writes:

  I came across
  https://lists.gnu.org/archive/html/emacs-orgmode/2014-09/msg00466.html
  through this emacs SE page:
 
 http://emacs.stackexchange.com/questions/255/new-line-in-title-of-an-org-mode-exported-html-document
 
  The question I had asked on stackexchange was: How to export a mid-line
  newline consistently in all formats.

 In paragraphs, all you need to do is end a line with \\ to force a
 line break.  This works for LaTeX, HTML, and plain text export, at least.

 This doesn't work in other kinds of syntax, like headlines, but you may
 not need it there.

  But I couldn't figure out how to convey a newline character when
 exporting
  to plain text (ascii).
 
  I tried,
 
  #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@ @@ascii:\n@@
 
  But that simply puts out \n verbatim in the exported txt file.

 I don't know the answer to this specific issue---you might need to
 create a custom export filter---but hopefully you can just use \\
 instead of a macro like this.

 Do you need to enforce line breaks *outside of* a paragraph in plain
 text export?  If so, what case are you worried about specifically?

 Best,
 Richard

 OpenPGP Key ID: CF6FA646
 Fingerprint: 9969 43E1 CF6F A646

 (See http://www.ocf.berkeley.edu/~rwl/encryption.html for more
 information.)





Re: [O] Bug: CAPTION space after 70th character (8.2.7c-71-g60418c-elpa)

2014-09-26 Thread Ken Mankoff

* On 2014-09-26 at 11:53, Rasmus wrote:
 Ken Mankoff mank...@gmail.com writes:
 If I have a #+CAPTION line, I can type my figure caption as I would
 expect. But as soon as I pass the 70th column, the spacebar triggers
 an error. I can type letters after the 70th column, but not a
 space. When I press the spacebar on the 70th or higher column, the
 mini-buffer says:

 Buffer ` *temp*-624801' still has clients; kill it? (y or n)


 I can't reproduce using the latest version of org.  

 Does this happen when you start Emacs with emacs -q?  If not, it could
 be some third-party package causing the error.

 Try also M-x toggle-debug-on-error and make the error reappear.  This
 should give insights in where the error occurs.


debug-on-error doesn't help because there isn't actually an error as far
as I can tell. It is a bug, not an error. Nothing shows up in *Messages*

I've isolated the problem to this line:

(add-hook 'text-mode-hook 'turn-on-auto-fill)

Which I've had enabled for a long time, but has only recently been
causing issues with CAPTION lines. I can re-create it only when that
line is uncommented.

Oddly, even the re-creation is complicated. I can't get the bug to show
up in the primary window. I must launch a second frame. I can re-create
it like this:

$ /usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.8/bin/emacs -Q
load Org
M-x auto-fill-mode
#+CAPTION lots of text and spaces does not cause bug
$ /usr/local/Cellar/emacs-mac/emacs-24.3-mac-4.8/bin/emacsclient -c foo.org
#+CAPTION and now the bug exists after line 70

It doesn't appear if I open a new frame with C-x 5 2, only if I open a
new frame with emacsclient from the command line.

Some more strange behavior: If the bug appears and I close the frame,
and then open the file again (find-file foo.org), the file (a massive
ORG file) appears as *temp* in the modeline and the contents of the
file are only the 1 line of the caption. If I kill buffer *temp* and
then find-file again, the contents are correctly loaded.

  -k.



Re: [O] How to get the link the point is on?

2014-09-26 Thread Subhan Michael Tindall

[SNIP]
 -Original Message-
 From: emacs-orgmode-bounces+subhant=familycareinc@gnu.org
 [mailto:emacs-orgmode-bounces+subhant=familycareinc@gnu.org] On
 Behalf Of Marcin Borkowski
 Sent: Thursday, September 25, 2014 3:45 PM
 To: emacs-orgmode@gnu.org
 Subject: Re: [O] How to get the link the point is on?
[SNIP]
  you know about
 
  ,[ C-h f org-toggle-link-display RET ]
  | org-toggle-link-display is an interactive compiled Lisp function in
  | `org.el'.
  |
  | It is bound to menu-bar Org Hyperlinks Descriptive Links,
  | menu-bar Org Hyperlinks Literal Links.
  |
  | (org-toggle-link-display)
  |
  | Toggle the literal or descriptive display of links.
  `
 
  ?
 
 Yes, I do, but this is not what I'm looking for.  I want to see the 
 `descriptive'
 links, only to be able (sometimes) to look up the actual target of the link.
 (And I don't like the idea of moving the point to the end, pressing
 backspace to delete the rightmost bracket, and then pressing C-\ to undo
 it...)
[] 

I accomplish this by using C-c C-l  RET RET (which is bound to org-insert-link 
and resides in org.el)
Technically it pops up the long link and description for editing in the message 
buffer, but they default to current values so effectively provide an easy 
display.  Works from anywhere in the highlighted link.
If nothing else it should point you at some modifiable code you can use for 
display.

Subhan


 
 Best,
 
 --
 Marcin Borkowski
 http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
 Adam Mickiewicz University


This message is intended for the sole use of the individual and entity to which 
it is addressed and may contain information that is privileged, confidential 
and exempt from disclosure under applicable law. If you are not the intended 
addressee, nor authorized to receive for the intended addressee, you are hereby 
notified that you may not use, copy, disclose or distribute to anyone the 
message or any information contained in the message. If you have received this 
message in error, please immediately advise the sender by reply email and 
delete the message.  Thank you.




[O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
Good afternoon,

╭
│ (print emacs-version)
│ (print org-version)
╰

╭
│ 24.3.1
│
│ 8.2.7c
╰

My goal was to set a new keybinding for two keys like this:

╭
│ (local-set-key (kbd C-,) (lambda () (interactive) (insert  \\larr )))
│ (local-set-key (kbd C-.) (lambda () (interactive) (insert  \\rarr )))
╰

The second works fine. The first does not; it stays bound to
`org-cycle-agenda-files' instead. Trying to remove it first and the bind
it I did:

╭
│ (local-unset-key (kbd C-,))
│ (local-set-key (kbd C-,) (lambda () (interactive) (insert  \\larr )))
╰

With no effect. That got me wondering if the binding occurred to
`org-cycle-agenda-files' /after/ mine. I don't think it that is possible
or likely because I do not customize agenda at all either via the UI or
Lisp.

Not sure if I am facing a Lisp thing or where to start.

What do you folks think I ought to do here?

Kind regards,


-- 
Grant Rettke
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] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke writes: 

My goal was to set a new keybinding for two keys like this: 

╭ │ (local-set-key (kbd C-,) (lambda () (interactive) 
(insert  \\larr ))) │ (local-set-key (kbd C-.) (lambda () 
(interactive) (insert  \\rarr ))) ╰ 

The second works fine. The first does not; it stays bound to 
`org-cycle-agenda-files' instead.


For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you 
have something that sets C-' to C-, globally? 


Best,
--
Jorge.




[O] Multiple entries of the same table in TOC when using longtable env + #+MACRO limitations

2014-09-26 Thread Kaushal
Hi all,

I have explained this issue in detail in this stackexchange question:
http://emacs.stackexchange.com/questions/314/toc-of-tables-for-org-mode-long-tables

I found a sort of workable solution but it is not very practical.

In the process of making that solution workable without having to request
this feature from the org-mode team, I faced some org-mode macro
limitations.

*Unable to have nested macro replacement. The below is not possible.*

#+MACRO: LT_REF ref_longtable
#+MACRO: LT_TITLE   This is a long table
#+MACRO: LT_HEADER1 Header 1
#+MACRO: LT_HEADER2 Header 2
{{{LT_HEADER({{{LT_REF}}}, {{{LT_TITLE}}}, {{{LT_HEADER1}}},
{{{LT_HEADER2}}})}}}

*Unable to use macros in #+NAME:. The below is not possible.*

#+NAME: {{{LT_REF}}}


We also can't have a MACRO that can expand to multi-line org-mode #+
syntax lines.

Example: I couldn'd find a way by which {{{SOME_MACRO}}} can expand to:


#+ATTR_LaTeX: :environment longtable
{{{LT_HEADER(ref_longtable, This is a long table, Header 1, Header 2)}}}
#+NAME: ref_longtable


What can be the best solution to get the longtables working with just one
TOC entry per table?
Can the org-mode macros code be improved to support the above use cases?



--
Kaushal Modi


Re: [O] Difference between eval and export

2014-09-26 Thread Rainer M Krug
Grant Rettke g...@wisdomandwonder.com writes:

 My eye is on you post about that topic because I would also like to know.

As you are using R, and if you are using sessions, what about setting
them from within R[1]?

Rainer




 On Fri, Sep 26, 2014 at 8:17 AM, Johannes Rainer
 johannes.rai...@gmail.com wrote:
 thanks Grant for this information.

 I was just wondering, because it seemed to me that some environment
 variables (from the shell) are present in the, while they some
 (LC_ALL) are not present in the export process.
 In my case, the export call fails with an error message, while there
 is no problem if I evaluate source block per source block from the
 buffer.

 At present I am therefore looking for a way to specify environment
 variables in the export process, but I have no idea how to do
 that...

 On 26 Sep 2014, at 15:11, Grant Rettke g...@wisdomandwonder.com wrote:

 On Fri, Sep 26, 2014 at 5:43 AM, Johannes Rainer
 johannes.rai...@gmail.com wrote:
 I am wondering what the difference between the eval of a source block and 
 the export of a buffer is in terms
 of the process in which the code is evaluated.

 When you evaluate a source block, it executes in the processed defined
 by your configuration. Then the results of that evaluation are stored
 according to your configuration. For example store the results in an
 example block.

 Exporting is the conversion for the org file content into and file
 format. During that process, you can configure whether or not you want
 evaluation of source blocks to occur during that process.



Footnotes: 
[1]  http://stat.ethz.ch/R-manual/R-devel/library/base/html/Sys.setenv.html

-- 
Rainer M. Krug
email: Raineratkrugsdotde
PGP: 0x0F52F982


pgpl1UWrc6eoh.pgp
Description: PGP signature


Re: [O] #+INCLUDE: myfile.html html does not include /literally/; Org processes

2014-09-26 Thread Achim Gratz
Omid writes:
 In any case, could you (Achim Gratz) please share with us the final
 patch that you and Nicolas Goaziou agreed upon?

That is commit 4ed554196b on master.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Cooperating with oneself using the cloud?

2014-09-26 Thread Monroe, Will
Thanks you Rasmus and Brett!  It still sounds interesting although your 
combined feedback has left me in a state of indecision about whether to 
pursue another option or investigate git-annex further.  Ha!


On 9/26/14, 9:11 AM, Rasmus wrote:

Hi,

Tim O'Callaghan t...@linux.com writes:


I have no instructions per-se. I did consider git, using git-annexe or
similar tool, but the pre-internet encryption i require does not
easily happen out of the box. If you are only syncing between your own
git servers though and do not care so much file level encryption
git-annexe a remarkable tool. I still cannot get my head around how it
works (symlinks galore!) but it seems ideal for personal sync (but not
to github). This is the nearest thing i've seen to dropbox.
https://git-annex.branchable.com/


At this point I would not recommend git-annex to my worst enemy, even
though I use it.  Annex is not at all transparent (to me), and I
struggle a lot when it doesn't just worksᵀᴹ [which is somehow rarely
the case for me].

That being said, it does do client-side encryption.  It will even
setup a key for you in the webapp.  Only requirement is that you have
git-annex on your central server, but I think an installation by an
unprivileged user is fine.  You have to transfer the key to your other
systems yourself.

Also, you can get rid of the symlinks with direct mode.  I sometimes
go into indirect mode to do $GIT_STUFF manually.

—Rasmus





Re: [O] Difference between eval and export

2014-09-26 Thread Grant Rettke
On Fri, Sep 26, 2014 at 1:44 PM, Rainer M Krug rai...@krugs.de wrote:
 Grant Rettke g...@wisdomandwonder.com writes:
 My eye is on you post about that topic because I would also like to know.

 As you are using R, and if you are using sessions, what about setting
 them from within R[1]?

 Footnotes:
 [1]  http://stat.ethz.ch/R-manual/R-devel/library/base/html/Sys.setenv.html

Yes indeed. I am quite interested in the general mechanism of how the
environment exists for when exports occur and in particular whether or
not it is different somehow. Right now I've delegated things between
[1] and .Renviron.



Re: [O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo
jorge.alfaro-muri...@yale.edu wrote:
 Grant Rettke writes:

 For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you have
 something that sets C-' to C-, globally?

Definitely, here in my .emacs.el:

╭
│ (global-set-key (kbd C-;) 'vc-next-action)
│ (global-set-key (kbd C-') 'er/expand-region)
╰

I /thought/ that was *OK*. Later in the `org-mode-hook' function I call:

╭
│ (local-set-key (kbd C-,) (lambda () (interactive) (insert  \\larr )))
│ (local-set-key (kbd C-.) (lambda () (interactive) (insert  \\rarr )))
╰

The help documentation for `org-cycle-agenda-files' says:

  C-, runs the command org-cycle-agenda-files, which is an
  interactive autoloaded compiled Lisp function in `org.el'.

  It is bound to C-', C-,, menu-bar Org File List for
  Agenda Cycle through agenda files.

What I am stumped on is:
• What did I do wrong?
• How do I fix it?



Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Grant Rettke writes: 

On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo 
jorge.alfaro-muri...@yale.edu wrote: 
For me `org-cycle-agenda-files' is bound to C-', not C-, maybe 
you have something that sets C-' to C-, globally? 


Definitely, here in my .emacs.el: 

╭ │ (global-set-key (kbd C-;) 'vc-next-action) │ 
(global-set-key (kbd C-') 'er/expand-region) ╰ 


That is very strange. It is that the line in your .emacs for C-'? 
Outside of org files, does C-, work as expected, or does it expand 
the region?

--
Jorge.




Re: [O] Formal description of Org files

2014-09-26 Thread Eric S Fraga
On Friday, 26 Sep 2014 at 07:53, Grant Rettke wrote:
 Eric do you use org in Emacs on the Pandora?

Yes.  I use Pandian: Debian distribution on the Pandora.  It comes with
Emacs 24.3.  I install org (and gnus and others) from git.

Emacs is also available on the stock OS for the OpenPandora.  I run
Debian because nobody has ported unison (a key tool in my day to day use
of all of my computers) to the OpenPandora OS (SuperSaxxon), as far as I
can tell.

 Just curious also to know where Emacs on Pandora users hang out?

Not sure there are many?  If they hand out anywhere, it would be on the
OpenPandora fora at http://boards.openpandora.org/


-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-366-gb2fca7


signature.asc
Description: PGP signature


Re: [O] How to re-bind C-,?

2014-09-26 Thread Jorge A. Alfaro-Murillo
Jorge A. Alfaro-Murillo writes: 

Grant Rettke writes:  

On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo 
jorge.alfaro-muri...@yale.edu wrote:  
For me `org-cycle-agenda-files' is bound to C-', not C-, maybe 
you have something that sets C-' to C-, globally?  


Definitely, here in my .emacs.el:  

╭ │ (global-set-key (kbd C-;) 'vc-next-action) │ 
(global-set-key (kbd C-') 'er/expand-region) ╰  


That is very strange. It is that the line in your .emacs for 
C-'?  Outside of org files, does C-, work as expected, or does 
it expand the region? 


I mean the only line in your .emacs for C-'

--
Jorge.




Re: [O] Enforcing newlines in plain text export

2014-09-26 Thread Richard Lawrence
Kaushal kaushal.m...@gmail.com writes:

 Interesting thing is that `\\` work fine at the end of the lines.

Yes, this is the behavior documented in the manual.

 I need to force line breaks in cases like these

 -
 For example, to execute the =example_1= test and run in the {{{NEWLINE}}}

 =/some/long/path/that/wouldn't/fit/along/with/the/above/line/in/the/same/line=
 directory,
 do the following..
 -

 In the above example, org-export will not wrap the text between the
 verbatim formatting characters =.
 To ensure that the exported formats (html/pdf/ascii) look clean, I have to
 force a newline character just before that long string.

 Now using \\ here instead of {{{NEWLINE}}} works but then I have to
 ensure that I place the \\ character at the very end. If they are placed
 mid-line then they will be interpreted as newline by latex but simply \\
 character by html exporter.

As you say, \\ at the end of the line works fine in this case.  So it
seems you do not have a need for another solution.

 For consistency, the {{{NEWLINE}}} approach looks better; hoping that
 org-mode will support a special newline character for ascii exports at some
 time:

 -
 #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@ @@ascii:NEWLINE_CHARACTERS_
 FOR_ASCII_EXPORT@@
 -

This would really not be a great solution, and I don't think you should
expect Org mode to support it.  If you really need something like this,
you could write an export filter for yourself (e.g., one that replaces
the string ASCII_NEWLINE_CHARACTER with \n in the exported buffer).
See the Advanced configuration section of the Exporting chapter in the
manual.

A better and more general solution, I think, would be to allow \\ to
be used in other contexts, such as in headlines, title/author/date
declarations, etc.  But that is a change to the currently documented
syntax, and it is probably a fair amount of work to implement, so it
probably isn't going to happen unless a variety of users really need it
and the maintainers think it would be an improvement to Org.
 
Best,
Richard



Re: [O] How to re-bind C-,?

2014-09-26 Thread Grant Rettke
Yes it is the only time it is globally bound.

On Fri, Sep 26, 2014 at 4:03 PM, Jorge A. Alfaro-Murillo
jorge.alfaro-muri...@yale.edu wrote:
 Jorge A. Alfaro-Murillo writes:

 Grant Rettke writes:

 On Fri, Sep 26, 2014 at 12:17 PM, Jorge A. Alfaro-Murillo
 jorge.alfaro-muri...@yale.edu wrote:

 For me `org-cycle-agenda-files' is bound to C-', not C-, maybe you have
 something that sets C-' to C-, globally?


 Definitely, here in my .emacs.el:
 ╭ │ (global-set-key (kbd C-;) 'vc-next-action) │ (global-set-key
 (kbd C-') 'er/expand-region) ╰


 That is very strange. It is that the line in your .emacs for C-'?  Outside
 of org files, does C-, work as expected, or does it expand the region?


 I mean the only line in your .emacs for C-'

 --
 Jorge.





-- 
Grant Rettke
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] Enforcing newlines in plain text export

2014-09-26 Thread Kaushal
I am requesting a consistent solution.

If // at the end of a line inserts newline when exporting in all formats,
then it should do the same when used in between a line too for ALL export
formats.

Example: #+TITLE: Line one // Line two

I am simply trying to explain why we need another solution for the sake of
consistency across all org exported formats. But I understand if the org
team doesn't think it worthwhile to implement.

I'll look into the export filter configuration.

Thanks.
Kaushal
On Sep 26, 2014 8:47 PM, Richard Lawrence richard.lawre...@berkeley.edu
wrote:

 Kaushal kaushal.m...@gmail.com writes:

  Interesting thing is that `\\` work fine at the end of the lines.

 Yes, this is the behavior documented in the manual.

  I need to force line breaks in cases like these
 
  -
  For example, to execute the =example_1= test and run in the {{{NEWLINE}}}
 
 
 =/some/long/path/that/wouldn't/fit/along/with/the/above/line/in/the/same/line=
  directory,
  do the following..
  -
 
  In the above example, org-export will not wrap the text between the
  verbatim formatting characters =.
  To ensure that the exported formats (html/pdf/ascii) look clean, I have
 to
  force a newline character just before that long string.
 
  Now using \\ here instead of {{{NEWLINE}}} works but then I have to
  ensure that I place the \\ character at the very end. If they are
 placed
  mid-line then they will be interpreted as newline by latex but simply
 \\
  character by html exporter.

 As you say, \\ at the end of the line works fine in this case.  So it
 seems you do not have a need for another solution.

  For consistency, the {{{NEWLINE}}} approach looks better; hoping that
  org-mode will support a special newline character for ascii exports at
 some
  time:
 
  -
  #+MACRO: NEWLINE @@latex:\\@@ @@html:br@@ @@ascii:NEWLINE_CHARACTERS_
  FOR_ASCII_EXPORT@@
  -

 This would really not be a great solution, and I don't think you should
 expect Org mode to support it.  If you really need something like this,
 you could write an export filter for yourself (e.g., one that replaces
 the string ASCII_NEWLINE_CHARACTER with \n in the exported buffer).
 See the Advanced configuration section of the Exporting chapter in the
 manual.

 A better and more general solution, I think, would be to allow \\ to
 be used in other contexts, such as in headlines, title/author/date
 declarations, etc.  But that is a change to the currently documented
 syntax, and it is probably a fair amount of work to implement, so it
 probably isn't going to happen unless a variety of users really need it
 and the maintainers think it would be an improvement to Org.

 Best,
 Richard