Re: [O] AUCTeX key bindings within Org documents

2013-10-21 Thread Fabrice Niessen


Hello,

Fabrice Niessen wrote:
 Due to a friend's request, I've tried to offer AUCTeX key bindings
 within Org documents via a minor mode, called org-auctex-keys.
 
 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.
 
 Note that I'm willing to add extra AUCTeX keys -- but I don't use
 AUCTeX enough to know what's important to transfer to Org.

I've updated `org-auctex-keys' in the following way:

- `C-c C-c' runs a menu which looks a lot like AUCTeX's menu: pressing once the
  key binding calls the export process (that is, generates a PDF file);
  pressing a second time will display it (if available).

  Extra optimization: if the PDF files is newer than the Org file, then
  pressing `C-c C-c' will display it (avoiding to redo it).

- As there are a lot of conflicts between Org and AUCTeX keys, you now can call
  the standard Org command by prefixing the key binding with a `C-u' argument.
  Note that the first `C-u' is not passed onto the standard command.

  For example,

  + C-c C-c  calls my command `org-auckeys-export-dispatch'
  + C-u C-c C-c  calls the original `org-ctrl-c-ctrl-c' with no `C-u' 
arg (= 1)
  + C-u C-u C-c C-c  calls the original `org-ctrl-c-ctrl-c' with 1 `C-u' 
arg (= 4)
  + C-u C-u C-u C-c C-c  calls the original `org-ctrl-c-ctrl-c' with 2 `C-u' 
arg (= 16)
  + etc. (provided it makes sense)

- I've added a key binding to turn off/on Org AUCKeys: `C-+'.

  So, to call a standard Org command, you can as well disable
  `org-auctex-keys', pressing the key binding you know in standard Org, and
  re-enable `org-auctex-keys', that is:

C-+ C-c C-c C-+

  to call `org-ctrl-c-ctrl-c'.

Fabrice Niessen

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-10-05 Thread Joseph Vidal-Rosset
Hello Fabrice, Hi everybody,

Thanks a lot Fabrice for your  package to get AUCTeX key binginds within
Org documents. 

Maybe I  do not  use it correctly  by I  want to point  out to  you some
unwanted results: 

#+begin_equation
 \label{ECQ}
\neg A , A \vdash B
\tag{ECQ}
#+end_equation

exported in LaTeX is translated in .tex file:

\begin{equation}
\label{ECQ}
$\neg{}$ A , A \vdash B
\tag{ECQ}
\end{equation} 

and of course it does not work. 

My question is therefore more  general: how writing scienfific papers in
org-mode documents  i.e. how writing useful  environments like equation,
bussproofs,   fitch,   etc.   every  useful   package   for   logicians,
mathematicians, etc.  ? 

In advance, thanks for your help. 

Jo. 

-- 
Joseph Vidal-Rosset
Archives Poincaré 
91, Bd. Libération
BP 454 
F-54001 NANCY Cedex

Site web: http://www.philfree.org
Google Talk - MSN login: joseph.vidal.ros...@gmail.com



Re: [O] AUCTeX key bindings within Org documents

2013-10-05 Thread Fabrice Niessen
Hi Joseph,

Joseph Vidal-Rosset wrote:
 Thanks a lot Fabrice for your  package to get AUCTeX key binginds within
 Org documents. 

You're welcome. Still a work in progress -- have to address the points of
Nicolas, Suvayu and Marcin, among others.

 Maybe I  do not  use it correctly  by I  want to point  out to  you some
 unwanted results: 

 #+begin_equation
  \label{ECQ}
 \neg A , A \vdash B
 \tag{ECQ}
 #+end_equation

 exported in LaTeX is translated in .tex file:

 \begin{equation}
 \label{ECQ}
 $\neg{}$ A , A \vdash B
 \tag{ECQ}
 \end{equation} 

 and of course it does not work. 

 My question is therefore more  general: how writing scienfific papers in
 org-mode documents  i.e. how writing useful  environments like equation,
 bussproofs,   fitch,   etc.   every  useful   package   for   logicians,
 mathematicians, etc.  ? 

I don't have experience with mathematics in Org nor in LaTeX. The problem you
point out does not seem to be related in any way to org-auctex-keys.el, though.

Could you try different variations of your code: all the inside code on one
line, or all lines with indentation (I see that \neg is not indented), or...
and see whether some work.

This should anyway be reported as a separate problem from the AUCTeX key
bindings.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-10-05 Thread Joseph Vidal-Rosset
2013/10/5 Fabrice Niessen fni-n...@pirilampo.org

 I don't have experience with mathematics in Org nor in LaTeX. The problem
you
 point out does not seem to be related in any way to org-auctex-keys.el,
though.


Yes, you are probably right. But the problem lies in the fact that org-mode
syntax environment produces this result:

#+begin_equation ... #+end_equation   contrary to latex syntax
 \begin{equation}  ... \end{equation} , have side effects.

And the question is then why is it nececessary to adopt another syntax
environment in org-mode  ?

 Could you try different variations of your code: all the inside code on
one
 line, or all lines with indentation (I see that \neg is not indented),
or...
 and see whether some work.

I've tried it. One gets the same result.

Best

Jo.


Re: [O] AUCTeX key bindings within Org documents

2013-10-05 Thread Nicolas Richard
Hello Joseph,

Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:
 #+begin_equation
  \label{ECQ}
 \neg A , A \vdash B
 \tag{ECQ}
 #+end_equation

IIUC, auckeys mode is not meant to insert latex constructs in org mode,
but to get an org equivalent or org-like effect for a given key chord.
The aim is to produce a classical org mode file, not a LaTeX only org
mode file.

 My question is therefore more  general: how writing scienfific papers in
 org-mode documents  i.e. how writing useful  environments like equation,
 bussproofs,   fitch,   etc.   every  useful   package   for   logicians,
 mathematicians, etc.  ? 

I never managed to do that in pure org mode : I sometimes write the
outline in org but at some point I export to latex and go on from there.
I'm so much more comfortable in auctex and latex, I have no plan to try
doing everything in org mode.

-- 
Nico.



Re: [O] AUCTeX key bindings within Org documents

2013-10-05 Thread Joseph Vidal-Rosset
Thanks Nicolas, your reply is helpful for me .

Best wishes,

Jo.

2013/10/5 Nicolas Richard theonewiththeevill...@yahoo.fr:
 Hello Joseph,

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:
 #+begin_equation
  \label{ECQ}
 \neg A , A \vdash B
 \tag{ECQ}
 #+end_equation

 IIUC, auckeys mode is not meant to insert latex constructs in org mode,
 but to get an org equivalent or org-like effect for a given key chord.
 The aim is to produce a classical org mode file, not a LaTeX only org
 mode file.

 My question is therefore more  general: how writing scienfific papers in
 org-mode documents  i.e. how writing useful  environments like equation,
 bussproofs,   fitch,   etc.   every  useful   package   for   logicians,
 mathematicians, etc.  ?

 I never managed to do that in pure org mode : I sometimes write the
 outline in org but at some point I export to latex and go on from there.
 I'm so much more comfortable in auctex and latex, I have no plan to try
 doing everything in org mode.

 --
 Nico.



Re: [O] AUCTeX key bindings within Org documents

2013-10-02 Thread Nicolas Richard
AW alexander.will...@t-online.de writes:
 How can I get it switched on in every org-buffer automagically?

You can do this :
(add-hook 'org-mode-hook 'org-auctex-keys-minor-mode)

-- 
Nico.



Re: [O] AUCTeX key bindings within Org documents

2013-10-02 Thread Nicolas Richard
Marcin Borkowski mb...@wmi.amu.edu.pl writes:
 C-c C-c was my idea - but now I've read this, I agree, this might be
 not a brilliant one.  OTOH, C-c C-e got rebound to
 org-auckeys-environment...  Dunno.

Could trigger export in org-ctrl-c-ctrl-c-final-hook, i.e. if nothing
else worked.

-- 
Nico.



Re: [O] AUCTeX key bindings within Org documents

2013-10-02 Thread Marcin Borkowski
Dnia 2013-10-02, o godz. 13:36:22
Nicolas Richard theonewiththeevill...@yahoo.fr napisał(a):

 Marcin Borkowski mb...@wmi.amu.edu.pl writes:
  C-c C-c was my idea - but now I've read this, I agree, this might be
  not a brilliant one.  OTOH, C-c C-e got rebound to
  org-auckeys-environment...  Dunno.
 
 Could trigger export in org-ctrl-c-ctrl-c-final-hook, i.e. if nothing
 else worked.

This /seems/ to me a very good idea!

Best,

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



Re: [O] AUCTeX key bindings within Org documents

2013-10-01 Thread Suvayu Ali
Hi Fabrice,

On Sun, Sep 29, 2013 at 08:47:09PM +0200, Fabrice Niessen wrote:

 | C-c C-c | org-export-dispatch|

You might want to avoid this.  By default, Org uses it to do smart
stuff: update local setup, enumerated lists, statistics cookies,
complete capture, evaluate current source block, ... basically it is a
context aware all purpose keybinding.  I don't think it is wise to lose
all that for a command like export that should work from anywhere in the
buffer.

FWIW, achieving one-to-one mapping may not be possible.  After all both
AUCTeX and Org are rather complicated packages that do a lot of smart
things.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] AUCTeX key bindings within Org documents

2013-10-01 Thread AW
Am Freitag, 27. September 2013, 13:21:40 schrieb Fabrice Fabrice Niessen:
 Hello,
 
 Due to a friend's request, I've tried to offer AUCTeX key bindings within
 Org documents via a minor mode, called org-auctex-keys.
 
 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.
 
 Note that I'm willing to add extra AUCTeX keys -- but I don't use AUCTeX
 enough to know what's important to transfer to Org.
 
 Best regards,
 Fabrice

Wonderfull idea, thank you very much.

How can I get it switched on in every org-buffer automagically?

Regards,

Alexander



Re: [O] AUCTeX key bindings within Org documents

2013-10-01 Thread Marcin Borkowski
Dnia 2013-10-01, o godz. 17:08:49
Suvayu Ali fatkasuvayu+li...@gmail.com napisał(a):

 Hi Fabrice,
 
 On Sun, Sep 29, 2013 at 08:47:09PM +0200, Fabrice Niessen wrote:
 
  | C-c C-c | org-export-dispatch|
 
 You might want to avoid this.  By default, Org uses it to do smart
 stuff: update local setup, enumerated lists, statistics cookies,
 complete capture, evaluate current source block, ... basically it is a
 context aware all purpose keybinding.  I don't think it is wise to
 lose all that for a command like export that should work from
 anywhere in the buffer.
 
 FWIW, achieving one-to-one mapping may not be possible.  After all
 both AUCTeX and Org are rather complicated packages that do a lot of
 smart things.

C-c C-c was my idea - but now I've read this, I agree, this might be
not a brilliant one.  OTOH, C-c C-e got rebound to
org-auckeys-environment...  Dunno.

 Cheers,

Best,

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



Re: [O] AUCTeX key bindings within Org documents

2013-09-30 Thread Fabrice Niessen



Hello,

Fabrice Niessen wrote:
 Nicolas Richard wrote:
 Fabrice Niessen writes:
 Due to a friend's request, I've tried to offer AUCTeX key bindings within 
 Org
 documents via a minor mode, called org-auctex-keys.

 I checked that out because I often find myself doing C-c C-e while in
 org-mode, but I expected it would insert

 #+BEGIN_SRC latex
   \begin{prompted_env}

   \end{prompted_env}
 #+END_SRC
 instead of a new item.

 Why not?  It makes sense -- and the list item did not make such sense...

 OTOH, I don't really want such a feature, because when I do this, I
 usually realize that it's time for me to export the tree to LaTeX and go
 on from there.

 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.

 I see no licence, which I think (though IANAL) is equal to a strict and
 super restrictive copyright ; is that intended ?

 No, it's just that I'm lost when it comes down to copyrights, copylefts, and
 all the subtle meanings and implications of that.

 Any advice on what to put? The purpose is, of course, that it can be freely
 used, copied, etc.

FYI, I've added the suggested key bindings (from you and from Marcin), and
added a copyright (Emacs-alike).

Currently implemented:

| Shortcut| What it runs   |
|-+|
| C-c C-s | org-insert-heading |
| C-c C-j | org-insert-heading-respect-content |
| C-c C-f C-e | org-auckeys-font (emphasize)   |
| C-c C-f C-b | org-auckeys-font (bold)|
| C-c C-f C-t | org-auckeys-font (typewriter)  |
| C-c C-f C-i | org-auckeys-font (italic)  |
| C-c C-e | org-auckeys-environment|
| C-c C-c | org-export-dispatch|

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium





Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Fabrice Niessen
Hello Nicolas,

Nicolas Richard wrote:
 Fabrice Niessen writes:
 Due to a friend's request, I've tried to offer AUCTeX key bindings within Org
 documents via a minor mode, called org-auctex-keys.

 I checked that out because I often find myself doing C-c C-e while in
 org-mode, but I expected it would insert

 #+BEGIN_SRC latex
   \begin{prompted_env}

   \end{prompted_env}
 #+END_SRC
 instead of a new item.

Why not?  It makes sense -- and the list item did not make such sense...

 OTOH, I don't really want such a feature, because when I do this, I
 usually realize that it's time for me to export the tree to LaTeX and go
 on from there.

 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.

 I see no licence, which I think (though IANAL) is equal to a strict and
 super restrictive copyright ; is that intended ?

No, it's just that I'm lost when it comes down to copyrights, copylefts, and
all the subtle meanings and implications of that.

Any advice on what to put? The purpose is, of course, that it can be freely
used, copied, etc.

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Fabrice Niessen
Hello Marcin,

Marcin Borkowski wrote:
 Due to a friend's request, I've tried to offer AUCTeX key bindings
 within Org documents via a minor mode, called org-auctex-keys.
 
 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.
 
 Note that I'm willing to add extra AUCTeX keys -- but I don't use
 AUCTeX enough to know what's important to transfer to Org.

 Interesting idea - for me, especially C-c C-f bindings might be
 useful.  What might be missing:

 C-c C-f C-e emphasize, might just be equivalent to C-c C-f C-i

Already added.

 C-c C-j new item, might be equivalent to C-RET or something
 C-c C-c in AUCTeX, this just runs a TeX job.  Here it initiate export
 or something like that.

These will follow.

Thanks for your input...

Best regards,
Fabrice

-- 
Fabrice Niessen
Leuven, Belgium




Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Suvayu Ali
On Sat, Sep 28, 2013 at 10:15:28AM +0200, Fabrice Niessen wrote:
 
  If you're interested, check it out at
  https://github.com/fniessen/org-auctex-key-bindings.
 
  I see no licence, which I think (though IANAL) is equal to a strict and
  super restrictive copyright ; is that intended ?
 
 No, it's just that I'm lost when it comes down to copyrights, copylefts, and
 all the subtle meanings and implications of that.
 
 Any advice on what to put? The purpose is, of course, that it can be freely
 used, copied, etc.

I think Public Domain is the most open you can go.  Otherwise GPL v2
is always good.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Marcin Borkowski
Dnia 2013-09-28, o godz. 11:56:05
Suvayu Ali fatkasuvayu+li...@gmail.com napisał(a):

 On Sat, Sep 28, 2013 at 10:15:28AM +0200, Fabrice Niessen wrote:
  
   If you're interested, check it out at
   https://github.com/fniessen/org-auctex-key-bindings.
  
   I see no licence, which I think (though IANAL) is equal to a
   strict and super restrictive copyright ; is that intended ?
  
  No, it's just that I'm lost when it comes down to copyrights,
  copylefts, and all the subtle meanings and implications of that.
  
  Any advice on what to put? The purpose is, of course, that it can
  be freely used, copied, etc.
 
 I think Public Domain is the most open you can go.  Otherwise GPL
 v2 is always good.
 

Also, Creative Commons seem to be quite easy to understand (and most of
them are a bit more restrictive than PD, or CC0).  I'm not sure whether
they can apply to software, though.

Hth,

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



Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Achim Gratz

Am 28.09.2013 11:56, schrieb Suvayu Ali:

I think Public Domain is the most open you can go.


It isn't, simply because there is no way to put something into the 
public domain in many jurisdictions and what exactly is meant by public 
domain differs by jurisdiction as well.



 Otherwise GPL v2 is always good.


CC0 probably comes closest to public domain for most intents and 
purposes, although I don't think it has been tested in court as the GPL 
variants have been.  For Emacs, (L)GPL would be more appropriate and if 
integration into Emacs proper is desired, then you actually need to 
assign copyright to the FSF.



Achim.






Re: [O] AUCTeX key bindings within Org documents

2013-09-28 Thread Marcin Borkowski
Dnia 2013-09-28, o godz. 12:30:01
Achim Gratz strom...@nexgo.de napisał(a):

 Am 28.09.2013 11:56, schrieb Suvayu Ali:
  I think Public Domain is the most open you can go.
 
 It isn't, simply because there is no way to put something into the 
 public domain in many jurisdictions and what exactly is meant by
 public domain differs by jurisdiction as well.
 
   Otherwise GPL v2 is always good.
 
 CC0 probably comes closest to public domain for most intents and 
 purposes, although I don't think it has been tested in court as the
 GPL variants have been.  For Emacs, (L)GPL would be more appropriate
 and if integration into Emacs proper is desired, then you actually
 need to assign copyright to the FSF.

BTW: what are exactly the legal consequences of assigning copyright to
the FSF, especially (but not limited to) concerning copyright of future
works?  Is there any document on the web summarizing this?  (I'm asking
because there is at least one person around here who got very
dissatisfied with his FSF copyright assignment, and I'd prefer to know
what the pitfalls might be.)

And for the record: you might consider the LPPL (LaTeX Project Public
Licence), which is more liberal than GPL, but more restrictive than
PD (and need not be restricted to LaTeX-related works).

 Achim.

Best,

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



Re: [O] AUCTeX key bindings within Org documents

2013-09-27 Thread Nicolas Richard


Hello Fabrice,

Fabrice Niessen fni-news-TA4HMoP+1wHrZ44/dzw...@public.gmane.org
writes:
 Due to a friend's request, I've tried to offer AUCTeX key bindings within Org
 documents via a minor mode, called org-auctex-keys.

I checked that out because I often find myself doing C-c C-e while in
org-mode, but I expected it would insert
#+BEGIN_SRC latex
  \begin{prompted_env}

  \end{prompted_env}
#+END_SRC
instead of a new item.

OTOH, I don't really want such a feature, because when I do this, I
usually realize that it's time for me to export the tree to LaTeX and go
on from there.

 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.

I see no licence, which I think (though IANAL) is equal to a strict and
super restrictive copyright ; is that intended ?

Best wishes,

-- 
Nicolas.




Re: [O] AUCTeX key bindings within Org documents

2013-09-27 Thread Marcin Borkowski
Dnia 2013-09-27, o godz. 13:21:40
Fabrice Niessen fni-n...@pirilampo.org napisał(a):

 Hello,
 
 Due to a friend's request, I've tried to offer AUCTeX key bindings
 within Org documents via a minor mode, called org-auctex-keys.
 
 If you're interested, check it out at
 https://github.com/fniessen/org-auctex-key-bindings.
 
 Note that I'm willing to add extra AUCTeX keys -- but I don't use
 AUCTeX enough to know what's important to transfer to Org.

Interesting idea - for me, especially C-c C-f bindings might be
useful.  What might be missing:

C-c C-f C-e emphasize, might just be equivalent to C-c C-f C-i
C-c C-j new item, might be equivalent to C-RET or something
C-c C-c in AUCTeX, this just runs a TeX job.  Here it initiate export
or something like that.

 Best regards,
 Fabrice

Best,

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