all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Links in comments
@ 2015-10-19 22:54 Kaushal Modi
  2015-10-26 18:13 ` Kaushal Modi
  0 siblings, 1 reply; 8+ messages in thread
From: Kaushal Modi @ 2015-10-19 22:54 UTC (permalink / raw)
  To: emacs-org list


[-- Attachment #1.1: Type: text/plain, Size: 987 bytes --]

Hi,

This question has come up a few times on emacs.stackexchange so I was
curious if the more experienced org-mode users had a solution to this.. or
if a fix is needed to resolve this issue.

Referenced emacs.stackexchange questions:

- http://emacs.stackexchange.com/q/17505/115
- http://emacs.stackexchange.com/q/9413/115


The issue if that if there is a link in an org-mode commented line like
below:

* Links in comments
#+BEGIN_EXAMPLE
# This is a [[http://orgmode.org][link]] in a comment.
#+END_EXAMPLE
# This is a [[http://orgmode.org][link]] in a comment.

the link gets completely camouflaged as seen below.

[image: Inline image 3]

The only way I know that that's a link is if I toggle the visible-mode or
hover over that link with mouse (as below).

[image: Inline image 1]

Solutions??
- Different face for such links within comments? Or let the link face
supersede comment face?
- Option to not collapse links within comments?

What do you guys think?


--
Kaushal Modi

[-- Attachment #1.2: Type: text/html, Size: 3895 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 11977 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 13724 bytes --]

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

* Re: Links in comments
  2015-10-19 22:54 Links in comments Kaushal Modi
@ 2015-10-26 18:13 ` Kaushal Modi
  2015-10-27 14:28   ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: Kaushal Modi @ 2015-10-26 18:13 UTC (permalink / raw)
  To: emacs-org list


[-- Attachment #1.1: Type: text/plain, Size: 1249 bytes --]

Hi all,

I am sending this out again in the event someone knowing a solution to it
can comment.


--
Kaushal Modi

On Mon, Oct 19, 2015 at 6:54 PM, Kaushal Modi <kaushal.modi@gmail.com>
wrote:

> Hi,
>
> This question has come up a few times on emacs.stackexchange so I was
> curious if the more experienced org-mode users had a solution to this.. or
> if a fix is needed to resolve this issue.
>
> Referenced emacs.stackexchange questions:
>
> - http://emacs.stackexchange.com/q/17505/115
> - http://emacs.stackexchange.com/q/9413/115
>
>
> The issue if that if there is a link in an org-mode commented line like
> below:
>
> * Links in comments
> #+BEGIN_EXAMPLE
> # This is a [[http://orgmode.org][link]] in a comment.
> #+END_EXAMPLE
> # This is a [[http://orgmode.org][link]] in a comment.
>
> the link gets completely camouflaged as seen below.
>
> [image: Inline image 3]
>
> The only way I know that that's a link is if I toggle the visible-mode or
> hover over that link with mouse (as below).
>
> [image: Inline image 1]
>
> Solutions??
> - Different face for such links within comments? Or let the link face
> supersede comment face?
> - Option to not collapse links within comments?
>
> What do you guys think?
>
>
> --
> Kaushal Modi
>

[-- Attachment #1.2: Type: text/html, Size: 4512 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 11977 bytes --]

[-- Attachment #3: image.png --]
[-- Type: image/png, Size: 13724 bytes --]

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

* Re: Links in comments
  2015-10-26 18:13 ` Kaushal Modi
@ 2015-10-27 14:28   ` Eric S Fraga
  2015-10-28 10:56     ` John Kitchin
  0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2015-10-27 14:28 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list

On Monday, 26 Oct 2015 at 14:13, Kaushal Modi wrote:
> Hi all,
>
> I am sending this out again in the event someone knowing a solution to it
> can comment.

I don't know a solution.  If I do C-u C-x = with the cursor on the link
in a comment line, there is only one face shown.  Semantically, the line
is a comment and the whole point of comments is that they are not parsed
for any further meaning.  Representing the line, therefore, using the
comment face throughout makes sense.

Whether it's what *you* want or not is another issue, of course ;-)

I suggest changing your usage?  If you want links to be visible, they
should be in the main text?  Even within a COMMENT section say?
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-209-gba4d33

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

* Re: Links in comments
  2015-10-27 14:28   ` Eric S Fraga
@ 2015-10-28 10:56     ` John Kitchin
  2015-10-28 11:07       ` Kaushal Modi
  2015-10-28 21:27       ` Samuel Wales
  0 siblings, 2 replies; 8+ messages in thread
From: John Kitchin @ 2015-10-28 10:56 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-org list, Kaushal Modi

Your mileage may vary, but this seems to show links in comments for me:

#+BEGIN_EXAMPLE
(highlight-regexp org-any-link-re 'org-link)
#+END_EXAMPLE


Eric S Fraga writes:

> On Monday, 26 Oct 2015 at 14:13, Kaushal Modi wrote:
>> Hi all,
>>
>> I am sending this out again in the event someone knowing a solution to it
>> can comment.
>
> I don't know a solution.  If I do C-u C-x = with the cursor on the link
> in a comment line, there is only one face shown.  Semantically, the line
> is a comment and the whole point of comments is that they are not parsed
> for any further meaning.  Representing the line, therefore, using the
> comment face throughout makes sense.
>
> Whether it's what *you* want or not is another issue, of course ;-)
>
> I suggest changing your usage?  If you want links to be visible, they
> should be in the main text?  Even within a COMMENT section say?

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

* Re: Links in comments
  2015-10-28 10:56     ` John Kitchin
@ 2015-10-28 11:07       ` Kaushal Modi
  2015-10-28 11:31         ` Eric S Fraga
  2015-10-28 21:27       ` Samuel Wales
  1 sibling, 1 reply; 8+ messages in thread
From: Kaushal Modi @ 2015-10-28 11:07 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 817 bytes --]

Hi John, Eric,

Thanks for the replies.

I will try out the highlight-regexp trick today.

The point I was trying to make was not that we should highlight links even
in comments (though that was my suggested alternative). The main point I
wanted to make was that links should not get hidden in comments.

If highlighting links in comments is not suggested, then at least we should
make them visible as,

# some [[link][desc]]

Instead of

# some desc

The use case is where I would have some org-mode text with links
temporarily commented out. But in the commented state, I would not know if
that text hid any links because the links don't show expanded in the
commented text. And also they don't have a different face.

I will update later on what I see on using highlight-regexp. I think that
will work for me too.

[-- Attachment #2: Type: text/html, Size: 1005 bytes --]

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

* Re: Links in comments
  2015-10-28 11:07       ` Kaushal Modi
@ 2015-10-28 11:31         ` Eric S Fraga
  0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2015-10-28 11:31 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-org list, John Kitchin

On Wednesday, 28 Oct 2015 at 07:07, Kaushal Modi wrote:
> Hi John, Eric,
>
> Thanks for the replies.
>
> I will try out the highlight-regexp trick today.
>
> The point I was trying to make was not that we should highlight links even
> in comments (though that was my suggested alternative). The main point I
> wanted to make was that links should not get hidden in comments.

Ah, sorry, I misunderstood.  I agree with you, again from a semantic
point of view of what a comment (to me) means.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-209-gba4d33

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

* Re: Links in comments
  2015-10-28 10:56     ` John Kitchin
  2015-10-28 11:07       ` Kaushal Modi
@ 2015-10-28 21:27       ` Samuel Wales
  2015-10-28 21:37         ` Samuel Wales
  1 sibling, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2015-10-28 21:27 UTC (permalink / raw)
  To: John Kitchin; +Cc: Kaushal Modi, emacs-org list

On 10/28/15, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> Your mileage may vary, but this seems to show links in comments for me:
>
> #+BEGIN_EXAMPLE
> (highlight-regexp org-any-link-re 'org-link)
> #+END_EXAMPLE

nice workaround!  thanks!

it's a matter of perspective.  comments mean two separate things:

  1] "commenting out"
  2] "note to self"

note that org-mouse does [and should if and only if fontified] allow
clicks on commented links, following the "note to self" principle.

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

* Re: Links in comments
  2015-10-28 21:27       ` Samuel Wales
@ 2015-10-28 21:37         ` Samuel Wales
  0 siblings, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2015-10-28 21:37 UTC (permalink / raw)
  To: John Kitchin; +Cc: Kaushal Modi, emacs-org list

(highlight-regexp org-ts-regexp3 'org-date)

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

end of thread, other threads:[~2015-10-28 21:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 22:54 Links in comments Kaushal Modi
2015-10-26 18:13 ` Kaushal Modi
2015-10-27 14:28   ` Eric S Fraga
2015-10-28 10:56     ` John Kitchin
2015-10-28 11:07       ` Kaushal Modi
2015-10-28 11:31         ` Eric S Fraga
2015-10-28 21:27       ` Samuel Wales
2015-10-28 21:37         ` Samuel Wales

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.