emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Toggle descriptive and literal links [7.4]
@ 2011-08-04 11:19 Reiner Steib
  2011-08-17 13:03 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2011-08-04 11:19 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

in the "Org" menu, the are the following toggles:

- <menu-bar> <Org> <Hyperlinks> <Descriptive Links>
- <menu-bar> <Org> <Hyperlinks> <Literal Links>

There are two (related) issues wit this:

(a) There is no (interactive) command to toggle this setting.

Here is what I use:

#+BEGIN_SRC lisp
   (defun org-descriptive-links ()
     "Display Descriptive Links in `org-mode'."
     (interactive)
     (org-add-to-invisibility-spec '(org-link)) (org-restart-font-lock))

   (defun org-literal-links ()
     "Display Literal Links in `org-mode'."
     (interactive)
     (org-remove-from-invisibility-spec '(org-link)) (org-restart-font-lock))
#+END_SRC

I'd suggest to add such `defun's (or a toggling defun) and adjust
org-org-menu accordingly to use the defuns instead of the current
`progs'.

(b) The initial behaviour should be customizable.


Bye, Reiner

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

* Re: Bug: Toggle descriptive and literal links [7.4]
  2011-08-04 11:19 Bug: Toggle descriptive and literal links [7.4] Reiner Steib
@ 2011-08-17 13:03 ` Bastien
  2011-08-22 18:53   ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2011-08-17 13:03 UTC (permalink / raw)
  To: reiner.steib; +Cc: emacs-orgmode

Hi Reiner,

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> (a) There is no (interactive) command to toggle this setting.

There is now `org-toggle-link-display'.

> #+BEGIN_SRC lisp
>    (defun org-descriptive-links ()
>      "Display Descriptive Links in `org-mode'."
>      (interactive)
>      (org-add-to-invisibility-spec '(org-link)) (org-restart-font-lock))
>
>    (defun org-literal-links ()
>      "Display Literal Links in `org-mode'."
>      (interactive)
>      (org-remove-from-invisibility-spec '(org-link)) (org-restart-font-lock))
> #+END_SRC

Thanks for the example code.

> I'd suggest to add such `defun's (or a toggling defun) and adjust
> org-org-menu accordingly to use the defuns instead of the current
> `progs'.

Done.

> (b) The initial behaviour should be customizable.

See the new option: `org-link-display-descriptive' which defaults to
`t'.

Thanks for this idea!

-- 
 Bastien

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

* Re: Bug: Toggle descriptive and literal links [7.4]
  2011-08-17 13:03 ` Bastien
@ 2011-08-22 18:53   ` Thomas S. Dye
  2011-08-23 14:57     ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2011-08-22 18:53 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, reiner.steib

Bastien <bzg@altern.org> writes:

> Hi Reiner,
>
> Reiner Steib <reinersteib+gmane@imap.cc> writes:
>
>> (a) There is no (interactive) command to toggle this setting.
>
> There is now `org-toggle-link-display'.
>
>> #+BEGIN_SRC lisp
>>    (defun org-descriptive-links ()
>>      "Display Descriptive Links in `org-mode'."
>>      (interactive)
>>      (org-add-to-invisibility-spec '(org-link)) (org-restart-font-lock))
>>
>>    (defun org-literal-links ()
>>      "Display Literal Links in `org-mode'."
>>      (interactive)
>>      (org-remove-from-invisibility-spec '(org-link)) (org-restart-font-lock))
>> #+END_SRC
>
> Thanks for the example code.
>
>> I'd suggest to add such `defun's (or a toggling defun) and adjust
>> org-org-menu accordingly to use the defuns instead of the current
>> `progs'.
>
> Done.
>
>> (b) The initial behaviour should be customizable.
>
> See the new option: `org-link-display-descriptive' which defaults to
> `t'.
>
> Thanks for this idea!

Aloha Bastien,

Thanks for adding this.  I work with literal links and this potentially
saves time and effort.

I wonder if I'm using it correctly?  In .emacs I set
org-link-display-descriptive nil and have:

--------
org-link-display-descriptive is a variable defined in `org.el'.
Its value is nil

Documentation:
Non-nil means Org will display descriptive links.
E.g. [[http://orgmode.org][Org website]] will be displayed as
"Org Website", hiding the link itself and just displaying its
description.  When set to `nil', Org will display the full links
literally.

You can interactively set the value of this variable using the
`org-toggle-link-display'.
--------

But when I open an Org-mode buffer I find the links displayed
descriptively.  The menu Org/Hyperlinks/Literal Links is checked at this
time.  If I call org-toggle-link-display twice, then literal links are
displayed.

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: Bug: Toggle descriptive and literal links [7.4]
  2011-08-22 18:53   ` Thomas S. Dye
@ 2011-08-23 14:57     ` Bastien
  2011-08-23 17:12       ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2011-08-23 14:57 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: emacs-orgmode, reiner.steib

Hi Thomas,

tsd@tsdye.com (Thomas S. Dye) writes:

> Thanks for adding this.  I work with literal links and this potentially
> saves time and effort.
>
> I wonder if I'm using it correctly?  In .emacs I set
> org-link-display-descriptive nil and have:
>
> --------
> org-link-display-descriptive is a variable defined in `org.el'.
> Its value is nil
>
> Documentation:
> Non-nil means Org will display descriptive links.
> E.g. [[http://orgmode.org][Org website]] will be displayed as
> "Org Website", hiding the link itself and just displaying its
> description.  When set to `nil', Org will display the full links
> literally.
>
> You can interactively set the value of this variable using the
> `org-toggle-link-display'.
> --------
>
> But when I open an Org-mode buffer I find the links displayed
> descriptively.  

The initialization of the link display relied on 
`org-descriptive-links' and I discover this variable (doh!)

So I've now remove `org-link-display-descriptive' and use
`org-descriptive-links' instead for backward compatibility.  

Please use this variable too and let me know if things are
all right now.

Best,

-- 
 Bastien

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

* Re: Bug: Toggle descriptive and literal links [7.4]
  2011-08-23 14:57     ` Bastien
@ 2011-08-23 17:12       ` Thomas S. Dye
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas S. Dye @ 2011-08-23 17:12 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode, reiner.steib

Bastien <bzg@altern.org> writes:

> Hi Thomas,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> Thanks for adding this.  I work with literal links and this potentially
>> saves time and effort.
>>
>> I wonder if I'm using it correctly?  In .emacs I set
>> org-link-display-descriptive nil and have:
>>
>> --------
>> org-link-display-descriptive is a variable defined in `org.el'.
>> Its value is nil
>>
>> Documentation:
>> Non-nil means Org will display descriptive links.
>> E.g. [[http://orgmode.org][Org website]] will be displayed as
>> "Org Website", hiding the link itself and just displaying its
>> description.  When set to `nil', Org will display the full links
>> literally.
>>
>> You can interactively set the value of this variable using the
>> `org-toggle-link-display'.
>> --------
>>
>> But when I open an Org-mode buffer I find the links displayed
>> descriptively.  
>
> The initialization of the link display relied on 
> `org-descriptive-links' and I discover this variable (doh!)
>
> So I've now remove `org-link-display-descriptive' and use
> `org-descriptive-links' instead for backward compatibility.  
>
> Please use this variable too and let me know if things are
> all right now.
>
> Best,

Aloha Bastien,

I pulled from git and put this in .emacs:

  (setq org-descriptive-links nil)

Now links display as expected on startup.

Thanks for looking into this.

All the best,
Tom

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

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

end of thread, other threads:[~2011-08-23 17:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-04 11:19 Bug: Toggle descriptive and literal links [7.4] Reiner Steib
2011-08-17 13:03 ` Bastien
2011-08-22 18:53   ` Thomas S. Dye
2011-08-23 14:57     ` Bastien
2011-08-23 17:12       ` 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).