Re: [O] [RFC] Proposal for rebindings in Org 8.3

2014-02-09 Thread Bastien
Hi Samuel,

Samuel Wales samolog...@gmail.com writes:

 i meant that c-c c-' and c-c c- are both cumbersome for those users
 who press c-c by holding down the control key with the right hand and
 then pressing c with the left hand.  c-c ' is not cumbersome for those
 users.

I understand better now, thanks.

What I don't understand is why keeping the right control key between
C-c and C-' is harder than releasing the control key between C-c and
' (or  as also proposed.)  My experience (which seems the same than
Nick's) is that holding the control key down is easier/faster.

(I wonder if any serious ergonomical study has been done for Emacs
beybindings depending on keyboards.)

-- 
 Bastien



Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread Bastien
Hello,

D. C. Toedt d...@toedt.com writes:

 (Org-mode maintainer [Bastien, still?], can you please let me know if
 / when this gets implemented in an official release.)

I'm not Org's maintainer anymore, I'm just /de facto/ taking decisions
in accordance with the other core maintainers, our level of trust lets
us move forward happily.

To come back to you original question:

,
| #+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t
| 
| * Introduction to Technology Contracts
|   :PROPERTIES:
|   :CUSTOM_ID: IntroTechContracts
|   :END:
| 
| Lorem ipsum etc. etc.
| 
| * Dangerous Clauses
|   :PROPERTIES:
|   :CUSTOM_ID: DangerousClauses
|   :END:
| 
| Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].
`

Why don't you use

[[#IntroTechContracts][Introduction to Technology Contracts]]

as a link?  It is the link stored by org-store-link, and later
inserted by org-insert-link, and AFAICS it is correctly exported.

But it's true there are a few things we can make more consistent
in this area though, so thanks for bringing this up.

Best,

-- 
 Bastien



Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread Nicolas Goaziou
D. C. Toedt d...@toedt.com writes:

 I found a problem when trying this on a bigger file (my book file):  If $1
 (actually, #$1) is for a link target that doesn't exist, then org-mode goes
 into its No match - create this as a new heading? (y or n) routine. That
 causes the rest of the export to fail.  It'd be better if get-title could
 do the same thing org-mode does natively, that is, including the text of $1
 as italics to indicate a non-existent link.

 Example file below:


 #+MACRO: get-title (eval (save-excursion (org-open-link-from-string
 [[#$1]]) (org-get-heading nil nil)))
 #+MACRO: SECREF [[#$1][{{{get-title($1)}}}]]
 #+OPTIONS: H:7 toc:nil num:1 email:t author:t

 * Introduction to Technology Contracts
   :PROPERTIES:
   :CUSTOM_ID: IntroTechContracts
   :END:

 Lorem ipsum etc. etc.

 * Dangerous Clauses
   :PROPERTIES:
   :CUSTOM_ID: DangerousClauses
   :END:

 Lorem ipsum etc. etc. -- see Section {{{SECREF(
 BogusLinkTarget
 )}}}

The following should work.

  #+MACRO: get-title (eval (or (save-excursion (ignore-errors (let 
((org-link-search-inhibit-query t)) (org-open-link-from-string [[#$1]]) 
(org-get-heading nil nil /$1/))


Regards,

-- 
Nicolas Goaziou



Re: [O] Error with org-adaptive-fill-function and mu4e

2014-02-09 Thread Igor Sosa Mayor
Hi Bastien, 

Am Sun, Feb 09, 2014 at 08:53:03AM +0100, Bastien wrote:
 There is no orgtbl-line* variable in latest Org.
 What version of Org are you using?
 
 Also, do you have the same error with 
 
 (add-hook 'message-mode-hook 'turn-on-orgstruct)
 (add-hook 'mail-mode-hook 'turn-on-orgstruct)

thanks for your answer... I'm using 8.2.5h.

With the code you suggest me, I do NOT get the error, but lists for
instance do not work (i.e. there is no indentation, etc.).


-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] Error with org-adaptive-fill-function and mu4e

2014-02-09 Thread Bastien
Hi Igor,

Igor Sosa Mayor joseleopoldo1...@gmail.com writes:

 Am Sun, Feb 09, 2014 at 08:53:03AM +0100, Bastien wrote:
 There is no orgtbl-line* variable in latest Org.
 What version of Org are you using?
 
 Also, do you have the same error with 
 
 (add-hook 'message-mode-hook 'turn-on-orgstruct)
 (add-hook 'mail-mode-hook 'turn-on-orgstruct)

 thanks for your answer... I'm using 8.2.5h.

Thanks.  Still, since orgtbl-line* is not in 8.2.5h, I suspect you
didn't add (require 'org) early enough in your .emacs.el.

The latest Org needs to be loaded before you use it in mu4a.

 With the code you suggest me, I do NOT get the error, but lists for
 instance do not work (i.e. there is no indentation, etc.).

Lists in orgstruct works fine here in Gnus, but see above, as we
need to sort this out first.

-- 
 Bastien



[O] Assumptions on user's environment (was: [RFC] Proposal for rebindings in Org 8.3)

2014-02-09 Thread Karl Voit
* Samuel Wales samolog...@gmail.com wrote:

Hi!

 i meant that c-c c-' and c-c c- are both cumbersome for those users
 who press c-c by holding down the control key with the right hand and
 then pressing c with the left hand.  c-c ' is not cumbersome for those
 users.

Oh, this is a sensitive subject :-)

For example: I am happily removing CAPS LOCK on all of my computers
and replace it with an additional CTRL key. This way, I am using my
left pinkie for all kinds of CTRL-combinations. As long as it is not
combined with [`123q~] or TAB, I am fine.

And: although I am living in a German speaking country, I am using
US_intl keyboard settings. Most keyboard shortcuts make more sense
since I switched. Unfortunately, software developers who define
keyboard shortcuts have either settle for their own keyboard layout
(mostly en_US) or keyboard shortcuts are part of the i18n layer
which has also some drawbacks IMHO.

The point is: when you are settling for keyboard shortcuts, you are
going to do some assumptions on the environment of your users. So:
what are these assumptions for Emacs/Org-mode? I guess this is the
root question we should try to answer (and document).

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Assumptions on user's environment

2014-02-09 Thread Bastien
Hi Karl,

Karl Voit devn...@karl-voit.at writes:

 So: what are these assumptions for Emacs/Org-mode? I guess this is
 the root question we should try to answer (and document).

Well, this is a general Emacs issue.  I guess the assumption is that
keybindings are optimized for US keyboards layouts - that said, some
core keybindings are based on mnemonic (C-f and C-b to move forward
and backward), so optimized seems a bit fuzzy anyway...

-- 
 Bastien



[O] Error when editing src block

2014-02-09 Thread Florian Beck
When `org-edit-src-code' fails to load the language mode, it leaves the 
buffer(s) in an unusable state. For example, evaluate


M-: (add-hook 'emacs-lisp-mode-hook 'paredit-mode)

Then C-c ' in this block

#+begin_src emacs-lisp
  (save-excursion
#+end_src

 - byte-code: Language mode `emacs-lisp-mode' fails with: Unmatched 
bracket or quote


That's fine. But now C-c ' doesn't work and M-x org-edit-src-exit claims:

org-edit-src-exit: This is not a sub-editing buffer, something is wrong

Indeed.

I guess, the source buffer and the overlay should be cleaned up. But 
since the worst that can happen is the language mode not loading 
correctly, maybe just downgrade the error to a warning?



--
Florian Beck



Re: [O] Assumptions on user's environment

2014-02-09 Thread Karl Voit
* Bastien b...@gnu.org wrote:
 Hi Karl,

Hi Bastien!

 Karl Voit devn...@karl-voit.at writes:

 So: what are these assumptions for Emacs/Org-mode? I guess this is
 the root question we should try to answer (and document).

 Well, this is a general Emacs issue.  

Sure.

 I guess the assumption is that keybindings are optimized for US
 keyboards layouts - that said, some core keybindings are based on
 mnemonic (C-f and C-b to move forward and backward), so
 optimized seems a bit fuzzy anyway...

Fair enough. So there has to be a decision whether or not to invest
time/effort for users of QWERTZ keyboard layouts.

If we should decide to ignore non US_intl/en_US-issues, I vote for
making this decision very clear to new users with a prominent
sentence in our documentation.

Personally, I do think that tech-savvy users of non English speaking
countries should definitely consider switching to US_intl layout for
many reasons.  From my experience, only a minority of text-savvy
users are doing so. But this is also true for applying live-hacking
as a habit in general :-(

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] adding options to the minted environment of exported source blocks in latex

2014-02-09 Thread Alan Schmitt
Hi Nicolas,

Nicolas Goaziou n.goaz...@gmail.com writes:

 At the moment, there is no Org way to add arbitrary options to listings
 or minted on a per block basis.

 There are basically two ways to implement this. Either we add
 an :options keyword and stuff options there:

   #+attr_latex: :options a=b,c=d
   #+begin_src ...

 Another option is to turn options into keywords:

   #+attr_latex: :a b :c d
   #+begin_src ...

 The latter is more elegant, but it requires to know about every
 minted/listings options.

 It is also possible to do something in-between, i.e., tell Org about
 a few selected keywords and stuff the others into :options. This is what
 is done for images. Org knows about :height and :width and uses :options
 for everything else.

The latter would be great. The option I'm considering does not exist in
minted, I add it in my preamble.

Best,

Alan



Re: [O] Error with org-adaptive-fill-function and mu4e

2014-02-09 Thread Igor Sosa Mayor
Hi Bastien, 

 Thanks.  Still, since orgtbl-line* is not in 8.2.5h, I suspect you
 didn't add (require 'org) early enough in your .emacs.el.

thanks again for your answer (and for your work in orgmode).

I put (requir 'org) in the first line of emacs.el, restart emacs and
lists are still not working. C-h m tells me OrgStruct is loaded. As I
said, with 

(add-hook 'message-mode-hook 'turn-on-orgstruct)
(add-hook 'mail-mode-hook 'turn-on-orgstruct)

there is no error with orgtbl-line-etc. anymore. 


-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] [RFC] Proposal for rebindings in Org 8.3

2014-02-09 Thread Achim Gratz
Bastien writes:
 What I don't understand is why keeping the right control key between
 C-c and C-' is harder than releasing the control key between C-c and
 ' (or  as also proposed.)  My experience (which seems the same than
 Nick's) is that holding the control key down is easier/faster.

That depends on the keyboard layout, but if pressing ' requires the
use of the right hand, then you'd need to switch to the laft for
pressing Control (unless you were chording it with the right hand, which
is probably a bad thing for anyone inflicted with RSI).

 (I wonder if any serious ergonomical study has been done for Emacs
 beybindings depending on keyboards.)

Quite certainly not.  There are oodles of keybindings that really don't
work sensibly with anything but a UNIX keyboard and the whole concept is
clearly inspired by the Lisp Machine Space Cadet keyboard.  I wish I'd
still have my Sun Type4 keyboard… Similarly, you really don't get why
anybody thought \ was a good path separator until you take a look at
the original PC/XT keyboard (it was also a non-modifier key on most
terminal keyboards at the time, but / was more prominent there).


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

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




[O] bug#5753: something, something, org-mode, shift-select, something

2014-02-09 Thread Lennart Borgman
On Sun, Feb 9, 2014 at 2:25 AM, N. Jackson gentleundercurr...@gmail.comwrote:

 The following message is a courtesy copy of an article
 that has been posted to gnu.emacs.bug as well.

 Lars Ingebrigtsen la...@gnus.org writes:

  Lennart Borgman lennart.borg...@gmail.com writes:
 
  Shift-select in cua-mode does not work in org-mode although
  org-replace-disputed-keys is t, org-disputed-keys are set for shift
  arrow keys and org-support-shift-select is always
 
  Is this problem still present in Emacs 24.3?

 Naturally I can't answer for the OP (and I don't know about disputed
 keys) but I can report that in general this problem persists in Emacs
 24.3.

 On GNU Emacs 24.3.1 [1], shift select does not work in org mode. I'm not
 certain this is a bug, as my understanding is that the org authors did
 not design it to work with shift select?

 In any case, I use a very simple workaround which makes shift select
 work just fine in org mode; I've never had any problems with it. It
 looks like this (Note: It is of unknown provenance, aside from the
 attribution in the comment.):

 ;; This snippit from jisang-yoo on reddit to enable shift select in org
 ;; mode when cua-mode is on.
 (eval-after-load org
 '(progn
(eval-after-load cua-base
  '(progn
 (defadvice org-call-for-shift-select (before
 org-call-for-shift-select-cua activate)
   (if (and cua-mode
org-support-shift-select (not (use-region-p)))
   (cua-set-mark)))
 ;; End jisang-yoo snippit

 With this in my org settings, I have no problems with shift select
 except that you cannot start a selection on a timestamp (because shift
 with cursor keys adjusts timestamps), but I've learnt to automatically
 start my selection from the end of the line above the timestamp so I
 don't have any problems.

 I hope this information is of some use.

 [1] GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.8.2) of
 2013-08-14 on buildvm-15.phx2.fedoraproject.org


 Thanks Jason. I can't test now myself.

I think this problem illustrates very well why cua-mode must be made a
first class citizen in Emacs. Without that problems like this are showing
up for beginners.


[O] bug#5753: something, something, org-mode, shift-select, something

2014-02-09 Thread Lennart Borgman
On Sun, Feb 9, 2014 at 12:05 PM, Lennart Borgman
lennart.borg...@gmail.comwrote:

 On Sun, Feb 9, 2014 at 2:25 AM, N. Jackson 
 gentleundercurr...@gmail.comwrote:

 The following message is a courtesy copy of an article
 that has been posted to gnu.emacs.bug as well.

 Lars Ingebrigtsen la...@gnus.org writes:

  Lennart Borgman lennart.borg...@gmail.com writes:
 
  Shift-select in cua-mode does not work in org-mode although
  org-replace-disputed-keys is t, org-disputed-keys are set for shift
  arrow keys and org-support-shift-select is always
 
  Is this problem still present in Emacs 24.3?

 Naturally I can't answer for the OP (and I don't know about disputed
 keys) but I can report that in general this problem persists in Emacs
 24.3.

 Thanks Jason. I can't test now myself.

 I think this problem illustrates very well why cua-mode must be made a
 first class citizen in Emacs. Without that problems like this are showing
 up for beginners.


Oh, sorry. I mean Jackson, of course.


Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread D. C. Toedt
 Why don't you use [[#IntroTechContracts][Introduction to Technology
Contracts]]
 as a link?

I routinely tweak the text of the target headings as I edit the document.
 For example, the section heading Introduction to Technology Contracts
might become, say, Introduction:  Why Technology Contracts are Fun.

I don't want to have to manually revise the link text for the many internal
cross-reference links that exist in the document.  I'd really like to have
a way for a link to automatically retrieve the heading text during HTML
export.





On Sun, Feb 9, 2014 at 2:19 AM, Bastien b...@gnu.org wrote:

 Hello,

 D. C. Toedt d...@toedt.com writes:

  (Org-mode maintainer [Bastien, still?], can you please let me know if
  / when this gets implemented in an official release.)

 I'm not Org's maintainer anymore, I'm just /de facto/ taking decisions
 in accordance with the other core maintainers, our level of trust lets
 us move forward happily.

 To come back to you original question:

 ,
 | #+OPTIONS: H:7 TOC:nil @:t num:1 email:t author:t
 |
 | * Introduction to Technology Contracts
 |   :PROPERTIES:
 |   :CUSTOM_ID: IntroTechContracts
 |   :END:
 |
 | Lorem ipsum etc. etc.
 |
 | * Dangerous Clauses
 |   :PROPERTIES:
 |   :CUSTOM_ID: DangerousClauses
 |   :END:
 |
 | Lorem ipsum etc. etc. -- see Section [[#IntroTechContracts]].
 `

 Why don't you use

 [[#IntroTechContracts][Introduction to Technology Contracts]]

 as a link?  It is the link stored by org-store-link, and later
 inserted by org-insert-link, and AFAICS it is correctly exported.

 But it's true there are a few things we can make more consistent
 in this area though, so thanks for bringing this up.

 Best,

 --
  Bastien



Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread D. C. Toedt
Excellent -- that seems to export just fine.

Interestingly, the export now generates the message, Position saved to
mark ring, go back with C-c  .  I presume that comes from the
((org-link-search-inhibit-query t)) argument in the let function.  It doesn't
seem to harm the export results.

One of these years I'll have to start poking around the Emacs-Lisp code to
try to puzzle out the workings of the functions being called, especially
org-get-heading
--- is there a comparable one (or arguments) to get the section number of a
heading?

Many thanks, Nicolas.



On Sun, Feb 9, 2014 at 2:29 AM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 D. C. Toedt d...@toedt.com writes:

  I found a problem when trying this on a bigger file (my book file):  If
 $1
  (actually, #$1) is for a link target that doesn't exist, then org-mode
 goes
  into its No match - create this as a new heading? (y or n) routine.
 That
  causes the rest of the export to fail.  It'd be better if get-title could
  do the same thing org-mode does natively, that is, including the text of
 $1
  as italics to indicate a non-existent link.
 
  Example file below:
 
 
  #+MACRO: get-title (eval (save-excursion (org-open-link-from-string
  [[#$1]]) (org-get-heading nil nil)))
  #+MACRO: SECREF [[#$1][{{{get-title($1)}}}]]
  #+OPTIONS: H:7 toc:nil num:1 email:t author:t
 
  * Introduction to Technology Contracts
:PROPERTIES:
:CUSTOM_ID: IntroTechContracts
:END:
 
  Lorem ipsum etc. etc.
 
  * Dangerous Clauses
:PROPERTIES:
:CUSTOM_ID: DangerousClauses
:END:
 
  Lorem ipsum etc. etc. -- see Section {{{SECREF(
  BogusLinkTarget
  )}}}

 The following should work.

   #+MACRO: get-title (eval (or (save-excursion (ignore-errors (let
 ((org-link-search-inhibit-query t)) (org-open-link-from-string [[#$1]])
 (org-get-heading nil nil /$1/))


 Regards,

 --
 Nicolas Goaziou



Re: [O] Assumptions on user's environment

2014-02-09 Thread Rasmus
Karl Voit devn...@karl-voit.at writes:

 Personally, I do think that tech-savvy users of non English speaking
 countries should definitely consider switching to US_intl layout for
 many reasons.  

What if the set of letters in English is a subset of the set of
letters in your the tech-savvy users language?

 From my experience, only a minority of text-savvy users are doing
 so.

Perhaps the objective that these users are maximizing another
objective than the one you have in mind?

—Rasmus

-- 
If you can mix business and politics wonderful things can happen!




[O] org-dblock-write:count

2014-02-09 Thread Adam Spiers
Hi all,

I just had an awesome conversation with Sacha about more effective
daily/weekly reviewing with org-mode :-)  One of the things we talked
about was quantifying the number of tasks (TODO keywords) in any given
state, as a means of becoming more aware of your progress over time.
I have had some success in the past using the measure what you want
to manage maxim[1], and wanted to start applying this to my horribly
massive TODO.org file.

Back in 2008, Carsten very generously implemented the
`org-map-entries' API function at my request[2] in order to facilitate
this kind of measurement, and I'm somewhat ashamed to say that I've
only just started to take advantage of it:

(defun org-count-matches (search)
  Count the number of matches from the given tag search in the
current buffer, respecting any scope restriction.
  (interactive sMatch: )
  (length (org-map-entries t search)))

(defun org-dblock-write:count (params)
  Write a table showing the number of occurrences of each of the
specified keywords and tag searches.  Example usage:

#+BEGIN:dynamic block
#+BEGIN: count :keywords (\NEXT\ \DONE\) :searches (\@phone\ 
\@home\)
| NEXT   | 522 |
| DONE   |  69 |
| @phone |  77 |
| @home  | 182 |
#+END:

  (let ((keywords (plist-get params :keywords))
(searches (plist-get params :searches))
(format | %-10s | %3d |\n))
(insert
 (concat
  (mapconcat (lambda (keyword)
   (format format keyword (org-count-matches
   (concat / keyword
 keywords )
  (mapconcat (lambda (search)
   (format format search (org-count-matches search)))
 searches )))
(backward-delete-char 1)))

Sacha deserves a lot of credit for reminding me how easy it would be
to do this :-)

I suppose the next step would be to automate appending counts to a CSV
file or transmitting them to some kind of graphing service like
https://tempo-db.com/ (or preferably some free alternative like
quantifiedawesome ;-) via a REST API.

[1] http://blog.adamspiers.org/2011/05/15/email-nirvana/
[2] http://lists.gnu.org/archive/html/emacs-orgmode/2008-06/msg00208.html



Re: [O] Error with org-adaptive-fill-function and mu4e

2014-02-09 Thread Igor Sosa Mayor
Am Sun, Feb 09, 2014 at 11:20:55AM +0100, Igor Sosa Mayor wrote:
 I put (requir 'org) in the first line of emacs.el, restart emacs and
 lists are still not working. C-h m tells me OrgStruct is loaded. As I

well I have to be more precise: lists are not working if the item goes
over one line. If the list item is shorter does not go over one line,
then I can insert with M-RET one new item...


-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



Re: [O] Error with org-adaptive-fill-function and mu4e

2014-02-09 Thread Bastien
Hi Igor,

Igor Sosa Mayor joseleopoldo1...@gmail.com writes:

 I put (requir 'org) in the first line of emacs.el

If you are using 8.2.5h, from either Git or ELPA -- your first lines
should be to modify the load-path (if using Git) or to initialize your
ELPA archives.  Otherwise (require 'org) will just require the Org
distribution that is known by Emacs at this point.

(Maybe I'm stating the obvious, but those things always need to be
double-checked.)

 , restart emacs and
 lists are still not working. C-h m tells me OrgStruct is loaded. As I
 said, with 

 (add-hook 'message-mode-hook 'turn-on-orgstruct)
 (add-hook 'mail-mode-hook 'turn-on-orgstruct)

 there is no error with orgtbl-line-etc. anymore.

Good -- turn-on-orgstruct is enough for most purposes.

-- 
 Bastien



Re: [O] Error when editing src block

2014-02-09 Thread Bastien
Hi Florian,

Florian Beck f...@miszellen.de writes:

 But 
 since the worst that can happen is the language mode not loading 
 correctly, maybe just downgrade the error to a warning?

Yes, that's what is done now in maint.
Thanks for the suggestion.

-- 
 Bastien



[O] bug#5753: something, something, org-mode, shift-select, something

2014-02-09 Thread Bastien
Lars Ingebrigtsen la...@gnus.org writes:

 Lennart Borgman lennart.borg...@gmail.com writes:

 Shift-select in cua-mode does not work in org-mode although
 org-replace-disputed-keys is t, org-disputed-keys are set for shift
 arrow keys and org-support-shift-select is always

 Is this problem still present in Emacs 24.3?

With Emacs from trunk:

~$ emacs RET
C-x C-f test.org RET
M-x cua-mode RET
M-: (setq org-support-shift-select t) RET
M-: (insert blahblah) RET
C-a
S-right

will select correctly here.

~$ emacs RET
M-: (setq org-support-shift-select t) RET
M-: (setq org-replace-disputed-keys t) RET
M-: (insert * A headline) RET
C-a
S-right

will also select correctly instead of switching the TODO keyword.

So I'm not really sure what is the bug here.  Lennart, can you
be more specific?

Thanks!

-- 
 Bastien





Re: [O] Error with org-adaptive-fill-function and mu4e

2014-02-09 Thread Igor Sosa Mayor
Hi Bastien,

 If you are using 8.2.5h, from either Git or ELPA -- your first lines

thanks again for your help.  Normally I dont have any (require 'org).
Orgmode is installed in /usr/share/emacs/site-lisp/org/ by my package
manager (pacman in archlinux). I load emacs 

Everything works in orgmode perfectly, org-version shows 8.2.5h, if I
look up an org variable I can see that the help system points to org.el
in the directory I mentioned, etc. 


That is: there are no other problems apart from this issue (but this
problem is there since a couple of months at least). 

 Good -- turn-on-orgstruct is enough for most purposes.

Sure. But unfortunately it only works if the item is no longer than the
70 characters I have put as fill-column...

It is not soo important. I just want to get rid of this issue, because
I tend to use often lists in my emails...


-- 
:: Igor Sosa Mayor :: joseleopoldo1...@gmail.com ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/  ::
:: jabberid: rogorido  ::::



[O] bug#5753: something, something, org-mode, shift-select, something

2014-02-09 Thread Lennart Borgman
On Sun, Feb 9, 2014 at 3:06 PM, Bastien b...@gnu.org wrote:

 Lars Ingebrigtsen la...@gnus.org writes:

  Lennart Borgman lennart.borg...@gmail.com writes:
 
  Shift-select in cua-mode does not work in org-mode although
  org-replace-disputed-keys is t, org-disputed-keys are set for shift
  arrow keys and org-support-shift-select is always
 
  Is this problem still present in Emacs 24.3?

 With Emacs from trunk:

 ~$ emacs RET
 C-x C-f test.org RET
 M-x cua-mode RET
 M-: (setq org-support-shift-select t) RET
 M-: (insert blahblah) RET
 C-a
 S-right

 will select correctly here.

 ~$ emacs RET
 M-: (setq org-support-shift-select t) RET
 M-: (setq org-replace-disputed-keys t) RET
 M-: (insert * A headline) RET
 C-a
 S-right

 will also select correctly instead of switching the TODO keyword.

 So I'm not really sure what is the bug here.  Lennart, can you
 be more specific?

 Thanks!

 It would be very nice if the bug was gone, but please ask Jackson!


Re: [O] another blog exporter

2014-02-09 Thread Robert Klein
Hi Bastien,

On 02/09/2014 08:55 AM, Bastien wrote:
 Hi Robert,
 
 Robert Klein rokl...@roklein.de writes:
 
 I put ox-blog on github:

 https://github.com/roklein/ox-blog
 
 Thanks for your work on this, looks neat.
 
 Do you have an example website produced by ox-blog?
 
 Also, I see you use a new #+ATTR_BLOG keyword.
 Is this needed for images and such?  I'd expect
 #+ATTR_HTML would be enough here, users won't
 want to use both #+ATTR_HTML and #+ATTR_BLOG
 I guess.

I posted the latest three posts on http://www.xyzzy.de using ox-blog.


I can use #+ATTR_HTML, but I wasn't sure about using new attributes,
e.g. :highlight and :lineno for source blocks.  I didn't want to pollute
ATTR_HTML with things that are of no use for the HTML exporter.

If you don't see a problem in #+ATTR_HTML, I'll happily change this.

Thanks for the feed-back!

Best regards
Robert






[O] bug#5753: something, something, org-mode, shift-select, something

2014-02-09 Thread Bastien
Hi Jackson,

can you tell me what exactly the bug is wrt cua-mode and org-mode?

See my previous recipes in this thread for references.

If the bug is here for Emacs 24.3, can you try downloading and
installing the latest Org stable version (http://orgmode.org)
and see if the bug is still there?

Thanks in advance for your help,

-- 
 Bastien





Re: [O] Assumptions on user's environment

2014-02-09 Thread Karl Voit
* Rasmus ras...@gmx.us wrote:
 Karl Voit devn...@karl-voit.at writes:

 Personally, I do think that tech-savvy users of non English speaking
 countries should definitely consider switching to US_intl layout for
 many reasons.  

 What if the set of letters in English is a subset of the set of
 letters in your the tech-savvy users language?

This is the case with the German language. However, there are ways
to enter German umlauts with us_intl layout (digraph).

With Microsoft Windows as an exception, it is possible to switch
keyboard layouts on keyboard shortcuts.

However, when I am coding, I am only using English variable names
and comments. So most of the time, I am happy with 7-bit ASCII
characters.

If you do not code nor use strange environments like LaTeX, you
might as well ignore my comments about tech-savvy people which was
maybe a bit too general.

 From my experience, only a minority of text-savvy users are doing
 so.

 Perhaps the objective that these users are maximizing another
 objective than the one you have in mind?

Yes, you are absolutely right. So tech-savvy is probably too
unspecific as a term. However, coders seems to be narrow as well.
Maybe you can think of a term in between? ;-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] org-edit-src-code window setup

2014-02-09 Thread Michael Bach
On 2/7/14 6:01 PM, John Hendy wrote:
 On Fri, Feb 7, 2014 at 5:29 AM, Michael Bach pha...@gmail.com wrote:
 Dear org-mode Developers and Users,

 (Org-mode version 8.2.5g from git)

 I want to change the behaviour of C-c ' when inside a source block.
 What I am after is best described in a schematic:

 +---+---+
 |   |   |
 |   |   2   |
 |   |   |
 |   |   |
 +   1   +---+
 |   |   |
 |   |   3   |
 |   |   |
 |   |   |
 +---+---+

 I am editing the .org file in window 1 ('org').  I want C-c ' to display
 the code block contents in window 2 ('source').  In window 3 I want to
 have the interpreter for the language I am editing ('interpreter').
 
 Can you clarify whether you simply want to obtain this view in Emacs
 and are not sure how, or if you are asking for a way to automate the
 process via a keyboard binding/macros/function in order to do this
 automatically on every use of =C-c '=?
 

I set this view up myself and also remember that there is a way to
automate this.  My problem is not with the setup per se, but with the
behaviour that if I repeatedly press =C-c '= in the mentioned window
setup, the org src buffer is alternatingly displayed in window 2 and 3,
which is annoying (distracting)

I would like the interpreter buffer to stay in window 3 and the org src
buffer always be displayed in window 2 if I press =C-c '=.






Re: [O] Assumptions on user's environment (was: [RFC] Proposal for rebindings in Org 8.3)

2014-02-09 Thread Samuel Wales
hi karl,

it is true that there are assumptions about the user's environment.
the strongest is probably qwerty, followed by european language,
english, and common layouts.  as a native english speaker, i am aware
that i am fortunate in that regard.  i get to use utf-8 without making
my text files larger, unlike some asian speakers, for example.

HOWEVER: my point was not about the user's environment at all.  it
applies to whatever environment is chosen for the assumptions.

on qwerty, c is on the lhs.  ' is on the rhs.  /that/ is why c-c c-'
is more cumbersome for using two hands for modifiers.  remember: using
one hand for both modifier and key is never an option.

===

hope that clarifies.

samuel


On 2/9/14, Karl Voit devn...@karl-voit.at wrote:
 * Samuel Wales samolog...@gmail.com wrote:

 Hi!

 i meant that c-c c-' and c-c c- are both cumbersome for those users
 who press c-c by holding down the control key with the right hand and
 then pressing c with the left hand.  c-c ' is not cumbersome for those
 users.

 Oh, this is a sensitive subject :-)

 For example: I am happily removing CAPS LOCK on all of my computers
 and replace it with an additional CTRL key. This way, I am using my
 left pinkie for all kinds of CTRL-combinations. As long as it is not
 combined with [`123q~] or TAB, I am fine.

 And: although I am living in a German speaking country, I am using
 US_intl keyboard settings. Most keyboard shortcuts make more sense
 since I switched. Unfortunately, software developers who define
 keyboard shortcuts have either settle for their own keyboard layout
 (mostly en_US) or keyboard shortcuts are part of the i18n layer
 which has also some drawbacks IMHO.

 The point is: when you are settling for keyboard shortcuts, you are
 going to do some assumptions on the environment of your users. So:
 what are these assumptions for Emacs/Org-mode? I guess this is the
 root question we should try to answer (and document).

 --
 mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
 get Memacs from https://github.com/novoid/Memacs 

 https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
 github





-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] Assumptions on user's environment

2014-02-09 Thread Bastien
Samuel Wales samolog...@gmail.com writes:

 remember: using
 one hand for both modifier and key is never an option.

Why?  For me C-c C-' is very easy with one hand, I don't even
need to move the fingers.

-- 
 Bastien



Re: [O] [RFC] Proposal for rebindings in Org 8.3

2014-02-09 Thread Tim O'Callaghan

 Rasmus ras...@gmx.us writes:

 For me the following keys need shift or Alt-Gr: ^, , `, !, ?, and
 ~.

 Oh, do you really need the Alt-Gr key for `?' and `!' ?

 Does that mean you don't use `C-c !' or that you rarely use it?

 Of course, this may have nothing to do with the keybinding itself,
 but I'm curious.


If i can throw in my 2-cents, I have been using Alt-O or(Meta-O if you
prefer) for a Ctrl-C, Ctrl-C substitute in org-mode for years. Now i
use a combination of an activation key (Alt-O or f4) and a kind of
fast-key mnemonic map. I need mnemonics because there is just too much
in org-mode, and i prefer to just type an extra key rather than have
to bend to hit a semi-random modifier + cryptic keymap entry.

so:
Alt+o,a = agenda,
Alt+o,0 = capture - inbox
Alt+o,1 = agenda file 1

Alt+o, A,h = agenda - home tag
Alt+o,T,c = org table convert region
Alt+o,T,C,b = org table convert buffer.


Basically, two keys to most used personal functions. To save the
pinkies, alt and shift are the only modifiers. alt for the activator,
and shift to dig into a personalised sub-menu.  I tried binding to
FNkeys, but i could not memorise them. the ah = at home comes
naturally to me.

I for one will follow this idea with interest.

Tim.



Re: [O] Assumptions on user's environment

2014-02-09 Thread Samuel Wales
rsi.

one of the worst things you can do is use a single hand for more than one key.


On 2/9/14, Bastien b...@gnu.org wrote:
 Samuel Wales samolog...@gmail.com writes:

 remember: using
 one hand for both modifier and key is never an option.

 Why?  For me C-c C-' is very easy with one hand, I don't even
 need to move the fingers.

 --
  Bastien



-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



[O] org-odt table with borders on all sides

2014-02-09 Thread rajat mukherjee
Is this possible? Please help.
Thanks.
Rajat.





Re: [O] Assumptions on user's environment

2014-02-09 Thread Achim Gratz
Bastien writes:
 Samuel Wales samolog...@gmail.com writes:

 remember: using
 one hand for both modifier and key is never an option.

 Why?  For me C-c C-' is very easy with one hand, I don't even
 need to move the fingers.

I'd think you need to curl the pinky at least unless you're talking
about a laptop keyboard with a favorable position for the Ctrl key.

It's really a bad thing if you've developed certain types of RSI and may
even be impossible if you have coordinative disabilities or can only use
one hand.  This is what sticky or locked modifiers were invented for
(check how your favourite OS lets you set up accessibility features).


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




[O] Mismatch in url escaping between org and exported html

2014-02-09 Thread Mark Janssen
Hello list,

If I insert a http:// link containing question marks, the verbatim link
being inserted in the org document has the question mark escaped.

For example the link

http://mpcjanssen.nl/fossil/simpletask/tktview?name=ee0504fc8c

is actually inserted as:

[[http://mpcjanssen.nl/fossil/simpletask/tktview?name%3Dee0504fc8c][bug]]

This works fine when clicking the link from emacs, but breaks when
exporting to html. Then it is exported as:

a href=http://mpcjanssen.nl/fossil/simpletask/tktview?name%3Dee0504fc8c
bug/a

This will not work.

Is this an error in the html exporter or in org mode itself? I would expect
the link to be included verbatim in the .org file.

Regards,
Mark


[O] create/export a table + cell and table borders?

2014-02-09 Thread Sharon Kimble
Is it possible, in org-mode, to create a table and export it to a
'foobar.txt' but showing the table borders and cell borders please?
I couldn't find any mention of it in the org-mode manual, but that
doesn't mean that it can't be done.

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, emacs 24.3.50.1
Registered Linux user 561944


signature.asc
Description: PGP signature


Re: [O] Assumptions on user's environment

2014-02-09 Thread Karl Voit
* Achim Gratz strom...@nexgo.de wrote:
 Bastien writes:
 Samuel Wales samolog...@gmail.com writes:

 remember: using
 one hand for both modifier and key is never an option.

 Why?  For me C-c C-' is very easy with one hand, I don't even
 need to move the fingers.

 I'd think you need to curl the pinky at least unless you're talking
 about a laptop keyboard with a favorable position for the Ctrl key.

I am using Lenovo UltraNav USB keyboards on Windows and Linux
machines and an Apple BT keyboard on a Mac. On all of them I can
type C-c with a *completely relaxed* left pinkie and a left index
finger thanks to an additional CTRL key instead of the CAPS LOCK. My
left pinkie seldom moves away from the left CAPS LOCK position.

In fact, I never use the original left CTRL key at all. And more or
less thanks to bad habit, I never use the right CTRL key.

Unfortunately, I do not touch type all the time. And I know, that my
typing behavior is not optimized. However, it's that fast that
changing my typing habits at this point seems to be a hard thing to
do for very little benefit. I never had any physical issues related
to typing. I tend to think that this is because of the CAPSLOCK/CTRL
trick.


I get the impression from this thread, that this varies from user to
user.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
get Memacs from https://github.com/novoid/Memacs 

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] external setup file for org-html-preamble?

2014-02-09 Thread Peter Salazar
Hello,

I'm exporting my org-mode files to HTML. I've been using:

# Local Variables:
# org-html-preamble:
# End:

to insert a custom HTML preamble and postamble for my org files for HTML
export.

Just now for simplicity, I'm trying to move the preamble and postamble to
an external setup file.

In my org-mode file, I now have

#+SETUPFILE: setup.org

and my setup.org file looks like this: http://ix.io/apQ

However, when I try to export to HTML, I get Invalid format string

Can anyone spot the problem in my setup file? http://ix.io/apQ

Thanks!


Re: [O] create/export a table + cell and table borders?

2014-02-09 Thread Nicolas Goaziou
Hello,

Sharon Kimble boudic...@talktalk.net writes:

 Is it possible, in org-mode, to create a table and export it to a
 'foobar.txt' but showing the table borders and cell borders please?
 I couldn't find any mention of it in the org-mode manual, but that
 doesn't mean that it can't be done.

  | / |  |  |
  |---++---|
  |   | a  | b |
  |---++---|
  |   | c  | d |
  |---++---|

See (info (org) Column groups)

First and last rules are not required if you export to UTF-8.


Regards,

-- 
Nicolas Goaziou



Re: [O] Mismatch in url escaping between org and exported html

2014-02-09 Thread Mark Janssen
On Sun, Feb 9, 2014 at 9:56 PM, Mark Janssen mpc.jans...@gmail.com wrote:

 Hello list,

 If I insert a http:// link containing question marks, the verbatim link
 being inserted in the org document has the question mark escaped.



Seems (setq org-url-hexify-p nil) will give me the required behavior.

Mark


Re: [O] Proposal/request for input: slidify export for html slides

2014-02-09 Thread John Hendy
On Sat, Feb 8, 2014 at 11:18 AM, Charles Berry ccbe...@ucsd.edu wrote:

 I still think it makes sense to allow :eval no. This seems more
 Org-ish since the ideology is to have one set of Org syntax where
 possible, which translates to any number of languages. [...]

 In principal, it makes sense to map babel header args to knitr chunk
 options. At least when the headers arg and chunk option do about the
 same thing.

 But there is some effort and overhead involved, so only the most
 useful (IMO) have been mapped. Right now, `:noweb yes' will expand the
 reference(s) in place before export, and `:exports none' will not export
 the block. Maybe one day ...

Understood, and no worries. I'm making progress. When you say expand
references, I'm not sure I follow what that means. References =
references to variables? So something like :var something=something?


 More a matter of what my workflow is (so the issue doesn't arise). I use
 the cache=TRUE chunk option on the knitr side to save the results of long
 running computations. When I start work, I execute a src block that loads
 knitr and knits the *.Rnw (or *.Rmd, etc), which has the side effect of
 loading the cached objects. Then I edit the *.org document. If I am
 working on R code, I run the code interactively either from the src edit
 buffer or I C-c C-c the src block. Its handy to leave the results in the
 *.org buffer for reference - they get stripped on export. Maybe I edit
 a figure caption (knitr option fig.cap=R character object), equations,
 or text. When I am ready to see the formatted doc, I export via ravel,
 knit, and view. The cached objects get rebuilt as needed.

Ah. I think I follow this. If you knit the exported .org - Rmd file
in the same R session that Org is using, if you change the .org and
re-export to .Rmd, knitr is smart enough not to re-run the code? Is
that what you mean? That also must imply that export to .Rmd doesn't
execute any of the Org babel code, right (otherwise there would be no
benefit to your workflow since you'd be waiting for Org anyway)?

If that's the case, I think I could roll with that -- I'd just have
:eval yes if exporting to .Rmd - knitr, and do a replace-string to
:eval no if I was going to export to Beamer.

 My workflow might be odd in that I tend to futz with plot parameters
 once, get the desired image, and then set :eval no for the rest of my
 document work so I don't have to wait for plots on iterative exports.
 I try to put all my setup code (load packages, data
 reading/manipulation, etc.) in it's own block so that I can easily run
 that whenever I first open the document. From there I only need to
 re-run a plot block if necessary and I'll just temporarily change
 :eval no - yes and then back again after execution.


 Not odd at all if it saves you time.

 But if it takes long to rebuild the objects in that first src block, you
 might want to try the cache=TRUE route.

I'm a bit hung up on including non-code-generated images. I'm working
through one of my presentations to convert to slidify (and may write
up a Worg tutorial or just one on my blog to add to collective
knowledge) but am not sure of the right universal Org syntax that
will work with multiple backends. I'm most used to something like
this:

#+begin_center
#+attr_backend :height {6cm, 400px, etc.}
[[./path/to/image.png]]
#+end_center

That's not seeming to work with ox-ravel thus far. I'd love not to
have to change the Org image syntax to straight markdown just for my
occasional use of slidify.


Thanks again -- you've been immensely helpful in getting me started!
John



 Chuck

 p.s. the weird fontification you noted one posting up in this thread seems
 like something to raise with the slidify/knitr devs after checking the
 *.Rmd to be sure there is no org/ravel induced problem.


Will do, but I'm really thinking it's got to be crud that exported
from my various latex lines/settings. If things persist after making
sure none of that made it through to .Rmd, I'll submit an example file
to either knitr or slidify github issues.






Re: [O] external setup file for org-html-preamble?

2014-02-09 Thread Nicolas Goaziou
Hello,

Peter Salazar cycleofs...@gmail.com writes:

 Just now for simplicity, I'm trying to move the preamble and postamble to
 an external setup file.

 In my org-mode file, I now have

 #+SETUPFILE: setup.org

 and my setup.org file looks like this: http://ix.io/apQ

 However, when I try to export to HTML, I get Invalid format string

 Can anyone spot the problem in my setup file? http://ix.io/apQ

You need to escape % in the first BIND value. See
`org-html-preamble-format' docstring.


Regards,

-- 
Nicolas Goaziou



Re: [O] Include heading title in HTML section-number cross-reference, like LaTex \nameref?

2014-02-09 Thread Nicolas Goaziou
D. C. Toedt d...@toedt.com writes:

 --- is there a comparable one (or arguments) to get the section number of a
 heading?

There is `org-export-get-headline-number' but is only accessible during
export, so it cannot be called from a macro or a Babel block.

Anyway, in your case, you just need to use [[#custom-id]].


Regards,

-- 
Nicolas Goaziou



Re: [O] [RFC] Proposal for rebindings in Org 8.3

2014-02-09 Thread Nick Dokos
Tim O'Callaghan t...@dspsrv.com writes:


 Rasmus ras...@gmx.us writes:

 For me the following keys need shift or Alt-Gr: ^, , `, !, ?, and
 ~.

 Oh, do you really need the Alt-Gr key for `?' and `!' ?

 Does that mean you don't use `C-c !' or that you rarely use it?

 Of course, this may have nothing to do with the keybinding itself,
 but I'm curious.


 If i can throw in my 2-cents, I have been using Alt-O or(Meta-O if you
 prefer) for a Ctrl-C, Ctrl-C substitute in org-mode for years. Now i
 use a combination of an activation key (Alt-O or f4) and a kind of
 fast-key mnemonic map. I need mnemonics because there is just too much
 in org-mode, and i prefer to just type an extra key rather than have
 to bend to hit a semi-random modifier + cryptic keymap entry.

 so:
 Alt+o,a = agenda,
 Alt+o,0 = capture - inbox
 Alt+o,1 = agenda file 1
 
 Alt+o, A,h = agenda - home tag
 Alt+o,T,c = org table convert region
 Alt+o,T,C,b = org table convert buffer.
 

 Basically, two keys to most used personal functions. To save the
 pinkies, alt and shift are the only modifiers. alt for the activator,
 and shift to dig into a personalised sub-menu.  I tried binding to
 FNkeys, but i could not memorise them. the ah = at home comes
 naturally to me.

 I for one will follow this idea with interest.


I have a similar setup.

I use f7 as a prefix key for many org operations (personal ones as
well as generic ones, mostly the less common ones but also a few of
the very common: e.g. I use f7f7 instead of `C-c a a').

One problem I had was that there are lots of things under that keymap
that I didn't use often enough to memorise, so I would end up looking in
my keydefs file to figure out where some operation was (and no, I can't
remember the names of the functions either...)

I recently found out that if after f7 I press C-h, I get a description
of the keymap. That's probably well known in some circles, but I only
found out about it recently, reading the Key Binding Conventions
section in the elisp manual:

,
|* Don't bind `C-h' following any prefix character (including `C-c').
|  If you don't bind `C-h', it is automatically available as a help
|  character for listing the subcommands of the prefix character.
`

That's *very* useful to me - if you don't know about it already, try it:
I think you'll find it very useful too!

-- 
Nick




[O] Proposal for images in markdown export (ox-md)

2014-02-09 Thread John Hendy
Hi,


I've been playing around with the ox-md lately and wondered about the
idea of shifting the exported image syntax if any html options are
present. While the markdown file could be changed prior to re-export
to something else, it would seem that specifying options in Org might
imply they want might want those options applied to the markdown file
as well.

Or I'm perhaps wrong about this given the aim of markdown, but in that
case I'd at least propose a change to the current behavior of
#+begin/end_center.

The current behavior is such that no image attributes can be specified
(that I've found), which sort of makes sense given that markdown
doesn't have any image tweaking syntax. If you google around on how to
do this, the answer is simply to use straight img ...  html instead
of the typical ![description](/path/to/image.png) format.

So, my proposal would be that if either are present, Org could
(should?) use html image specifications instead of markdown.

2) Behavior with centering:

- org

#+begin_center
[[./img.png]]
#+end_center

- exported to markdown (doesn't work when converting to .html)

div class=center
![nil](./img.png)
/div

2) attributes

- org

#+attr_html: :style display: block; margin-left: auto; margin-right:
auto; height: 400px
[[./img.png]]

- markdown

![nil](./img.png)

The second works in that the image is displayed as-is from the file.
For conversion from .md to something else, this only works if the
image is the exact size required for the resultant document. I'd
prefer not to have to resize every image I want to use in a markdown
document just for that markdown document.

I'm a bit confused about the div behavior, as I've encountered at
least one suggestion that this should work, but at least with knitr
and knit2html, this doesn't render properly (it just prints the
verbatim text, ![nil](./img.png)).
- http://stackoverflow.com/a/1228126/495990

Is there a reason Org uses this for #+begin_center?

The documentation says that the html backend behavior will be used
where ox-md doesn't have support, and the html behavior for
#+begin/end_center is to export an image like so:

div class=figurepimg ... //div

There's corresponding css in the header for the figure class:

.figure { padding: 1em; }
.figure p { text-align: center; }

Based, on this, one *might* make the case that ox-html should take
over when attributes are specified. Just one thought process :)


Thanks for any feedback,
John



Re: [O] [RFC] Proposal for rebindings in Org 8.3

2014-02-09 Thread Thomas S. Dye
Bastien b...@gnu.org writes:

 A few comments on the last three:

 -  is not a punctuation character, I find C-c  instead of C-c ' good.

Is it true that  is not a punctuation character? 

In any event, C-c  is likely to pose the same problem as C-c '.  For
icicle users, C-c  will be shadowed by the keybinding for
icicle-search-text-property.

At least that's my current working hypothesis.  Feel free to correct me
if I'm wrong.

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



[O] day boundaries later than midnight?

2014-02-09 Thread Adam Spiers
Hi all,

I found this thread from 2006 which talked about the possibility of
org-agenda considering day boundaries later than midnight:

  http://permalink.gmane.org/gmane.emacs.orgmode/369

I'm surely not the only night owls who regularly completes (or even
schedules) tasks after midnight but before going to sleep.  Yes, I
know it's the healthiest way to live - but realistically it would be
far more useful for me if org-agenda treated something like 4am as the
day boundary.  I understand from that thread that supporting this is
technically quite tricky.  Did any progress ever get made on this
front since 2006, and if not, is it ever likely to?

Thanks!
Adam



[O] Equation references using RefTex

2014-02-09 Thread Stephen J. Barr
Hello,

My apologies if this is a redundant topic but having searched the
mailing list archives, it is not clear what the state of the art is at
this time.

I am trying to use org-mode as a replacement for tex and auctex/reftex,
but I really miss the ability of reftex to keep track of equation
labels. Can reftex keep track of equation labels in an org-mode
document? I would love to be able to do C-c = and have identical
behavior in org-mode and latex. Is anyone working on this? How can I
help?

Thanks,
Stephen


-- 
Sent with my mu4e




Re: [O] [babel] shell does not unquote

2014-02-09 Thread Eric Schulte
Samuel Wales samolog...@gmail.com writes:

 hi eric,

 the object is to make the code inside a babel shell block as similar
 to a real shell script as possible.  also, calling it using #+call
 should be like calling it from another shell script.

 this isn't possible in babel at present.

 the script cannot use $@ for its positional parameters.  it could
 use noweb, but that requires the creation of an extraneous block
 merely to do a call, instead of supplying the value in the call line.


A couple of languages already support a :cmdline header argument.  I've
just added shell block support for :cmdline, so the following is now
possible.

#+begin_src sh :cmdline foo bar baz
echo $2
#+end_src

#+RESULTS:
: bar


 if making this possible is not desirable, then i will not request it,
 but i wanted to explain why this object is not achieved with existing
 babel options that i am aware of.


I hope the above is sufficient, if not I'm not personally able to do
much more on this front, although I'm always happy to review patches.

Best,


 thanks.

 samuel

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] mis-alignment in org-tables with Tibetan characters

2014-02-09 Thread Eric Abrahamsen
Bastien b...@gnu.org writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 I've been using that patch or something like it for nearly a year now,
 with no adverse effects. I'm on the road right now, give me a day and
 I'll take a closer look at what I've got...

 Great -- thanks in advance!  I'll then wait before releasing a new
 minor version and merging it into Emacs for Emacs 24.4.

 To other core maintainers: if you see important issues that needs to
 be fixed in maint, let me know.

Sorry this took a while to get to...

I think it was a little simpler than I thought -- at least I hope that's
true, and I'm not missing something really obvious. There are two
patches attached, a simple one that handles re-justification of table
fields during field movement, and another that allows for narrowing of
columns with double-width strings. The second patch is uglier, and
doesn't work 100% well (you get misalignment if you try to narrow a
double-wide to an odd number of single-width characters), but it's
better than nothing.

Please test!

Eric

From f03f4755b2d3e62d9f88845d93390a364805c131 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Wed, 13 Feb 2013 11:56:18 +0800
Subject: [PATCH 1/9] Make table field justification respect string width

---
 lisp/org-table.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 520ac8a..33ae63e 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -973,14 +973,16 @@ Optional argument NEW may specify text to replace the current field content.
 	(progn
 	  (setq s (match-string 1)
 		o (match-string 0)
-		l (max 1 (- (match-end 0) (match-beginning 0) 3))
+		l (max 1
+			   (- (org-string-width
+			   (buffer-substring
+(match-end 0) (match-beginning 0))) 3))
 		e (not (= (match-beginning 2) (match-end 2
 	  (setq f (format (if num  %%%ds %s  %%-%ds %s)
 			  l (if e | (setq org-table-may-need-update t) ))
 		n (format f s))
 	  (if new
-		  (if (= (length new) l)  ;; FIXME: length - str-width?
+		  (if (= (org-string-width new) l)
 		  (setq n (format f new))
 		(setq n (concat new |) org-table-may-need-update t)))
 	  (if (equal (string-to-char n) ?-) (setq n (concat   n)))
-- 
1.8.5.4

From 85aee797a97194d9c29d7baac641f3849f7f Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen e...@ericabrahamsen.net
Date: Wed, 13 Feb 2013 16:46:33 +0800
Subject: [PATCH 2/9] Make table column narrowing play nice with variable-width
 strings

---
 lisp/org-table.el | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 33ae63e..32dd025 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -758,7 +758,7 @@ When nil, simply write \#ERROR\ in corrupted fields.)
 	 (hfmt1 (concat
 		 (make-string sp2 ?-) %s (make-string sp1 ?-) +))
 	 emptystrings links dates emph raise narrow
-	 falign falign1 fmax f1 len c e space)
+	 falign falign1 fmax f1 f2 len c e space)
 (untabify beg end)
 (remove-text-properties beg end '(org-cwidth t org-dwidth t display t))
 ;; Check if we have links or dates
@@ -843,10 +843,19 @@ When nil, simply write \#ERROR\ in corrupted fields.)
 		  (unless ( f1 1)
 		(user-error Cannot narrow field starting with wide link \%s\
 			   (match-string 0 xx)))
-		  (add-text-properties f1 (length xx) (list 'org-cwidth t) xx)
-		  (add-text-properties (- f1 2) f1
-   (list 'display org-narrow-column-arrow)
-   xx)
+		  (setq f2 (length xx))
+		  (if (= (org-string-width xx)
+			 f2)
+		  (setq f2 f1)
+		(setq f2 1)
+		(while ( (org-string-width (substring xx 0 f2))
+			  f1)
+		  (setq f2 (1+ f2
+		  (add-text-properties f2 (length xx) (list 'org-cwidth t) xx)
+		  (add-text-properties (if (= (string-width (substring xx (1- f2) f2)) 2)
+	   (1- f2) (- f2 2)) f2
+	   (list 'display org-narrow-column-arrow)
+	   xx)
   ;; Get the maximum width for each column
   (push (apply 'max (or fmax 1) 1 (mapcar 'org-string-width column))
 	lengths)
-- 
1.8.5.4



Re: [O] Proposal/request for input: slidify export for html slides

2014-02-09 Thread Charles Berry
John Hendy jw.hendy at gmail.com writes:

 
 On Sat, Feb 8, 2014 at 11:18 AM, Charles Berry ccberry at ucsd.edu wrote:
 
[snip]

  But there is some effort and overhead involved, so only the most
  useful (IMO) have been mapped. Right now, `:noweb yes' will expand the
  reference(s) in place before export, and `:exports none' will not export
  the block. Maybe one day ...
 
 Understood, and no worries. I'm making progress. When you say expand
 references, I'm not sure I follow what that means. References =
 references to variables? So something like :var something=something?
 

'References' refers to noweb references. See

   http://orgmode.org/org.html#noweb 


  More a matter of what my workflow is (so the issue doesn't arise). I use
  the cache=TRUE chunk option on the knitr side to save the results of 
  long
  running computations. When I start work, I execute a src block that 
  loads
  knitr and knits the *.Rnw (or *.Rmd, etc), which has the side effect of
  loading the cached objects. Then I edit the *.org document. If I am
  working on R code, I run the code interactively either from the src edit
  buffer or I C-c C-c the src block. Its handy to leave the results in the
  *.org buffer for reference - they get stripped on export. Maybe I edit
  a figure caption (knitr option fig.cap=R character object), equations,
  or text. When I am ready to see the formatted doc, I export via ravel,
  knit, and view. The cached objects get rebuilt as needed.
 
 Ah. I think I follow this. If you knit the exported .org - Rmd file
 in the same R session that Org is using, if you change the .org and
 re-export to .Rmd, knitr is smart enough not to re-run the code? Is
 that what you mean? 

Almost. ox-ravel does not call knitr. The ravel backends advice 
`org-babel-exp-do-export' when a ravel backend runs so R code src blocks 
are not run, but are turned into chunks (for knitr, Sweave, or ...) and 
exported as such. 

When you want to actually process the resulting document, you have to call 
on knitr or some other R report generator to do the work.

 That also must imply that export to .Rmd doesn't
 execute any of the Org babel code, right (otherwise there would be no
 benefit to your workflow since you'd be waiting for Org anyway)?

Correct for R src blocks. But emacs-lisp and other languages are treated as 
under the parent backends.

 
 If that's the case, I think I could roll with that -- I'd just have
 :eval yes if exporting to .Rmd - knitr, and do a replace-string to
 :eval no if I was going to export to Beamer.
 

In R scr blocks, :eval is ignored by ravel and so need not change when 
ravel is run.

[snip]

 I'm a bit hung up on including non-code-generated images. I'm working
 through one of my presentations to convert to slidify (and may write
 up a Worg tutorial or just one on my blog to add to collective
 knowledge) but am not sure of the right universal Org syntax that
 will work with multiple backends. I'm most used to something like
 this:
 
 #+begin_center
 #+attr_backend :height {6cm, 400px, etc.}
 [[./path/to/image.png]]
 #+end_center
 
 That's not seeming to work with ox-ravel thus far. I'd love not to
 have to change the Org image syntax to straight markdown just for my
 occasional use of slidify.
 

It's not related to ox-ravel, which uses the same transcoders as the parent 
backends for everything except inline src and src blocks.

I'm not sure how to get what you seem to want.

Maybe use a custom link 

  http://orgmode.org/org.html#Adding-hyperlink-types

or ask about html/md links in a fresh thread?

HTH,

Chuck




Re: [O] Proposal/request for input: slidify export for html slides

2014-02-09 Thread John Hendy
On Sun, Feb 9, 2014 at 10:16 PM, Charles Berry ccbe...@ucsd.edu wrote:
 John Hendy jw.hendy at gmail.com writes:


 On Sat, Feb 8, 2014 at 11:18 AM, Charles Berry ccberry at ucsd.edu wrote:

 [snip]


 Ah. I think I follow this. If you knit the exported .org - Rmd file
 in the same R session that Org is using, if you change the .org and
 re-export to .Rmd, knitr is smart enough not to re-run the code? Is
 that what you mean?

 Almost. ox-ravel does not call knitr. The ravel backends advice
 `org-babel-exp-do-export' when a ravel backend runs so R code src blocks
 are not run, but are turned into chunks (for knitr, Sweave, or ...) and
 exported as such.

 When you want to actually process the resulting document, you have to call
 on knitr or some other R report generator to do the work.


I think I stated it ambiguously before. I think we're on the same
page. Org - Rmd. Then process Rmd in an Emacs R session. If you
re-export from Org - Rmd, only new code block changes are re-run,
correct?

 That also must imply that export to .Rmd doesn't
 execute any of the Org babel code, right (otherwise there would be no
 benefit to your workflow since you'd be waiting for Org anyway)?

 Correct for R src blocks. But emacs-lisp and other languages are treated as
 under the parent backends.


 If that's the case, I think I could roll with that -- I'd just have
 :eval yes if exporting to .Rmd - knitr, and do a replace-string to
 :eval no if I was going to export to Beamer.


 In R scr blocks, :eval is ignored by ravel and so need not change when
 ravel is run.

Ah, that makes more sense. I guess I had all mine set to :eval no and
never experienced that ox-ravel doesn't actually run them. Thanks for
that.


 [snip]

 I'm a bit hung up on including non-code-generated images. I'm working
 through one of my presentations to convert to slidify (and may write
 up a Worg tutorial or just one on my blog to add to collective
 knowledge) but am not sure of the right universal Org syntax that
 will work with multiple backends. I'm most used to something like
 this:

 #+begin_center
 #+attr_backend :height {6cm, 400px, etc.}
 [[./path/to/image.png]]
 #+end_center

 That's not seeming to work with ox-ravel thus far. I'd love not to
 have to change the Org image syntax to straight markdown just for my
 occasional use of slidify.


 It's not related to ox-ravel, which uses the same transcoders as the parent
 backends for everything except inline src and src blocks.

 I'm not sure how to get what you seem to want.


What I mean is how do I just add an image via existing Org syntax and
get it sized correctly in the Org - Rmd - html process? None of the
attributes seem to be carried through to markdown with ox-md or
ox-ravel. So my question might be more clear if I said, Say you have
an image that's 1600x900px and you want it in your slidify deck at
400px tall. How would you do that?

ox-ravel works fine by just specifying knitr fig.height/width if
you're going to generate your plots during the process of knitting.
You create the plot at exactly the size you want. But how might you
resize an existing plot depending on the format? If you want an html
equivalent to the latex article class, you might want a different plot
size than if you want to export to slidify. Would one have to go
through and replace all the fig.height/width arguments and re-run all
the plot code just to get proper image sizing? Once there are
perfectly good images laying around... it doesn't seem like one should
have to re-generate them just because a different size is desired.

 Maybe use a custom link

   http://orgmode.org/org.html#Adding-hyperlink-types

 or ask about html/md links in a fresh thread?

I posted another ML post along these lines earlier today. Since
markdown is just a middle destination onto html, I'm interested in
getting Org's built-in image attributes passed along for the whole
trip. I don't see a way to even center an image at present. The direct
img  tag could be put in Org... but that breaks the spirit of
keeping Org's syntax flexible enough to let me export to another
backend if I want. Thus, the ideal goal would be something like:

#+begin_center
#+attr_latex: :height 6cm
#+attr_html: :height 400px
#+attr_ravel: :height 400px
[[./img.png]]
#+end_center

Thus I get a centered image at some appropriate size for each backend.
Otherwise I'll be having to do #+begin/end_latex and #+begin/end_html
for every image in my document.

Does that make more sense?


John


 HTH,

 Chuck





Re: [O] external setup file for org-html-preamble?

2014-02-09 Thread Peter Salazar
Yes! That was exactly it! Thank you.




On Sun, Feb 9, 2014 at 5:33 PM, Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,

 Peter Salazar cycleofs...@gmail.com writes:

  Just now for simplicity, I'm trying to move the preamble and postamble to
  an external setup file.
 
  In my org-mode file, I now have
 
  #+SETUPFILE: setup.org
 
  and my setup.org file looks like this: http://ix.io/apQ
 
  However, when I try to export to HTML, I get Invalid format string
 
  Can anyone spot the problem in my setup file? http://ix.io/apQ

 You need to escape % in the first BIND value. See
 `org-html-preamble-format' docstring.


 Regards,

 --
 Nicolas Goaziou



[O] copy title text string from #+TITLE field?

2014-02-09 Thread Peter Salazar
Next question: is there a way to take the text from the #+TITLE: field of
an org file and insert it, as text, somewhere else within the file (i.e.
inside an HTML block)?

I can't do this manually because my various org files all use an #+INCLUDE:
reference to the same org file, which contains some HTML blocks. For each
different org file, I'd like to copy the title text string from #+TITLE
field and insert it inside an H1/H1 field in an HTML block in the
included file.

Is this possible? Thanks!


Re: [O] copy title text string from #+TITLE field?

2014-02-09 Thread Nick Dokos
Peter Salazar cycleofs...@gmail.com writes:

 Next question: is there a way to take the text from the #+TITLE: field
 of an org file and insert it, as text, somewhere else within the file
 (i.e. inside an HTML block)? 

 I can't do this manually because my various org files all use an
 #+INCLUDE: reference to the same org file, which contains some HTML
 blocks. For each different org file, I'd like to copy the title text
 string from #+TITLE field and insert it inside an H1/H1 field in
 an HTML block in the included file.

 Is this possible? Thanks!


{{{title}}}  should do it. See

(info (org) Macro replacement)

-- 
Nick




Re: [O] copy title text string from #+TITLE field?

2014-02-09 Thread Nick Dokos
Nick Dokos ndo...@gmail.com writes:

 Peter Salazar cycleofs...@gmail.com writes:

 Next question: is there a way to take the text from the #+TITLE: field
 of an org file and insert it, as text, somewhere else within the file
 (i.e. inside an HTML block)? 

 I can't do this manually because my various org files all use an
 #+INCLUDE: reference to the same org file, which contains some HTML
 blocks. For each different org file, I'd like to copy the title text
 string from #+TITLE field and insert it inside an H1/H1 field in
 an HTML block in the included file.

 Is this possible? Thanks!


 {{{title}}}  should do it. See

 (info (org) Macro replacement)

Actually, I'm not sure it will do: macro replacement takes place during
export, so it may or may not be enough, depending on what you really
want to do.

-- 
Nick




[O] bug#5753: something, something, org-mode, shift-select, something

2014-02-09 Thread Bastien
Hi Jackson,

thanks for your thorough reply.

Can you try the two recipes I gave here:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5753#26

and tell me where it does not produce the expected output?

Thanks in advance,

-- 
 Bastien