unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Jonas Bernoulli <jonas@bernoul.li>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: RE: Regarding outline headings in emacs-lisp libraries
Date: Sat, 18 Jul 2020 23:56:49 +0000 (UTC)	[thread overview]
Message-ID: <d4223b6f-0c68-4348-abc5-4b9abbbb6168@default> (raw)
In-Reply-To: <87365oo312.fsf@bernoul.li>

> > FWIW -
> > In my Elisp libraries I often put an Index in the
> > Commentary, with links to the major sections.  For
> > this I use the simple library `linkd.el'
> 
> I used that library too for a while.  It's neat but ultimately I
> decided it wasn't *necessary*.
> 
> 1. Emacs already provided a convention and implementation for outlines
>    that I liked.
> 2. I didn't want to manually maintain an index in the commentary like
>    you do.  (And I realize that I don't have to do that.)
> 3. Links are orthogonal to sections and don't have to be implemented
>    in the same package.
> 
> But most importantly we would never be able to convince "everybody"
> to use this library.  I expect `outline-minor-mode' to be less
> controversial and thus the easier sell.

I just mentioned it as a FWIW.  Nothing is
"*necessary*".  I wasn't proposing to convince
everybody, or anybody for that matter, to use
`linkd.el'.  There's no contest with Org or
`outline-minor-mode' or anything else.

Using text anchors, or form-feed chars, or both,
for links are alternative ways to define sections
to the way you propose.  They're not orthogonal
to it. 

Any way of defining sections is orthogonal to
folding or otherwise focusing on a section or
hiding sections.

And any way of defining sections is orthogonal
to having a separate index/TOC that links to
sections.  And to having commands that go to
the next/previous section.

I personally don't need/use folding for Elisp
files, and I personally do want easy ways to
move among sections.

You'll say that folding provides, in a way, an
index/TOC, which is true.  But an explicit one
doesn't require anyone to know about or use
folding (or Linkd, for that matter).

> > Org Mode offers similar linking, of course,
> > but Linkd is simple.
> 
> I ended up implementing `orglink.el' which allows you to "use Org Mode
> links in other modes". ;P

Good.  So it sounds like it has some of the Linkd
features (the only ones I use, perhaps), but it
uses Org mode-style links.  Either style is OK by
me.  Not much difference between the two, anyway:

Unrendered:

 (* "Linkd-style anchor")
 (@ "Linkd-style link")

 <<Org-style anchor>>
 [[Org-style link]]

Rendered (and highlighted):

 * Linkd anchor    *, text in diff faces, + mouse-face
 > Linkd link      >, text in diff faces, + mouse-face

 <<Org anchor>>    in a face
 Org link          in a face, + mouse-face

Now that `orglink.el' exists, maybe I'll switch to
using that, who knows?  But it does require loading
Org - and dash.el, which is pretty heavyweight for
just what it offers, no?

BTW, I just downloaded it, loaded a version of dash.el
(required, unfortunately), loaded orglink.el, and got
this (Emacs 26.3) when I tried `M-x orglink-mode' in
buffer orglink.el:

Debugger entered--Lisp error: (void-variable org-link-descriptive)
  (set (make-local-variable (quote org-link-descriptive)) org-link-descriptive)
  (cond (orglink-mode (org-load-modules-maybe) (add-hook ...
  (let ((last-message (current-message))) (setq orglink-mode ...
  orglink-mode(toggle)
  funcall-interactively(orglink-mode toggle)
  call-interactively(orglink-mode record nil)
  command-execute(orglink-mode record)
  execute-extended-command(nil "orglink-mode" nil)
  funcall-interactively(execute-extended-command nil "orglink-mode" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

HTH.



  reply	other threads:[~2020-07-18 23:56 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 21:48 Regarding outline headings in emacs-lisp libraries Jonas Bernoulli
2020-07-17 22:27 ` Stefan Monnier
2020-07-18  1:41 ` T.V Raman
2020-07-18  3:22   ` Stefan Monnier
2020-07-18 14:16     ` T.V Raman
2020-07-18 16:12       ` Stefan Monnier
2020-07-18 16:49         ` T.V Raman
2020-07-18 22:54           ` Jonas Bernoulli
2020-07-18  3:29 ` Stefan Monnier
2020-07-18 16:15   ` Drew Adams
2020-07-18 22:46     ` Jonas Bernoulli
2020-07-18 23:56       ` Drew Adams [this message]
2020-07-19  9:03         ` Jonas Bernoulli
2020-07-19 15:36           ` Drew Adams
2020-07-18 23:26   ` Jonas Bernoulli
2020-07-19  3:36     ` Stefan Monnier
2020-07-19 14:54     ` Eli Zaretskii
2020-07-26 13:49     ` Jonas Bernoulli
2020-07-26 14:11       ` Eli Zaretskii
2020-07-26 15:43         ` Jonas Bernoulli
2020-07-26 16:23           ` Eli Zaretskii
2020-07-26 18:25             ` Jonas Bernoulli
2020-07-26 14:40       ` Stefan Monnier
2020-07-26 15:32         ` Jonas Bernoulli
2020-07-26 17:00           ` Yuan Fu
2020-07-26 18:23           ` Stefan Monnier
2020-07-26 18:59             ` Eli Zaretskii
2020-07-26 19:45               ` Stefan Monnier
2020-07-28 13:41                 ` Jonas Bernoulli
2020-07-28 14:30                   ` Eli Zaretskii
2020-07-28 14:42                     ` Jonas Bernoulli
2020-07-28 15:52                       ` Eli Zaretskii
2020-07-28 14:48                   ` Stefan Monnier
2020-07-26 21:11             ` Jonas Bernoulli
2020-07-26 18:34           ` Jonas Bernoulli
2020-07-26 18:55       ` [SPAM UNSURE] " Stephen Leake
2020-07-18  6:40 ` Eli Zaretskii
2020-07-28 19:18 ` Jonas Bernoulli
2020-07-29 14:34   ` Eli Zaretskii
2020-07-29 18:34     ` Jonas Bernoulli
2020-07-29 18:56       ` Eli Zaretskii
2020-08-01  2:53   ` Richard Stallman
2020-08-01  5:48     ` Eli Zaretskii
2020-08-01 21:13       ` Jonas Bernoulli
2020-08-01 23:10         ` T.V Raman
2020-08-02  1:01           ` Drew Adams
2020-08-02 16:15         ` Eli Zaretskii
2020-08-03  3:22           ` Stefan Monnier
2020-08-03 14:24             ` Eli Zaretskii
2020-08-03 14:36               ` Stefan Monnier
2020-08-08 18:13               ` Jonas Bernoulli
2020-08-08 21:59                 ` Stefan Monnier
2020-08-09  8:37                   ` Jonas Bernoulli
2020-08-03  3:16         ` Richard Stallman
2020-08-02  2:26       ` Richard Stallman
2020-08-08 12:02         ` Jonas Bernoulli
2020-08-08 18:37   ` Jonas Bernoulli
2020-08-08 18:58     ` Eli Zaretskii
2020-08-09  8:35       ` Jonas Bernoulli
2020-08-12 16:53   ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d4223b6f-0c68-4348-abc5-4b9abbbb6168@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=jonas@bernoul.li \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).