all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Killing org hyperlinks with one key
@ 2022-06-09  7:34 Alexandros Prekates
  2022-06-09  7:41 ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandros Prekates @ 2022-06-09  7:34 UTC (permalink / raw)
  To: help-gnu-emacs

Trying to kill an org link+description i found that that can happen
only after calling org-toggle-link-display . I guess you cant kill
what you can see after all. 

Has been implemented a function that will automaticaly toggle the
link under the point (or marked) , kill it and then toggle again?

Alexandros



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

* Re: Killing org hyperlinks with one key
  2022-06-09  7:34 Killing org hyperlinks with one key Alexandros Prekates
@ 2022-06-09  7:41 ` Emanuel Berg
  2022-06-09  8:41   ` Alexandros Prekates
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2022-06-09  7:41 UTC (permalink / raw)
  To: help-gnu-emacs

Alexandros Prekates wrote:

> Trying to kill an org link+description

You have an example what that looks like/is?

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Killing org hyperlinks with one key
  2022-06-09  7:41 ` Emanuel Berg
@ 2022-06-09  8:41   ` Alexandros Prekates
  2022-06-09  9:11     ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandros Prekates @ 2022-06-09  8:41 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 09 Jun 2022 09:41:22 +0200
Emanuel Berg <incal@dataswamp.org> wrote:

> Alexandros Prekates wrote:
> 
> > Trying to kill an org link+description  
> 
> You have an example what that looks like/is?
> 
That's how it look complete:
[[LINK][DESCRIPTION]]

And Org by default displays only the Description part.
So i'd like a function to kill the complete hyperlink while
it's not visible completely.



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

* Re: Killing org hyperlinks with one key
  2022-06-09  8:41   ` Alexandros Prekates
@ 2022-06-09  9:11     ` Emanuel Berg
  2022-06-10  9:45       ` Alexandros Prekates
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg @ 2022-06-09  9:11 UTC (permalink / raw)
  To: help-gnu-emacs

Alexandros Prekates wrote:

>>> Trying to kill an org link+description
>> 
>> You have an example what that looks like/is?
> 
> That's how it look complete: [[LINK][DESCRIPTION]]
>
> And Org by default displays only the Description part.
> So i'd like a function to kill the complete hyperlink while
> it's not visible completely.

Yes, but how does it look in its original context?

One can't write a function without it ...

But you can do it yourself ... use `kill-new' and
`thing-at-point',

  (kill-new (thing-at-point 'url t))

Lousy that Org cannot do this already!

-- 
underground experts united
https://dataswamp.org/~incal




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

* Re: Killing org hyperlinks with one key
  2022-06-09  9:11     ` Emanuel Berg
@ 2022-06-10  9:45       ` Alexandros Prekates
  2022-06-10 18:36         ` Emanuel Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Alexandros Prekates @ 2022-06-10  9:45 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, 09 Jun 2022 11:11:06 +0200
Emanuel Berg <incal@dataswamp.org> wrote:

> Alexandros Prekates wrote:
> 
> >>> Trying to kill an org link+description  
> >> 
> >> You have an example what that looks like/is?  
> > 
> > That's how it look complete: [[LINK][DESCRIPTION]]
> >
> > And Org by default displays only the Description part.
> > So i'd like a function to kill the complete hyperlink while
> > it's not visible completely.  
> 
> Yes, but how does it look in its original context?

In the original context , if i understand you, it looks
as simple text with a different face and underlined.

> 
> One can't write a function without it ...
> 
> But you can do it yourself ... use `kill-new' and
> `thing-at-point',
> 
>   (kill-new (thing-at-point 'url t))
> 
> Lousy that Org cannot do this already!
> 

Thanks for the idea of using thing-at-point.

I'm also checking Invisible Text .

Here is the fuction that toggleis org links display:
(defun org-toggle-link-display ()
  "Toggle the literal or descriptive display of links."
  (interactive)
  (if org-link-descriptive (remove-from-invisibility-spec '(org-link))
    (add-to-invisibility-spec '(org-link)))
  (org-restart-font-lock)
  (setq org-link-descriptive (not org-link-descriptive)))

buffer-invisibility-spec seems to hold invisible text.


Alexandros.





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

* Re: Killing org hyperlinks with one key
  2022-06-10  9:45       ` Alexandros Prekates
@ 2022-06-10 18:36         ` Emanuel Berg
  0 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg @ 2022-06-10 18:36 UTC (permalink / raw)
  To: help-gnu-emacs

Alexandros Prekates wrote:

> In the original context , if i understand you, it looks as
> simple text with a different face and underlined.
>
> Here is the fuction that toggleis org links display:
> (defun org-toggle-link-display ()
>   "Toggle the literal or descriptive display of links."
>   (interactive)
>   (if org-link-descriptive (remove-from-invisibility-spec '(org-link))
>     (add-to-invisibility-spec '(org-link)))
>   (org-restart-font-lock)
>   (setq org-link-descriptive (not org-link-descriptive)))
>
> buffer-invisibility-spec seems to hold invisible text.

Maybe you don't need that if it's part of the interface.

But you do right to examine the source, that's what you do at
this point, see how they do to extract it.

Maybe that's a property as well somewhere, the URL?

--
underground experts united
https://dataswamp.org/~incal




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

end of thread, other threads:[~2022-06-10 18:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-09  7:34 Killing org hyperlinks with one key Alexandros Prekates
2022-06-09  7:41 ` Emanuel Berg
2022-06-09  8:41   ` Alexandros Prekates
2022-06-09  9:11     ` Emanuel Berg
2022-06-10  9:45       ` Alexandros Prekates
2022-06-10 18:36         ` Emanuel Berg

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.