emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ANN] org-link-edit.el --- Slurp and barf with Org links
@ 2015-02-18  6:07 Kyle Meyer
  2015-02-18 10:42 ` Rasmus
  2015-02-22  2:21 ` Thomas S. Dye
  0 siblings, 2 replies; 11+ messages in thread
From: Kyle Meyer @ 2015-02-18  6:07 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-02-18  6:07 [ANN] org-link-edit.el --- Slurp and barf with Org links Kyle Meyer
@ 2015-02-18 10:42 ` Rasmus
  2015-02-19  5:24   ` Kyle Meyer
  2015-08-05  0:00   ` Bastien Guerry
  2015-02-22  2:21 ` Thomas S. Dye
  1 sibling, 2 replies; 11+ messages in thread
From: Rasmus @ 2015-02-18 10:42 UTC (permalink / raw)
  To: emacs-orgmode

Kyle Meyer <kyle@kyleam.com> writes:

> 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

That's so need!

Did you/will you add it to contrib?

Thanks,
Rasmus

-- 
This space is left intentionally blank

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-02-18 10:42 ` Rasmus
@ 2015-02-19  5:24   ` Kyle Meyer
  2015-02-19 14:26     ` Suvayu Ali
  2015-08-05  0:00   ` Bastien Guerry
  1 sibling, 1 reply; 11+ messages in thread
From: Kyle Meyer @ 2015-02-19  5:24 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> wrote:
> Kyle Meyer <kyle@kyleam.com> writes:
>
>> 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
>
> That's so need!
>
> Did you/will you add it to contrib?

I'm glad you think it looks useful.  I haven't added it contrib (I don't
have push access and wasn't sure if others would be interested), but I'd
be happy for it to be in contrib.

--
Kyle

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-02-19  5:24   ` Kyle Meyer
@ 2015-02-19 14:26     ` Suvayu Ali
  0 siblings, 0 replies; 11+ messages in thread
From: Suvayu Ali @ 2015-02-19 14:26 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: org-mode mailing list, Rasmus

On 19 February 2015 at 06:24, Kyle Meyer <kyle@kyleam.com> wrote:
> Rasmus <rasmus@gmx.us> wrote:
>> Kyle Meyer <kyle@kyleam.com> writes:
>>
>>> 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
>>
>> That's so need!
>>
>> Did you/will you add it to contrib?
>
> I'm glad you think it looks useful.  I haven't added it contrib (I don't
> have push access and wasn't sure if others would be interested), but I'd
> be happy for it to be in contrib.

I think this is a great addition to contrib/.  Great command names, btw ;).

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-02-18  6:07 [ANN] org-link-edit.el --- Slurp and barf with Org links Kyle Meyer
  2015-02-18 10:42 ` Rasmus
@ 2015-02-22  2:21 ` Thomas S. Dye
  1 sibling, 0 replies; 11+ messages in thread
From: Thomas S. Dye @ 2015-02-22  2:21 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: Org-mode

Kyle Meyer <kyle@kyleam.com> writes:

> 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.

Brilliant!  Hydra is a real find.

Thanks,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-02-18 10:42 ` Rasmus
  2015-02-19  5:24   ` Kyle Meyer
@ 2015-08-05  0:00   ` Bastien Guerry
  2015-08-05  6:24     ` Nicolas Goaziou
  1 sibling, 1 reply; 11+ messages in thread
From: Bastien Guerry @ 2015-08-05  0:00 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

Rasmus <rasmus@gmx.us> writes:

> Did you/will you add it to contrib?

Yes, that would help discovering it.

Thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-08-05  0:00   ` Bastien Guerry
@ 2015-08-05  6:24     ` Nicolas Goaziou
  2015-08-05  7:14       ` Bastien Guerry
  0 siblings, 1 reply; 11+ messages in thread
From: Nicolas Goaziou @ 2015-08-05  6:24 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: emacs-orgmode, Rasmus

Hello,

Bastien Guerry <bzg@gnu.org> writes:

> Rasmus <rasmus@gmx.us> writes:
>
>> Did you/will you add it to contrib?
>
> Yes, that would help discovering it.

Wasn't it a goal to slowly move away from contrib/ and use either ELPA
or core instead?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-08-05  6:24     ` Nicolas Goaziou
@ 2015-08-05  7:14       ` Bastien Guerry
  2015-08-05  7:45         ` Thomas S. Dye
  2015-08-13  5:55         ` Kyle Meyer
  0 siblings, 2 replies; 11+ messages in thread
From: Bastien Guerry @ 2015-08-05  7:14 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode, Rasmus

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Wasn't it a goal to slowly move away from contrib/ and use either ELPA
> or core instead?

Yes, it is still a goal -- but we don't know when this will happen so
in the meantime, adding a package to contrib/ is okay.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-08-05  7:14       ` Bastien Guerry
@ 2015-08-05  7:45         ` Thomas S. Dye
  2015-08-05 11:34           ` Bastien Guerry
  2015-08-13  5:55         ` Kyle Meyer
  1 sibling, 1 reply; 11+ messages in thread
From: Thomas S. Dye @ 2015-08-05  7:45 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: emacs-orgmode, Rasmus, Nicolas Goaziou

Aloha all,

IMHO, this should be in core, along with a function (if it doesn't
exist) to remove a link from the description text.

All the best,
Tom

Bastien Guerry <bzg@gnu.org> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> Wasn't it a goal to slowly move away from contrib/ and use either ELPA
>> or core instead?
>
> Yes, it is still a goal -- but we don't know when this will happen so
> in the meantime, adding a package to contrib/ is okay.

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-08-05  7:45         ` Thomas S. Dye
@ 2015-08-05 11:34           ` Bastien Guerry
  0 siblings, 0 replies; 11+ messages in thread
From: Bastien Guerry @ 2015-08-05 11:34 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode, Nicolas Goaziou, Rasmus

Thomas S. Dye <tsd@tsdye.com> writes:

> IMHO, this should be in core, along with a function (if it doesn't
> exist) to remove a link from the description text.

Yes, we should consider this.  Let's find some good keybinding,
we cannot rely on hydra for this.

Thanks,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [ANN] org-link-edit.el --- Slurp and barf with Org links
  2015-08-05  7:14       ` Bastien Guerry
  2015-08-05  7:45         ` Thomas S. Dye
@ 2015-08-13  5:55         ` Kyle Meyer
  1 sibling, 0 replies; 11+ messages in thread
From: Kyle Meyer @ 2015-08-13  5:55 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: emacs-orgmode, Rasmus, Nicolas Goaziou

Bastien Guerry <bzg@gnu.org> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> Wasn't it a goal to slowly move away from contrib/ and use either ELPA
>> or core instead?
>
> Yes, it is still a goal -- but we don't know when this will happen so
> in the meantime, adding a package to contrib/ is okay.

OK, I've added it to contrib for the time being.

--
Kyle

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-08-13  5:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18  6:07 [ANN] org-link-edit.el --- Slurp and barf with Org links Kyle Meyer
2015-02-18 10:42 ` Rasmus
2015-02-19  5:24   ` Kyle Meyer
2015-02-19 14:26     ` Suvayu Ali
2015-08-05  0:00   ` Bastien Guerry
2015-08-05  6:24     ` Nicolas Goaziou
2015-08-05  7:14       ` Bastien Guerry
2015-08-05  7:45         ` Thomas S. Dye
2015-08-05 11:34           ` Bastien Guerry
2015-08-13  5:55         ` Kyle Meyer
2015-02-22  2:21 ` Thomas S. Dye

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).