From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24528 Path: news.gmane.org!not-for-mail From: Radhelorn Newsgroups: gmane.comp.tex.context Subject: Re: About \defineshortcut Date: Wed, 21 Dec 2005 00:37:45 +0300 Message-ID: <43A879A9.7080109@mail.ru> References: <43A1E0C1.7060307@mail.ru> <43A312FB.3080705@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135114712 23462 80.91.229.2 (20 Dec 2005 21:38:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2005 21:38:32 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 20 22:38:30 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EopAn-0003pg-AT for gctc-ntg-context-518@m.gmane.org; Tue, 20 Dec 2005 22:37:31 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CB2EE12877; Tue, 20 Dec 2005 22:37:28 +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 12985-02-5; Tue, 20 Dec 2005 22:37:23 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D7B5A12872; Tue, 20 Dec 2005 22:37:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 557FC12872 for ; Tue, 20 Dec 2005 22:37:22 +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 12985-02-4 for ; Tue, 20 Dec 2005 22:37:21 +0100 (CET) Original-Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by ronja.ntg.nl (Postfix) with ESMTP id 5FC5512860 for ; Tue, 20 Dec 2005 22:37:20 +0100 (CET) Original-Received: from [217.106.91.40] (port=37637 helo=[172.16.6.61]) by mx2.mail.ru with psmtp id 1EopAc-000Ii9-00 for ntg-context@ntg.nl; Wed, 21 Dec 2005 00:37:19 +0300 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43A312FB.3080705@elvenkind.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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:24528 Archived-At: Taco Hoekwater wrote: >> For example after command: >> >> \defineshortcut [//] [] [style=\em] > >> I can get slash only by \textslash (which is expected) and it breaks >> things like: >> >> \typefile {some/dir/file} >> >> So how to revert to previous meaning of '/'? It is possible to do it >> only temporarily? > > Explicit \start a /b/ c \stop style grouping is normally best, but > a shortcut is just an active character with a closing defimiter, > so this will work for you special case: > > \catcode`\/=\other > \typefile {some/dir/file} > \catcode`\/=\active > I've experimented with various macros to undefine/temporarily disable shortcuts and found that most convenient variant is to insert this catcode changing into \typefile command. Why not to do this for every command, that accepts path parameters? This slows process down too much? But this is just an afterthought. I think that \defineshortcut commands are most useful inside some environment (start/stop pair). So it is possible to have such environment that restores back all catcode changes (or other variable changes) made inside it (like local variables in some programming laguages)? This can have many other uses. -- Radhelorn