Coder Social home page Coder Social logo

bicycle's People

Contributors

tarsius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bicycle's Issues

Hiding local block hides end delimiter

Hi @tarsius,

I just discovered this great package which is making me actually use outline-minor-mode and hideshow!

I think commit 1bd8836 introduced an unintended side-effect. Given the block:

(defgroup bicycle nil
  "Cycle outline and code visibility."
  :group 'hideshow
  :group 'outlines)

Using hs-hide-block results in:

(defgroup bicycle nil...)

Where the end delimiter (the paren, in this case) (and the newline, which I understand you were trying to hide) still show up. I noticed something off because the EmacsWiki page on hideshow demonstrated it to act like this.

But using bicycle-cycle as setup in the readme just shows:

(defgroup bicycle nil...

The newline you were trying to hide is gone, as you intended, but also so is the end delimiter.

Could this behavior be made optional? If I'm hiding blocks locally, I kind of still desire their logical separation to be showed by the end delimiter and newline.

Add option to cycle through headlines only

This is a feature request, to provide a customizable option so that cycling considers headings only.

To be more precise, that bicycle-cycle-global cycles through "OVERVIEW -> TOC -> ALL" (skipping "TREES"), and that bicycle-cycle-local cycles through "FOLDED -> CHILDREN -> SUBTREE" (skipping "BRANCHES").

I really like the concept of bicycle, of taking only the cycling idea out of Org to outline-minor -mode, instead of trying to take Org out of Org, but I find it somewhat confusing the trees/branches level and prefer to reach those by other means.

So, if you find it pertinent, and could consider this, I'd be very much pleased and thankful.

Cycling states inconsistent with descriptions

According to the docstring of bicycle-cycle-global:

TOC: Show all headings, without treating top-level code blocks as sections.

and bicycle-cycle-local,

CHILDREN: Show the current heading and recursively those of all subsections, [...]

Both imply that all nested headings will be shown, except for code blocks. However, in both cases only one level of child subheadings is expanded.

Eg. given the following emacs-lisp buffer:

;;; h1
;;;; h2
;;;;; h3
(code)
  • Cycle to the TOC global state.
    Expected visible headings: h1, h2, h3
    Actual: h1, h2

  • From the first line (h1), cycle to the CHILDREN state.
    Expected visible headings: h1, h2, h3
    Actual: h1, h2

It's not clear if this is the intended behavior and the docstring is incorrectly written, or if it is a bug with the implementation.

More context-aware cycling

If you cycle a document that just have collapsed headers, no table of contents etc, I expect that cycling would toggle expand/collapse of those headers and not try all the other non-existing alternatives.

Currently it takes three cycles to show all collapsed headings even though there's only one top-level of headings

Different binding?

Hi,

thanks for this package, already a happy user here.

One thing I noticed, I had to configure it in a slightly different way from the one suggested in the README.

(use-package bicycle                    ; Cycle outline and code visibility
  :ensure t
  :after outline
  :bind (:map outline-minor-mode-map
              ("<C-tab>"   . bicycle-cycle)
              ("<backtab>" . bicycle-cycle-global)))

On my system, S-tab is translated into backtab. These are some details about my system:

GNU Emacs 27.0.50 (build 1, x86_64-debian-linux-gnu, GTK+ Version 3.22.30)
 of 2018-06-23

Repository revision: 6ffc6a698f5d425e402c35010394cdb17d8888ce
Configured using:
--host=x86_64-debian-linux-gnu

Emacs uptime: 8 minutes, 30 seconds
Colour theme: sanityinc-tomorrow-night
Operating system: Ubuntu 18.04 LTS
Window system: x11
Desktop environment: GNOME Shell 3.28.1

Nothing serious, of course, just wanted to point out the different binding if it could be of any help.

cycling doesn't work in emacs lisp buffers

When I invoke bicycle-cycle-global in an emacs lisp buffer the appropriate message (OVERVIEW, TOC, TREES, ALL) is printed to the minibuffer, but nothing else happens; nothing is folded, no visible changes in the buffer.

When I invoke bicycle-cycle on a heading (e.g. ;;; Code: or ;;; Options), nothing happens and FOLDED is printed to the minibuffer everytime.

Note that bicycle-cycle on a code block works (as in hs-toggle-hiding), but takes 2 calls instead of one for each new code block; i.e. on the first call nothing happens, only on the second call the code block hides; after that it shows and hides correctly.

Steps to reproduce:

  1. Open bicycle.el
  2. M-x bicycle-cycle-global

Relevant info:

outline-regexp’s value is ";;;\\(;* [^ 	
]\\|###autoload\\)\\|("
Local in buffer bicycle.el; global value is "[*\f]+"
GNU Emacs 25.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.22.30) of 2019-05-04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.