From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: [ANN] org-link-edit.el --- Slurp and barf with Org links Date: Wed, 18 Feb 2015 01:07:17 -0500 Message-ID: <87lhjvkb1m.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNxjI-0001JO-Rr for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 01:03:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNxjE-0000RG-Kd for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 01:03:24 -0500 Received: from mail-qc0-f178.google.com ([209.85.216.178]:38756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNxjE-0000Qh-Gu for emacs-orgmode@gnu.org; Wed, 18 Feb 2015 01:03:20 -0500 Received: by mail-qc0-f178.google.com with SMTP id p6so32417350qcv.9 for ; Tue, 17 Feb 2015 22:03:18 -0800 (PST) Received: from localhost ([2601:6:5480:1e5:9e4e:36ff:fe3d:ae9c]) by mx.google.com with ESMTPSA id b8sm17331490qam.38.2015.02.17.22.03.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2015 22:03:17 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode Hello, When working with links in Org documents, I noticed that I often kill surrounding text to bring it into the description, or vice versa. At some point, this made me think that it'd be nice to be able to add and remove description words like Paredit lets you do with S-expressions. I've put these Paredit-inspired slurping and barfing commands for Org link descriptions in org-link-edit.el [1], in case others find them useful. Below is an example for each command. - org-link-edit-forward-slurp The [[http://orgmode.org/][Org mode]] site | v The [[http://orgmode.org/][Org mode site]] - org-link-edit-backward-slurp The [[http://orgmode.org/][Org mode]] site | v [[http://orgmode.org/][The Org mode]] site - org-link-edit-forward-barf The [[http://orgmode.org/][Org mode]] site | v The [[http://orgmode.org/][Org]] mode site - org-link-edit-backward-barf The [[http://orgmode.org/][Org mode]] site | v The Org [[http://orgmode.org/][mode]] site As I mention in the package commentary, I think this works well with Oleh Krehel's excellent Hydra [2] because it allows you to repeat any of these commands with a single key after the initial key sequence to invoke the popup. (define-key org-mode-map YOUR-KEY (defhydra hydra-org-link-edit () "Org Link Edit" ("j" org-link-edit-forward-slurp "forward slurp") ("k" org-link-edit-forward-barf "forward barf") ("u" org-link-edit-backward-slurp "backward slurp") ("i" org-link-edit-backward-barf "backward barf") ("q" nil "cancel"))) [1]: https://github.com/kyleam/org-link-edit/blob/master/org-link-edit.el [2]: https://github.com/abo-abo/hydra -- Kyle