Comments (5)
That was right! I changed oi-collect-outlines
to return the cdr
of the list it was returning before and then it worked.
I'm not sure how that nil
is getting there to begin with though.
Can't stress enough how nice this is for organizing and navigating my spacemacs config among other things.
from .spacemacs.d.
Try running oi-collect-outlines
anywhere in the buffer and also oi--collect-outline
on a line containing an outline and tell me their output. I think the marker isn't being consed, so it doesn't know where to jump.
I also don't understand why (_ . marker) is used.
Dash's -lambda
is destructuring the input, namely a cons cell. The cdr is the marker we jump to. We don't need the name, namely the _
, when jumping.
Glad you like the idea of outline-ivy
. It is a package I've come used to having, I find it pretty practical.
I've dumped all my work in this lib. I've considered separate repos through git submodules but haven't gotten around it.
from .spacemacs.d.
Here's the output from oi-collect-outlines
(nil (#("1Config" 0 1 (invisible t) 1 7 (face oi-face-1)) . #<marker at 146 in outline-ivy.el>) (#("1Utils" 0 1 (invisible t) 1 6 (face oi-face-1)) . #<marker at 680 in outline-ivy.el>) (#("1Outline Jump" 0 1 (invisible t) 1 13 (face oi-face-1)) . #<marker at 2531 in outline-ivy.el>) (#("1Binding" 0 1 (invisible t) 1 8 (face oi-face-1)) . #<marker at 3624 in outline-ivy.el>))
Here's the output from oi--collect-outline
on a header line
Debugger entered--Lisp error: (args-out-of-range #<buffer outline-ivy.el> 0 0)
buffer-substring-no-properties(0 0)
match-string-no-properties(1)
(let* ((level (outshine-calc-outline-level)) (parents (when level (--map (plist-get oi--parents-plist it) (number-sequence 1 (- level 1))))) (str (match-string-no-properties 1)) (name (oi-format-name-pretty str parents level))) (when level (setq oi--parents-plist (plist-put oi--parents-plist level str))) (->> (point-marker) (cons name) (when level)))
(-let* ((level (outshine-calc-outline-level)) (parents (when level (--map (plist-get oi--parents-plist it) (number-sequence 1 (- level 1))))) (str (match-string-no-properties 1)) (name (oi-format-name-pretty str parents level))) (when level (setq oi--parents-plist (plist-put oi--parents-plist level str))) (->> (point-marker) (cons name) (when level)))
(save-excursion (beginning-of-line) (-let* ((level (outshine-calc-outline-level)) (parents (when level (--map (plist-get oi--parents-plist it) (number-sequence 1 (- level 1))))) (str (match-string-no-properties 1)) (name (oi-format-name-pretty str parents level))) (when level (setq oi--parents-plist (plist-put oi--parents-plist level str))) (->> (point-marker) (cons name) (when level))))
oi--collect-outline()
eval((oi--collect-outline) nil)
elisp--eval-last-sexp(nil)
#f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. With a prefix argument of zero,\nhowever, there is no such truncation. Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x400d461f>)(nil)
#f(compiled-function (&rest _it) #<bytecode 0x453f7fb9>)()
eval-sexp-fu-flash-doit-simple(#f(compiled-function (&rest _it) #<bytecode 0x453f7fb9>) #f(compiled-function (&rest args2) #<bytecode 0x4600f639>) #f(compiled-function (&rest args2) #<bytecode 0x4600f659>))
eval-sexp-fu-flash-doit(#f(compiled-function (&rest _it) #<bytecode 0x453f7fb9>) #f(compiled-function (&rest args2) #<bytecode 0x4600f639>) #f(compiled-function (&rest args2) #<bytecode 0x4600f659>))
esf-flash-doit(#f(compiled-function (&rest _it) #<bytecode 0x453f7fb9>) #f(compiled-function (&rest args2) #<bytecode 0x4600f639>) #f(compiled-function (&rest args2) #<bytecode 0x4600f659>) #f(compiled-function (&rest args2) #<bytecode 0x4600f679>))
ad-Advice-eval-last-sexp(#f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. With a prefix argument of zero,\nhowever, there is no such truncation. Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x400d461f>) nil)
apply(ad-Advice-eval-last-sexp #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'. With a prefix argument of zero,\nhowever, there is no such truncation. Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x400d461f>) nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
The destructuring makes sense. I think I'm starting to understand how it's supposed to work. oi-collect-outlines
should return a list of cons cells with the outline name as the first element and the outline marker as the second element. But currently only the name is being passed in to the action.
from .spacemacs.d.
Pretty sure it's that initial nil
, try getting rid of that or doing something like lambda (name-marker) (when name-marker (let ((marker (cdr name-marker)) ....)
in the oi-jump
. Not at my PC today.
from .spacemacs.d.
Reopening this issue, the recent updates made to outshine were the cause.
I'll be fixing this shortly.
from .spacemacs.d.
Related Issues (20)
- How to by-passing the aspect of using special fonts? HOT 2
- === and =/= ligatures not showing in pretty-font HOT 1
- Outline with leading spaces a not prettified by prettify-outline
- Help with pretty outlines HOT 2
- Please review receipts for additional customization HOT 2
- pretty-outlines: missing a require HOT 3
- Warning (emacs): ‘outshine-hook-function’ has been deprecated, use ‘outshine-mode’
- mode line is empty HOT 11
- Folding comments in Haskell mode make ghc unhappy HOT 6
- C-c C-c broken for notes HOT 4
- I added org-gcal support HOT 1
- Completely disable redo-spacemacs-bindings HOT 1
- error when start up "Symbol’s function definition is void: redo-spacemacs-bindings" HOT 1
- ‘dap’ layer is not installed, please add ‘dap’ layer to your dotfile. HOT 1
- Can not enable ligatures HOT 2
- Setting to org-structure-template-alist causes error
- can not start ? HOT 7
- Overwrite outshine defined regexps
- Unconsistent behaviour with pretty outlines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from .spacemacs.d.