From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fabrice Niessen" Subject: Re: AUCTeX key bindings within Org documents Date: Mon, 21 Oct 2013 22:06:59 +0200 Message-ID: <86vc0qfkws.fsf@somewhere.org> References: <86zjqyse63.fsf@somewhere.org> <20130927142424.4a0f9b27@aga-netbook> <8661tlgy2w.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <8661tlgy2w.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org> (Fabrice Niessen's message of "Sat, 28 Sep 2013 10:16:55 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: Fabrice Niessen Cc: public-emacs-orgmode-mXXj517/zsQ-wOFGN7rlS/M9smdsby/KFg@public.gmane.org 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