From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47273 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: emacs Date: Thu, 5 Feb 2009 16:06:59 +0100 (CET) Message-ID: References: <20081021224645.GS29313@atos.labs.wmid.amu.edu.pl> <20081022053132.GA11737@gaston.couberia.bzh> <20081022061808.GA21389@atos.labs.wmid.amu.edu.pl> <20081023210820.GA20122@gaston.couberia.bzh> <20081023224638.GO21389@atos.labs.wmid.amu.edu.pl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233846540 29423 80.91.229.12 (5 Feb 2009 15:09:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2009 15:09:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 05 16:10:14 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LV5rh-0006GW-N1 for gctc-ntg-context-518@m.gmane.org; Thu, 05 Feb 2009 16:10:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E0BAD1FB6B; Thu, 5 Feb 2009 16:08:44 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12755-05; Thu, 5 Feb 2009 16:07:41 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D8F241FB71; Thu, 5 Feb 2009 16:07:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D01921FB71 for ; Thu, 5 Feb 2009 16:07:38 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13530-06 for ; Thu, 5 Feb 2009 16:07:02 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by ronja.ntg.nl (Postfix) with ESMTP id 47B871FB6B for ; Thu, 5 Feb 2009 16:07:02 +0100 (CET) Original-Received: from smtp27.orange.fr (smtp27.orange.fr [80.12.242.96]) by filter4-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n15F70SI003566 for ; Thu, 5 Feb 2009 16:07:01 +0100 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2719.orange.fr (SMTP Server) with ESMTP id 8E2631C000B0 for ; Thu, 5 Feb 2009 16:07:00 +0100 (CET) Original-Received: from gaston.couberia.bzh (ARennes-358-1-131-117.w92-129.abo.wanadoo.fr [92.129.90.117]) by mwinf2719.orange.fr (SMTP Server) with ESMTP id 4B8B01C00098 for ; Thu, 5 Feb 2009 16:07:00 +0100 (CET) X-ME-UUID: 20090205150700309.4B8B01C00098@mwinf2719.orange.fr Original-Received: by gaston.couberia.bzh (Postfix, from userid 1000) id B4CA1300CE; Thu, 5 Feb 2009 16:06:59 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by gaston.couberia.bzh (Postfix) with ESMTP id A0C47300BF for ; Thu, 5 Feb 2009 16:06:59 +0100 (CET) X-X-Sender: peter@gaston.couberia.bzh In-Reply-To: <20081023224638.GO21389@atos.labs.wmid.amu.edu.pl> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.96; country=FR; region=A7; city=Moulineaux; latitude=49.3500; longitude=0.9667; http://maps.google.com/maps?q=49.3500,0.9667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 175613995 - bd7a5ae6ec38 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:47273 Archived-At: On Fri, 24 Oct 2008, Marcin Borkowski wrote: > > > * Unlike when editing LaTeX files, it does not insert an \item when > > > doing C-c C-e itemize. I use itemizations a lot and this is a bit > > > annoying, especially that I got used to its behaior when doing LaTeX. > > > Also, having C-c C-j asking about the (optional) label all the time is > > > also tiring, I would prefer to be asked for it only with C-u C-c C-j. > > > > This is also annoying to me. I'll try to solve this, should no be too > > complicated I think (only problem I have, is no spare time, just like > > you...). > > That would be great, also from the point of view of learning elisp... Hello, Here some code that you can attach to your .emacs file (just a copy from auctex with minor modifications): (require 'context-en) (defun ConTeXt-en-mode-initialization () "ConTeXt english interface specific initialization." (mapcar 'ConTeXt-add-environments (reverse ConTeXt-environment-list-en)) (TeX-add-symbols '("but" ConTeXt-arg-define-ref (TeX-arg-literal " ")) '("item" (TeX-arg-literal " ")) '("items" [ConTeXt-arg-setup] (TeX-arg-string "Comma separated list")) '("its" ConTeXt-arg-define-ref (TeX-arg-literal " ")) '("nop" (TeX-arg-literal " ")) '("ran" TeX-arg-string (TeX-arg-literal " ")) '("sub" ConTeXt-arg-define-ref (TeX-arg-literal " ")) '("sym" (TeX-arg-string "Symbol") (TeX-arg-literal " ")))) (defun ConTeXt-insert-environment (environment &optional extra) "Insert ENVIRONMENT, with optional argument EXTRA." (if (and (TeX-active-mark) (not (eq (mark) (point)))) (save-excursion (if (< (mark) (point)) (exchange-point-and-mark)) (insert TeX-esc (ConTeXt-environment-start-name) environment) (newline) (forward-line -1) (indent-according-to-mode) (if extra (insert extra)) (goto-char (mark)) (or (TeX-looking-at-backward "^[ \t]*") (newline)) (insert TeX-esc (ConTeXt-environment-stop-name) environment) (newline) (forward-line -1) (indent-according-to-mode) ;;(goto-char (point)) ) (or (TeX-looking-at-backward "^[ \t]*") (newline)) (insert TeX-esc (ConTeXt-environment-start-name) environment) (indent-according-to-mode) (if extra (insert extra)) (end-of-line) (newline-and-indent) (if (string-equal environment "itemize") (ConTeXt-insert-item)) (newline) (insert TeX-esc (ConTeXt-environment-stop-name) environment) (or (looking-at "[ \t]*$") (save-excursion (newline-and-indent))) (indent-according-to-mode) (end-of-line 0))) Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________