From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Property for treating a string as a single character when deleting Date: Mon, 11 Aug 2014 23:29:10 +0200 Organization: Aioe.org NNTP Server Message-ID: <877g2esok9.fsf@debian.uxu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407792625 31660 80.91.229.3 (11 Aug 2014 21:30:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2014 21:30:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 11 23:30:19 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XGxAY-0006QV-Ly for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2014 23:30:18 +0200 Original-Received: from localhost ([::1]:38047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxAY-0007aN-78 for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2014 17:30:18 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: SIvZRMPqRkkTHAHL6NkRuw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:74JE4jfC1h18fV9jRuFa/Y2iCe4= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:206889 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99165 Archived-At: Tom writes: > Is there a property or some other way to treat a > string as a single character? I know I can add the > intangible property and then cursor movements jumps > over the string like its a single character. Is there > a property for making the string behave like this for > deletion too? So, for example, when I backspace at > the rightmost character of the string then the whole > string is deleted at once like it's a single > character. You mean like `backward-kill-word', which I have (and probably you to) at M-DEL - do you want this encoded in the text so that you don't have to hit Meta, just DEL? Is that really worth doing? And for what mode? If this is what you want to do, and you really want it, I think you would have to locally rebind the DEL key to a defun; the defun will then do `backward-word', then `thing-at-point' (or some other combo to that extent), then examine the properties, and determine if your special mark is there, if so, the whole thing would be deleted, if not, the DEL would just do delete-backward-char as usual. Or, if you don't insist on the "property method", you could have DEL react to the char to be deleted - if it is a string delimiter, search for the corresponding delimiter - if there is a hit, ... and so on. This all seem like a lot of work for a really slim gain - and I'm not even sure there is a gain, because perhaps you'll start "deleting" other things that way, and expect the whole thing to be killed, only it won't. I can only speak (for) my mind, and that would be confused by this. M-DEL is such a close and comfortable and ingrained way - why not just use it? -- underground experts united