From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?B?Q3PDoW55aSBQw6Fs?= Newsgroups: gmane.emacs.help Subject: Toggle WikiLink on and off does not work? Date: Wed, 16 Aug 2017 10:55:31 +0200 Message-ID: Reply-To: csanyipal@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1502890923 6274 195.159.176.226 (16 Aug 2017 13:42:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 Aug 2017 13:42:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 16 15:41:58 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhyZx-0000k2-NE for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Aug 2017 15:41:49 +0200 Original-Received: from localhost ([::1]:47243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhya2-0003ug-HT for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Aug 2017 09:41:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhu6x-0005n2-Tc for help-gnu-emacs@gnu.org; Wed, 16 Aug 2017 04:55:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhu6x-0003Wi-3y for help-gnu-emacs@gnu.org; Wed, 16 Aug 2017 04:55:35 -0400 Original-Received: from mail-pg0-x22e.google.com ([2607:f8b0:400e:c05::22e]:38033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhu6w-0003Ve-JD for help-gnu-emacs@gnu.org; Wed, 16 Aug 2017 04:55:34 -0400 Original-Received: by mail-pg0-x22e.google.com with SMTP id l64so20278605pge.5 for ; Wed, 16 Aug 2017 01:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=3AlnN7v+xycgbisuWlXywzlhf7RiX7Lv3vXbK20v7UM=; b=muPho7/4oFjfFVpFam6Ioz4o8bF1PbNfMbAB2Tlq/CMpxJNi2HPzYfYrg6XKGXCaq+ pubpflIuEvWq+hRAPiibGVtN8a93mMf4BZ/xW5mB+2TDTK7twYaD6so+KiCL32E0rxbK SoZucS92WNPjg9XatTvP2uKXeRb5pP7IcqW/xUvrCza73Cily3TSj6krKhKoZZIXPjQo +lD0z/Hi6+RH4EQDvHNzGRCdVQ2MBtJRkkf7v8e5InD/jw6hUawvMixDK7x+86MlbwNi tbjg+QLQVx3hTwAmu579kXxJ8RltAwxu6WaPpp/06+GPbr6Fmt6yDc8vEGDXVB2K8ZEp 9N1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=3AlnN7v+xycgbisuWlXywzlhf7RiX7Lv3vXbK20v7UM=; b=Y8YbE8qRfKNEiTxtocSibl7sNCnZOTs2ar5XCXzxKh6+sV0TlCKe92oMvEUEurpEnd 0V9GN+eF4jcgfsPQfcZLCExqIN8qQAIrxYKkLE2rwgaSNHHoPRzFIhWPm6aI2qt1ZmjG 2Kjyju9w2mglxLrNDMrtfBeu4B3Y0kWGvpo1RHOBA6tDN3ug8E2RoCCxX8Fy0Hfec+yS JICyJ/lru4I6HRUz1OQNqgdeDOdaFHSluHugw2+ocXFN8TghM1huF7sWP0VZBZrYfXrF 6GKyc0wBPQoDll9/aTYNFqURt3ylnpA5UR1ZjLupytLtuKuJ3gcrpEEutrPqo1U5aJtJ brcQ== X-Gm-Message-State: AHYfb5jMuNVpTAGQ2DhT5ld0PP+QdIQzutPxSFHs9dbYPgDLcWC2P7yD O3MM7ZYCdFBHPaL6UFx8O0e6OledA96bMFw= X-Received: by 10.98.153.153 with SMTP id t25mr962932pfk.224.1502873731852; Wed, 16 Aug 2017 01:55:31 -0700 (PDT) Original-Received: by 10.100.142.22 with HTTP; Wed, 16 Aug 2017 01:55:31 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22e X-Mailman-Approved-At: Wed, 16 Aug 2017 09:41:02 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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:114060 Archived-At: Hi, I'm running GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16) of 2017-08-14 on my Gentoo Linux system. I have in my .emacs file these lines: ;; Toggle WikiLink on and off (defun emacs-wiki-unlink-toggle () "Toggle string in the beginning of the current word, to un/make a word emacs-wiki link. The current word depends on the point: if the cursor is on a non-whitespace character, it's considered a word surrounded by whitespace. If the cursor is on a whitespace character, the next word is looked up. This way addressing a word works intuitively after having arrived on the spot using forward-word." (interactive) (save-excursion (if (looking-at "[[:space:]]") (goto-char (- (re-search-forward "[A-Za-z<]") 1)) (goto-char (+ (re-search-backward "[[:space:]]") 1))) (if (looking-at "") (delete-char 5) (insert "")))) (add-hook 'emacs-wiki-mode-hook '(lambda () (local-set-key "\C-c\C-n" 'emacs-wiki-unlink-toggle))) but in Wiki mode I can't toggle on or off a WikiLink. Why? -- Best, Pali