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: How can I contextually override shift selection functions? Date: Sun, 4 Aug 2019 20:07:20 +0200 (CEST) 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="1804"; 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 Sun Aug 04 20:07:39 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 1huKux-0000KY-KT for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 20:07:39 +0200 Original-Received: from localhost ([::1]:49092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huKuw-0007GP-Kp for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Aug 2019 14:07:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42476) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1huKup-0007GI-SF for help-gnu-emacs@gnu.org; Sun, 04 Aug 2019 14:07:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1huKuo-0002AE-T4 for help-gnu-emacs@gnu.org; Sun, 04 Aug 2019 14:07:31 -0400 Original-Received: from fmfe09.onbox.hu ([46.107.16.202]:56435 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 1huKuo-00025z-7E for help-gnu-emacs@gnu.org; Sun, 04 Aug 2019 14:07:30 -0400 X-fm-smtp-source: yes Original-Received: from localhost (localhost [188.143.64.183]) by web-out.onbox.hu (Postfix) with SMTP id 461plD6FTZzxSZ for ; Sun, 4 Aug 2019 20:07:20 +0200 (CEST) X-AccountId: 57978162 X-Originating-Ip: 188.143.64.183 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddruddthedguddvfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdcuhfftgffgofetkffnnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffkufggtgfvihffsegrtdersgdttdejnecuhfhrohhmpehnuggrmhgvuceovghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuheqnecukfhppedukeekrddugeefrdeigedrudekfeenucfrrghrrghmpehhvghloheppdhinhgvthepudekkedrudegfedrieegrddukeefpdhmrghilhhfrhhomhepvghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuhdprhgtphhtthhopehhvghlphdqghhnuhdqvghmrggtshesghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/relaxed; t=1564942041; s=20181004; d=freemail.hu; h=From:Message-ID:Subject:MIME-Version:Content-Type:To:Date; l=3357; bh=2jYejC67KZCXHKT24Fr9JTBgdkxncdJ3fw5q1L9ZQ4M=; b=GsiMRNvlKVIbl9LxTj+XHMfc7biP3fctCb1WZTU/f9//7iD5d48t4/sGGGHGV29/ Lj5r4M9j0Vqe8kNc5Wc+617y6jK4Q4rlgp5nLpGSRhXkDgg5XoDmBvAt//g2o3+xe6l M50Aqi3DDOOKL8VZaq3NMmnQw3S5PxvS2F5FlCgrHfLgpNKPICAaaY5nB/oURE9F8Xl 1RPCfKyDHX2Kk4zi6YZntigQx446d6edH15DTj1p9MvgAwIexMYaaLtU9pe8Pn7ftRv IIYk+luia2x8ilgF4/AquAqspx67YDkRrXhucXaod0TeOu0Y5277nSuSQ+aN0NrP2Ac bRzLxQyH/Q== X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 46.107.16.202 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:121308 Archived-At: Let's say I want to add an override functionality of a shift selection function. The shift selection handling is done by interactive ^ trickery, and it's not obvious how to preempt it. E.g. if I want to do something in certain contexts with S-down then I'd say: (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 (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 (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 ;; call S-down as usua= l =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-interactively 'n= ext-line)))) Only the thing is call-interactively does not work here, that is it does not extend the selection when I press S-down. How can I invoke then the original shift selection feature from a program if I want to invoke the default behavior?