all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ELPA] New package: breadcrumb.el
@ 2023-09-04 20:34 João Távora
  2023-09-04 20:47 ` Philip Kaludercic
  2023-09-05 15:58 ` Jonas Bernoulli
  0 siblings, 2 replies; 15+ messages in thread
From: João Távora @ 2023-09-04 20:34 UTC (permalink / raw)
  To: emacs-devel

Hi all

I'd like to add my package "breadcrumb" to GNU ELPA.

Breadcrumbs are a a "header-line" indication of where you are in a large
project, both in terms of "which file"and "where point is within a
file".  You turn this on with breadcrumb-mode.

Here's a link to the project (which has a screenshot)
https://github.com/joaotavora/breadcrumb

breadcrumb.el uses information derived from existing Emacs libraries
imenu.el and project.el.  It has some points in common with
"which-func.el" but is simpler (and faster).

You don't really have to put "breadcrumbs" in the header-line (I don't)
so the package also come with some lower-level utils so you can plug this
into mode-line-format however you see fit.

I created this package some time ago to answer some common feature
requests for Eglot, but it turned out somewhat more generic and works
nicely with or without Eglot.  I recently cleaned it up a little and
implemented some pendingfeature requests like faces and mouse stuff.

There are a few few TODOs/FIXMEs to help out with, of course.

Here's the patch for elpa.git

diff --git a/elpa-packages b/elpa-packages
index 7bbf35a..cfceb7e 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -99,6 +99,9 @@
  (bnf-mode		:url "https://github.com/sergeyklay/bnf-mode")
  (boxy			:url "https://gitlab.com/tygrdev/boxy")
  (boxy-headings		:url "https://gitlab.com/tygrdev/boxy-headings")
+ (breadcrumb		:url "https://github.com/joaotavora/breadcrumb"
+                        :readme "README.md"
+                        :ignored-files ("screenshot.png"))
  (brief			:url nil)
  (buffer-env		:url "https://github.com/astoff/buffer-env")
  (buffer-expose		:url "https://github.com/clemera/buffer-expose")




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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-04 20:34 [ELPA] New package: breadcrumb.el João Távora
@ 2023-09-04 20:47 ` Philip Kaludercic
  2023-09-04 20:56   ` João Távora
  2023-09-05 15:58 ` Jonas Bernoulli
  1 sibling, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2023-09-04 20:47 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

João Távora <joaotavora@gmail.com> writes:

> Hi all
>
> I'd like to add my package "breadcrumb" to GNU ELPA.
>
> Breadcrumbs are a a "header-line" indication of where you are in a large
> project, both in terms of "which file"and "where point is within a
> file".  You turn this on with breadcrumb-mode.
>
> Here's a link to the project (which has a screenshot)
> https://github.com/joaotavora/breadcrumb

Looks nice!  I have no notable comments on the code, except that the
indentation out of place in two parts of the file.

>
> breadcrumb.el uses information derived from existing Emacs libraries
> imenu.el and project.el.  It has some points in common with
> "which-func.el" but is simpler (and faster).
>
> You don't really have to put "breadcrumbs" in the header-line (I don't)
> so the package also come with some lower-level utils so you can plug this
> into mode-line-format however you see fit.
>
> I created this package some time ago to answer some common feature
> requests for Eglot, but it turned out somewhat more generic and works
> nicely with or without Eglot.  I recently cleaned it up a little and
> implemented some pendingfeature requests like faces and mouse stuff.
>
> There are a few few TODOs/FIXMEs to help out with, of course.
>
> Here's the patch for elpa.git
>
> diff --git a/elpa-packages b/elpa-packages
> index 7bbf35a..cfceb7e 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -99,6 +99,9 @@
>   (bnf-mode		:url "https://github.com/sergeyklay/bnf-mode")
>   (boxy			:url "https://gitlab.com/tygrdev/boxy")
>   (boxy-headings		:url "https://gitlab.com/tygrdev/boxy-headings")
> + (breadcrumb		:url "https://github.com/joaotavora/breadcrumb"
> +                        :readme "README.md"

Are you sure you want to use the README.md file to generate the package
description, or wouldn't you rather rely on the Commentary section?
Having a "Screenshot" heading followed by nothing might look weird.

> +                        :ignored-files ("screenshot.png"))

If possible, it would be nice to track this on your end with a
.elpaignore file.

>   (brief			:url nil)
>   (buffer-env		:url "https://github.com/astoff/buffer-env")
>   (buffer-expose		:url "https://github.com/clemera/buffer-expose")



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-04 20:47 ` Philip Kaludercic
@ 2023-09-04 20:56   ` João Távora
  2023-09-05  6:21     ` Philip Kaludercic
  0 siblings, 1 reply; 15+ messages in thread
From: João Távora @ 2023-09-04 20:56 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

Philip Kaludercic <philipk@posteo.net> writes:

> João Távora <joaotavora@gmail.com> writes:

>> Here's a link to the project (which has a screenshot)
>> https://github.com/joaotavora/breadcrumb
>
> Looks nice!  I have no notable comments on the code, except that the
> indentation out of place in two parts of the file.

Thanks, I just spotted that and will fix briefly.

>> Here's the patch for elpa.git
>>
>> diff --git a/elpa-packages b/elpa-packages
>> index 7bbf35a..cfceb7e 100644
>> --- a/elpa-packages
>> +++ b/elpa-packages
>> @@ -99,6 +99,9 @@
>>   (bnf-mode		:url "https://github.com/sergeyklay/bnf-mode")
>>   (boxy			:url "https://gitlab.com/tygrdev/boxy")
>>   (boxy-headings		:url "https://gitlab.com/tygrdev/boxy-headings")
>> + (breadcrumb		:url "https://github.com/joaotavora/breadcrumb"
>> +                        :readme "README.md"
>
> Are you sure you want to use the README.md file to generate the package
> description, or wouldn't you rather rely on the Commentary section?

Better rely on the Commentary, yes.  Just consider remove that line
removed from the patch.

> Having a "Screenshot" heading followed by nothing might look weird.
>
>> +                        :ignored-files ("screenshot.png"))
>
> If possible, it would be nice to track this on your end with a
> .elpaignore file.

That's perfectlky doable, but I do think it makes a bit more sense like
this.  Why do you think it's "nicer"?  And can we merge it as is for now
(so I can tick this off my todo? ;-)

João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-04 20:56   ` João Távora
@ 2023-09-05  6:21     ` Philip Kaludercic
  2023-09-05  9:16       ` João Távora
  0 siblings, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2023-09-05  6:21 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

João Távora <joaotavora@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>> João Távora <joaotavora@gmail.com> writes:
>
>>> Here's a link to the project (which has a screenshot)
>>> https://github.com/joaotavora/breadcrumb
>>
>> Looks nice!  I have no notable comments on the code, except that the
>> indentation out of place in two parts of the file.
>
> Thanks, I just spotted that and will fix briefly.

1+

>>> Here's the patch for elpa.git
>>>
>>> diff --git a/elpa-packages b/elpa-packages
>>> index 7bbf35a..cfceb7e 100644
>>> --- a/elpa-packages
>>> +++ b/elpa-packages
>>> @@ -99,6 +99,9 @@
>>>   (bnf-mode		:url "https://github.com/sergeyklay/bnf-mode")
>>>   (boxy			:url "https://gitlab.com/tygrdev/boxy")
>>>   (boxy-headings		:url "https://gitlab.com/tygrdev/boxy-headings")
>>> + (breadcrumb		:url "https://github.com/joaotavora/breadcrumb"
>>> +                        :readme "README.md"
>>
>> Are you sure you want to use the README.md file to generate the package
>> description, or wouldn't you rather rely on the Commentary section?
>
> Better rely on the Commentary, yes.  Just consider remove that line
> removed from the patch.

Ok.

>> Having a "Screenshot" heading followed by nothing might look weird.
>>
>>> +                        :ignored-files ("screenshot.png"))
>>
>> If possible, it would be nice to track this on your end with a
>> .elpaignore file.
>
> That's perfectlky doable, but I do think it makes a bit more sense like
> this.  Why do you think it's "nicer"?  And can we merge it as is for now
> (so I can tick this off my todo? ;-)

The advantage of having this information locally in your repository is
that if anything changes (files are added or renamed), it is easier to
update what files shouldn't be bundled in the release tarball, instead
of having to change stuff in elpa.git.  I guess in your case it doesn't
matter that much because you also have push-access to the repository.
"Nice" just means that we avoid small "Add foo.bar to :ignored-files for
baz" commits, that are more noisy than useful.

> João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05  6:21     ` Philip Kaludercic
@ 2023-09-05  9:16       ` João Távora
  2023-09-05 10:16         ` Philip Kaludercic
  0 siblings, 1 reply; 15+ messages in thread
From: João Távora @ 2023-09-05  9:16 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

On Tue, Sep 5, 2023 at 7:21 AM Philip Kaludercic <philipk@posteo.net> wrote:

> >> If possible, it would be nice to track this on your end with a
> >> .elpaignore file.
> >
> > That's perfectlky doable, but I do think it makes a bit more sense like
> > this.  Why do you think it's "nicer"?  And can we merge it as is for now
> > (so I can tick this off my todo? ;-)
>
> The advantage of having this information locally in your repository is
> that if anything changes (files are added or renamed), it is easier to
> update what files shouldn't be bundled in the release tarball, instead
> of having to change stuff in elpa.git.  I guess in your case it doesn't
> matter that much because you also have push-access to the repository.
> "Nice" just means that we avoid small "Add foo.bar to :ignored-files for
> baz" commits, that are more noisy than useful.

I guess so, but there's also the case to be made that we want to keep
repos package-repository-agnostic.  breadcrumb.el is really intended to go
into GNU ELPA .  But maybe straight.el has a .straightignore and so on...
And el-get (if it is still alive) has something else, etc.
IMO it's a good principle to have meta info nearest to where it's
actually used, and in this case it would be elpa.git.  But as I said,
I don't mind adding it, so if you want open a PR over at the breadcrumb
upstream and I'll merge it.

Anyway, if there are no objections, and you don't beat me to it, I'll
push the (revised) patch to elpa.git later today.

João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05  9:16       ` João Távora
@ 2023-09-05 10:16         ` Philip Kaludercic
  2023-09-05 10:22           ` João Távora
  0 siblings, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2023-09-05 10:16 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

João Távora <joaotavora@gmail.com> writes:

> On Tue, Sep 5, 2023 at 7:21 AM Philip Kaludercic <philipk@posteo.net> wrote:
>
>> >> If possible, it would be nice to track this on your end with a
>> >> .elpaignore file.
>> >
>> > That's perfectlky doable, but I do think it makes a bit more sense like
>> > this.  Why do you think it's "nicer"?  And can we merge it as is for now
>> > (so I can tick this off my todo? ;-)
>>
>> The advantage of having this information locally in your repository is
>> that if anything changes (files are added or renamed), it is easier to
>> update what files shouldn't be bundled in the release tarball, instead
>> of having to change stuff in elpa.git.  I guess in your case it doesn't
>> matter that much because you also have push-access to the repository.
>> "Nice" just means that we avoid small "Add foo.bar to :ignored-files for
>> baz" commits, that are more noisy than useful.
>
> I guess so, but there's also the case to be made that we want to keep
> repos package-repository-agnostic.  breadcrumb.el is really intended to go
> into GNU ELPA .  But maybe straight.el has a .straightignore and so on...
> And el-get (if it is still alive) has something else, etc.
> IMO it's a good principle to have meta info nearest to where it's
> actually used, and in this case it would be elpa.git.  But as I said,
> I don't mind adding it, so if you want open a PR over at the breadcrumb
> upstream and I'll merge it.

Done.

> Anyway, if there are no objections, and you don't beat me to it, I'll
> push the (revised) patch to elpa.git later today.

Done.

> João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 10:16         ` Philip Kaludercic
@ 2023-09-05 10:22           ` João Távora
  0 siblings, 0 replies; 15+ messages in thread
From: João Távora @ 2023-09-05 10:22 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel

On Tue, Sep 5, 2023 at 11:16 AM Philip Kaludercic <philipk@posteo.net> wrote:

> > upstream and I'll merge it.
>
> Done.

Thanks.  Merged.

> > Anyway, if there are no objections, and you don't beat me to it, I'll
> > push the (revised) patch to elpa.git later today.
>
> Done.

Thanks!



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-04 20:34 [ELPA] New package: breadcrumb.el João Távora
  2023-09-04 20:47 ` Philip Kaludercic
@ 2023-09-05 15:58 ` Jonas Bernoulli
  2023-09-05 16:41   ` João Távora
  1 sibling, 1 reply; 15+ messages in thread
From: Jonas Bernoulli @ 2023-09-05 15:58 UTC (permalink / raw)
  To: João Távora, emacs-devel

João Távora <joaotavora@gmail.com> writes:

> Hi all
>
> I'd like to add my package "breadcrumb" to GNU ELPA.
> [...]
> Here's a link to the project (which has a screenshot)
> https://github.com/joaotavora/breadcrumb

Another package by that name already exists, but it wasn't touched in
13 years: https://github.com/pheaver/breadcrumb.

If you weren't aware of this and would like to avoid taking over an
existing name in the future (or be aware that you are doing that, and
possibly reach out to the author of the older implementation), you could
consult my list at https://emacsmirror.net/stats/upstreams.html, which
lists all packages in the Emacsmirror and Emacsattic, which is a
superset of packages in GNU ELPA, NonGNU ELPA and MELPA (modulo recent
additions).

Unrelated, but since I looked at your package: Please use just two
semicolons inside library commentaries (and in other "non-heading"
comments) .  Otherwise all the lines that match "^;;;+ ." are treated
as headings by outline-minor-mode.  (You can of course continue to use
";;;; subheading".)

     Cheers,
     Jonas



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 15:58 ` Jonas Bernoulli
@ 2023-09-05 16:41   ` João Távora
  2023-09-05 16:54     ` Sebastian Miele
                       ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: João Távora @ 2023-09-05 16:41 UTC (permalink / raw)
  To: Jonas Bernoulli; +Cc: emacs-devel

On Tue, Sep 5, 2023 at 4:58 PM Jonas Bernoulli <jonas@bernoul.li> wrote:
>
> João Távora <joaotavora@gmail.com> writes:
>
> > Hi all
> >
> > I'd like to add my package "breadcrumb" to GNU ELPA.
> > [...]
> > Here's a link to the project (which has a screenshot)
> > https://github.com/joaotavora/breadcrumb
>
> Another package by that name already exists, but it wasn't touched in
> 13 years: https://github.com/pheaver/breadcrumb.
>
> If you weren't aware of this and would like to avoid taking over an
> existing name in the future (or be aware that you are doing that, and
> possibly reach out to the author of the older implementation), you could
> consult my list at https://emacsmirror.net/stats/upstreams.html, which
> lists all packages in the Emacsmirror and Emacsattic, which is a
> superset of packages in GNU ELPA, NonGNU ELPA and MELPA (modulo recent
> additions).

Oops, I missed that.  What does it do.

> Unrelated, but since I looked at your package: Please use just two
> semicolons inside library commentaries (and in other "non-heading"
> comments) .  Otherwise all the lines that match "^;;;+ ." are treated
> as headings by outline-minor-mode.  (You can of course continue to use
> ";;;; subheading".)

Not sure I 100% understand what you mean, but if you propose a
patch I'll happily merge it.

João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 16:41   ` João Távora
@ 2023-09-05 16:54     ` Sebastian Miele
  2023-09-05 16:55     ` Philip Kaludercic
  2023-09-05 21:35     ` Jonas Bernoulli
  2 siblings, 0 replies; 15+ messages in thread
From: Sebastian Miele @ 2023-09-05 16:54 UTC (permalink / raw)
  To: João Távora; +Cc: Jonas Bernoulli, emacs-devel

> From: João Távora <joaotavora@gmail.com>
> Date: Tue, 2023-09-05 17:41 +0100
>
> On Tue, Sep 5, 2023 at 4:58 PM Jonas Bernoulli <jonas@bernoul.li> wrote:
>>
>> Unrelated, but since I looked at your package: Please use just two
>> semicolons inside library commentaries (and in other "non-heading"
>> comments) .  Otherwise all the lines that match "^;;;+ ." are treated
>> as headings by outline-minor-mode.  (You can of course continue to use
>> ";;;; subheading".)
>
> Not sure I 100% understand what you mean, […].

See (info "(elisp)Comment Tips"), and possibly also
(info "(emacs)#Outline Mode") and (info "(emacs)Outline Minor Mode").



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 16:41   ` João Távora
  2023-09-05 16:54     ` Sebastian Miele
@ 2023-09-05 16:55     ` Philip Kaludercic
  2023-09-05 17:00       ` João Távora
  2023-09-05 21:35     ` Jonas Bernoulli
  2 siblings, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2023-09-05 16:55 UTC (permalink / raw)
  To: João Távora; +Cc: Jonas Bernoulli, emacs-devel

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

João Távora <joaotavora@gmail.com> writes:

> On Tue, Sep 5, 2023 at 4:58 PM Jonas Bernoulli <jonas@bernoul.li> wrote:
>>
>> João Távora <joaotavora@gmail.com> writes:
>>
>> > Hi all
>> >
>> > I'd like to add my package "breadcrumb" to GNU ELPA.
>> > [...]
>> > Here's a link to the project (which has a screenshot)
>> > https://github.com/joaotavora/breadcrumb
>>
>> Another package by that name already exists, but it wasn't touched in
>> 13 years: https://github.com/pheaver/breadcrumb.
>>
>> If you weren't aware of this and would like to avoid taking over an
>> existing name in the future (or be aware that you are doing that, and
>> possibly reach out to the author of the older implementation), you could
>> consult my list at https://emacsmirror.net/stats/upstreams.html, which
>> lists all packages in the Emacsmirror and Emacsattic, which is a
>> superset of packages in GNU ELPA, NonGNU ELPA and MELPA (modulo recent
>> additions).
>
> Oops, I missed that.  What does it do.
>
>> Unrelated, but since I looked at your package: Please use just two
>> semicolons inside library commentaries (and in other "non-heading"
>> comments) .  Otherwise all the lines that match "^;;;+ ." are treated
>> as headings by outline-minor-mode.  (You can of course continue to use
>> ";;;; subheading".)
>
> Not sure I 100% understand what you mean, but if you propose a
> patch I'll happily merge it.

I believe Jonas is proposing a change along these lines,


[-- Attachment #2: Type: text/plain, Size: 6953 bytes --]

diff --git a/breadcrumb.el b/breadcrumb.el
index cf527afacc..a6c1a868d7 100644
--- a/breadcrumb.el
+++ b/breadcrumb.el
@@ -21,78 +21,77 @@
 ;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 ;;; Commentary:
-;;;
+
 ;;;; Usage:
-;;;
-;;; Breadcrumbs are sequences of short strings indicating where you
-;;; are in some big tree-like maze.
-;;;
-;;; To craft these strings, this library uses the maps provided by
-;;; project.el and Imenu, respectively.  Project breadcrumbs shows you
-;;; the current buffer's path in a large project.  Imenu breadcrumbs
-;;; show the current position of point in the buffer's nested
-;;; structure of programming constructs (for example, a specific
-;;; functions within multiple C++ nested namespaces).
-;;;
-;;; To use this library:
-;;;
-;;; * `M-x breadcrumb-mode` is a global mode.  Will try to turn itself
-;;;   on conservatively and only if there's a project.
-
-;;; * `M-x breadcrumb-local-mode` is a buffer-local minor mode, if you
-;;;    don't want the default heuristics for turning it on everywhere.
-;;;
-;;; * Manually put the mode-line constructs
-;;;
-;;;     (:eval (breadcrumb-imenu-crumbs))
-;;;
-;;;   and
-;;;
-;;;     (:eval (breadcrumb-project-crumbs))
-;;;
-;;;  in your settings of the `mode-line-format' or
-;;;  `header-line-format' variables.
-;;;
-;;; The shape and size of each breadcrumb groups may be tweaked via
-;;; `breadcrumb-imenu-max-length', `breadcrumb-project-max-length',
-;;; `breadcrumb-imenu-crumb-separator', and
-;;; `breadcrumb-project-crumb-separator'.
-;;;
-;;; The structure each the breadcrumbs varies depending on whether
-;;; either project.el and imenu.el (or both) can do useful things for
-;;; your buffer.
-;;;
-;;; For Project breadcrumbs, this depends on whether project.el's
-;;; `project-current' can guess what project the current buffer
-;;; belongs to.
-;;;
-;;; For Imenu breadcrumbs, this varies.  Depending on the major-mode
-;;; author's taste, the Imenu tree (in variable `imenu--index-alist')
-;;; may have different structure.  Sometimes, minor mode also tweak
-;;; the Imenu tree in useful ways.  For example, with recent Eglot (I
-;;; think Eglot 1.14+), managed buffers get extra region info added to
-;;; it, which makes Breadcrumb show "richer" paths.
-;;;
-;;;; Implementation notes:
-;;;
-;;; This _should_ be faster than which-func.el due some caching
-;;; strategies.  One of these strategies occurs in `bc--ipath-alist',
-;;; which takes care not to over-call `imenu--make-index-alist', which
-;;; could be slow (in fact very slow if an external process needs to
-;;; be contacted).  The variable `breadcrumb-idle-delay' controls
-;;; that.  Another cache occurs in `bc--ipath-plain-cache' second is
-;;; just a simple "space-for-speed" cache.
-;;;
-;;; Breadcrumb uses the double-dashed Imenu symbols
-;;; `imenu--index-alist' and `imenu--make-index-alist'.  There's
-;;; really no official API here.  It's arguable that, despite the
-;;; name, these aren't really internal symbols (the much older
-;;; which-func.el library makes liberal use of them, for example).
-;;;
-;;;; Todo:
-;;;
-;;; Make more clicky buttons in the headerline to do whatever
-;;;
+
+;; Breadcrumbs are sequences of short strings indicating where you
+;; are in some big tree-like maze.
+;;
+;; To craft these strings, this library uses the maps provided by
+;; project.el and Imenu, respectively.  Project breadcrumbs shows you
+;; the current buffer's path in a large project.  Imenu breadcrumbs
+;; show the current position of point in the buffer's nested
+;; structure of programming constructs (for example, a specific
+;; functions within multiple C++ nested namespaces).
+
+;; To use this library:
+
+;; * `M-x breadcrumb-mode` is a global mode.  Will try to turn itself
+;;   on conservatively and only if there's a project.
+
+;; * `M-x breadcrumb-local-mode` is a buffer-local minor mode, if you
+;;    don't want the default heuristics for turning it on everywhere.
+
+;; * Manually put the mode-line constructs
+;;
+;;     (:eval (breadcrumb-imenu-crumbs))
+;;
+;;   and
+;;
+;;     (:eval (breadcrumb-project-crumbs))
+;;
+;;  in your settings of the `mode-line-format' or
+;;  `header-line-format' variables.
+
+;; The shape and size of each breadcrumb groups may be tweaked via
+;; `breadcrumb-imenu-max-length', `breadcrumb-project-max-length',
+;; `breadcrumb-imenu-crumb-separator', and
+;; `breadcrumb-project-crumb-separator'.
+
+;; The structure each the breadcrumbs varies depending on whether
+;; either project.el and imenu.el (or both) can do useful things for
+;; your buffer.
+
+;; For Project breadcrumbs, this depends on whether project.el's
+;; `project-current' can guess what project the current buffer
+;; belongs to.
+
+;; For Imenu breadcrumbs, this varies.  Depending on the major-mode
+;; author's taste, the Imenu tree (in variable `imenu--index-alist')
+;; may have different structure.  Sometimes, minor mode also tweak
+;; the Imenu tree in useful ways.  For example, with recent Eglot (I
+;; think Eglot 1.14+), managed buffers get extra region info added to
+;; it, which makes Breadcrumb show "richer" paths.
+
+;;; Implementation notes:
+
+;; This _should_ be faster than which-func.el due some caching
+;; strategies.  One of these strategies occurs in `bc--ipath-alist',
+;; which takes care not to over-call `imenu--make-index-alist', which
+;; could be slow (in fact very slow if an external process needs to
+;; be contacted).  The variable `breadcrumb-idle-delay' controls
+;; that.  Another cache occurs in `bc--ipath-plain-cache' second is
+;; just a simple "space-for-speed" cache.
+
+;; Breadcrumb uses the double-dashed Imenu symbols
+;; `imenu--index-alist' and `imenu--make-index-alist'.  There's
+;; really no official API here.  It's arguable that, despite the
+;; name, these aren't really internal symbols (the much older
+;; which-func.el library makes liberal use of them, for example).
+
+;;; Todo:
+
+;; Make more clicky buttons in the headerline to do whatever
 
 ;;; Code:
 (require 'cl-lib)
@@ -100,7 +99,7 @@
 (require 'project)
 
 \f
-;;; Customization options
+;;;; Customization options
 
 (defgroup breadcrumb nil
   "One-liner indication of where you are in the maze."
@@ -147,8 +146,8 @@ percentage of `window-width'."
   "Face for the project leaf crumb in breadcrumb project path.")
 
 \f
-;;; "ipath" management logic and imenu interoperation
-;;;
+;;;; "ipath" management logic and imenu interoperation
+
 (cl-defun bc--bisect (a x &key (from 0) (to (length a)) key from-end)
   "Compute index to insert X in sequence A, keeping it sorted.
 If X already in A, the resulting index is the leftmost such
@@ -244,7 +243,7 @@ These structures don't have a `breadcrumb-region' property on."
     imenu--index-alist))
 
 \f
-;;; Higher-level functions
+;;;; Higher-level functions
 
 ;; FIXME: Why do I need to put these key definitiosn in special
 ;; variables?

[-- Attachment #3: Type: text/plain, Size: 163 bytes --]


You can see the effect this as in practice by enabling
outline-minor-mode and running M-x outline-hide-body before and after
applying the changes.

> João

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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 16:55     ` Philip Kaludercic
@ 2023-09-05 17:00       ` João Távora
  2023-09-05 17:39         ` Philip Kaludercic
  0 siblings, 1 reply; 15+ messages in thread
From: João Távora @ 2023-09-05 17:00 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Jonas Bernoulli, emacs-devel

On Tue, Sep 5, 2023 at 5:55 PM Philip Kaludercic <philipk@posteo.net> wrote:

> > Not sure I 100% understand what you mean, but if you propose a
> > patch I'll happily merge it.
>
> I believe Jonas is proposing a change along these lines,

OK, I pushed it.

João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 17:00       ` João Távora
@ 2023-09-05 17:39         ` Philip Kaludercic
  2023-09-05 17:42           ` João Távora
  0 siblings, 1 reply; 15+ messages in thread
From: Philip Kaludercic @ 2023-09-05 17:39 UTC (permalink / raw)
  To: João Távora; +Cc: Jonas Bernoulli, emacs-devel

João Távora <joaotavora@gmail.com> writes:

> On Tue, Sep 5, 2023 at 5:55 PM Philip Kaludercic <philipk@posteo.net> wrote:
>
>> > Not sure I 100% understand what you mean, but if you propose a
>> > patch I'll happily merge it.
>>
>> I believe Jonas is proposing a change along these lines,
>
> OK, I pushed it.

If I had known that you are fine with patches for this package, I could
have saved myself from bothering with GitHub earlier ;)

> João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 17:39         ` Philip Kaludercic
@ 2023-09-05 17:42           ` João Távora
  0 siblings, 0 replies; 15+ messages in thread
From: João Távora @ 2023-09-05 17:42 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Jonas Bernoulli, emacs-devel

On Tue, Sep 5, 2023 at 6:39 PM Philip Kaludercic <philipk@posteo.net> wrote:
>
> João Távora <joaotavora@gmail.com> writes:
>
> > On Tue, Sep 5, 2023 at 5:55 PM Philip Kaludercic <philipk@posteo.net> wrote:
> >
> >> > Not sure I 100% understand what you mean, but if you propose a
> >> > patch I'll happily merge it.
> >>
> >> I believe Jonas is proposing a change along these lines,
> >
> > OK, I pushed it.
>
> If I had known that you are fine with patches for this package, I could
> have saved myself from bothering with GitHub earlier ;)

I didn't apply your patch, I skimmed through it to understand
what Jonas was requesting then did the work.

But you can send patches too.  Heck I can give you commit
rights or the whole maintainership if you promised not to
mess it up.

João



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

* Re: [ELPA] New package: breadcrumb.el
  2023-09-05 16:41   ` João Távora
  2023-09-05 16:54     ` Sebastian Miele
  2023-09-05 16:55     ` Philip Kaludercic
@ 2023-09-05 21:35     ` Jonas Bernoulli
  2 siblings, 0 replies; 15+ messages in thread
From: Jonas Bernoulli @ 2023-09-05 21:35 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

>> Another package by that name already exists, but it wasn't touched in
>> 13 years: https://github.com/pheaver/breadcrumb.
>>
>> If you weren't aware of this and would like to avoid taking over an
>> existing name in the future (or be aware that you are doing that, and
>> possibly reach out to the author of the older implementation), you could
>> consult my list at https://emacsmirror.net/stats/upstreams.html, which
>> lists all packages in the Emacsmirror and Emacsattic, which is a
>> superset of packages in GNU ELPA, NonGNU ELPA and MELPA (modulo recent
>> additions).
>
> Oops, I missed that.  What does it do.

I assume you mean the other breadcrumb.el, not the upstreams.html list.

I have never used that package, and you might want to read the full
description or even look at the code to get the full picture, but the
beginning of the description is:

> The Breadcrumb package allows you to set a series of breadcrumb
> bookmarks in Emacs and later jump to them quickly. They can be set
> with a key-stroke and jumped to with a key-stroke. The bookmarks are
> global across different Emacs buffers and thus leaving a trail of
> breadcrumb among them that you can jump back to easily. If a file is
> not loaded when jumping to its bookmark, it is loaded as a result.
>
> Different types of buffer can be bookmarked. The supported types are:
> file, DIRED, Info, and system buffers.
>
> The breadcrumb bookmarks are not the same as the Emacs built-in
> bookmark, which requires a name.



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

end of thread, other threads:[~2023-09-05 21:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-04 20:34 [ELPA] New package: breadcrumb.el João Távora
2023-09-04 20:47 ` Philip Kaludercic
2023-09-04 20:56   ` João Távora
2023-09-05  6:21     ` Philip Kaludercic
2023-09-05  9:16       ` João Távora
2023-09-05 10:16         ` Philip Kaludercic
2023-09-05 10:22           ` João Távora
2023-09-05 15:58 ` Jonas Bernoulli
2023-09-05 16:41   ` João Távora
2023-09-05 16:54     ` Sebastian Miele
2023-09-05 16:55     ` Philip Kaludercic
2023-09-05 17:00       ` João Távora
2023-09-05 17:39         ` Philip Kaludercic
2023-09-05 17:42           ` João Távora
2023-09-05 21:35     ` Jonas Bernoulli

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.