From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: ndame Newsgroups: gmane.emacs.help Subject: Re: How can I contextually override shift selection functions? Date: Mon, 5 Aug 2019 06:19:34 +0000 (GMT) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="155571"; mail-complaints-to="usenet@blaine.gmane.org" To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 05 08:25:03 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1huWQX-000eHD-NQ for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Aug 2019 08:25:01 +0200 Original-Received: from localhost ([::1]:50856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huWQW-0002V2-JE for geh-help-gnu-emacs@m.gmane.org; Mon, 05 Aug 2019 02:25:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58684) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huWQQ-0002Uv-CP for help-gnu-emacs@gnu.org; Mon, 05 Aug 2019 02:24:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1huWQP-0001us-Cb for help-gnu-emacs@gnu.org; Mon, 05 Aug 2019 02:24:54 -0400 Original-Received: from fmfe08.onbox.hu ([46.107.16.201]:62345 helo=web-out.onbox.hu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1huWQO-0001tn-RP for help-gnu-emacs@gnu.org; Mon, 05 Aug 2019 02:24:53 -0400 X-fm-smtp-source: yes Original-Received: from localhost (localhost [84.236.108.197]) by web-out.onbox.hu (Postfix) with SMTP id 46276B24qyzxqX for ; Mon, 5 Aug 2019 08:24:50 +0200 (CEST) X-AccountId: 57978162 X-Originating-Ip: 84.236.108.197 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddtiedgleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpucfhtffggffotefknfenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffkufggtgfvihesrgdtregstddtjeenucfhrhhomhepnhgurghmvgcuoegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhuqeenucfkphepkeegrddvfeeirddutdekrdduleejnecurfgrrhgrmhephhgvlhhopedpihhnvghtpeekgedrvdefiedruddtkedrudeljedpmhgrihhlfhhrohhmpegvmhgrtghsuhhsvghrsehfrhgvvghmrghilhdrhhhupdhrtghpthhtohephhgvlhhpqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/relaxed; t=1564986290; s=20181004; d=freemail.hu; h=Date:From:Message-ID:Subject:MIME-Version:Content-Type:To; l=5013; bh=LteC9OKAbA+JWbhPBH7IrbltVz0ZBeH1O6SE/F0ntgY=; b=TvErLxkjE3OQtSBO3g8ai69LPqP8I5Tef3zKrhE21WeZySSlFtVnpbAZmQwLW9cH hSVdDLFWbm2PDQx5cua411LmRjUJv+Z6MP8LqsO031bmL8ZcpJgvhQNjfxxqC3TV4xD rGPspDU/P/d9Tm1WM+KNlDsFEjy3wjxIg1tWuBsjwcR68C0f7iUved5pki9IyTj1Ogg dAPQ4yWI+KJPdSAN+rNOQiMLfsVzOojXkSz0zzV1WEYKHZRFrwNayyj6RXvQsNZbnNj difQVUQaVUk0+DyJHebJEoOolAJVoHLDAkYpTJHYdX3GBfZZpRezo0tZXRNTCBda9AM jJTbpGuxTw== X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 46.107.16.201 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121313 Archived-At: > though I'm wondering why simply adding the caret to the interactive spec > doesn't fix the =C2=A0issue: >=C2=A0 > =C2=A0 (local-set-key (kbd "S-") (lambda () > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (interactive "^") > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (my-context) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (do 'som= ething 'else) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; call S-down = as usual > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (call-interacti= vely 'next-line)))) > Ah, I took a closer look and now it's obvious I shouldn't bind Shift+... at all and then interactive magic works: =C2=A0 (local-set-key (kbd "") (lambda () =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (interactive "^") =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (and this-command-keys-sh= ift-translated (my-context)) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (do 'something = 'else) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; call down as usual =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (next-line)))) =C2=A0