Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed line width calculation for helm source #270

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix: Links to headings with stats cookies in dynamic blocks
Fixes #248.  Closes #249.

Thanks to Maikol Solis (@maikol-solis) for reporting, and to him and
Ihor Radchenko (@yantar92) for helping plan the fix.
alphapapa committed Mar 1, 2022
commit af18eac2b80b2f56c135f37fcbdcce19fbc34b65
3 changes: 2 additions & 1 deletion README.org
Original file line number Diff line number Diff line change
@@ -524,7 +524,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like:

** 0.7-pre

Nothing new yet.
*Fixed*
+ In dynamic blocks, links to headings with statistics cookies were broken. (Fixes [[https://github.com/alphapapa/org-ql/issues/248][#248]]. Thanks to [[https://github.com/maikol-solis][Maikol Solis]] and [[https://github.com/yantar92][Ihor Radchenko]].)

** 0.6

15 changes: 12 additions & 3 deletions org-ql-search.el
Original file line number Diff line number Diff line change
@@ -38,6 +38,15 @@
(require 'org-ql)
(require 'org-ql-view)

;;;; Compatibility

(defalias 'org-ql-search--link-heading-search-string
(cond ((fboundp 'org-link--normalize-string) #'org-link--normalize-string)
((fboundp 'org-link-heading-search-string) #'org-link-heading-search-string)
((fboundp 'org-make-org-heading-search-string) #'org-make-org-heading-search-string)
(t (warn "org-ql: Unable to define alias `org-ql-search--link-heading-search-string'. This may affect links in dynamic blocks. Please report this as a bug.")
#'identity)))

;;;; Variables

(defvar org-ql-block-header nil
@@ -285,9 +294,9 @@ For example, an org-ql dynamic block header could look like:
(list (cons 'todo (lambda (element)
(org-element-property :todo-keyword element)))
(cons 'heading (lambda (element)
(org-make-link-string (org-element-property :raw-value element)
(org-link-display-format
(org-element-property :raw-value element)))))
(let ((normalized-heading
(org-ql-search--link-heading-search-string (org-element-property :raw-value element))))
(org-make-link-string normalized-heading (org-link-display-format normalized-heading)))))
(cons 'priority (lambda (element)
(--when-let (org-element-property :priority element)
(char-to-string it))))
59 changes: 32 additions & 27 deletions org-ql.info
Original file line number Diff line number Diff line change
@@ -988,7 +988,12 @@ File: README.info, Node: 07-pre, Next: 06, Up: Changelog
5.1 0.7-pre
===========

Nothing new yet.
*Fixed*
• In dynamic blocks, links to headings with statistics cookies were
broken. (Fixes #248
(https://github.com/alphapapa/org-ql/issues/248). Thanks to Maikol
Solis (https://github.com/maikol-solis) and Ihor Radchenko
(https://github.com/yantar92).)


File: README.info, Node: 06, Next: 052, Prev: 07-pre, Up: Changelog
@@ -1595,32 +1600,32 @@ Node: Links35368
Node: Tips36055
Node: Changelog36373
Node: 07-pre37111
Node: 0637217
Node: 05240231
Node: 05140531
Node: 0540948
Node: 04942422
Node: 04842696
Node: 04743043
Node: 04643438
Node: 04543838
Node: 04444199
Node: 04344558
Node: 04244755
Node: 04144916
Node: 0445157
Node: 03249090
Node: 03149469
Node: 0349666
Node: 02352641
Node: 02252869
Node: 02153137
Node: 0253336
Node: 0157371
Node: Notes57472
Node: Comparison with Org Agenda searches57634
Node: org-sidebar58506
Node: License58785
Node: 0637481
Node: 05240495
Node: 05140795
Node: 0541212
Node: 04942686
Node: 04842960
Node: 04743307
Node: 04643702
Node: 04544102
Node: 04444463
Node: 04344822
Node: 04245019
Node: 04145180
Node: 0445421
Node: 03249354
Node: 03149733
Node: 0349930
Node: 02352905
Node: 02253133
Node: 02153401
Node: 0253600
Node: 0157635
Node: Notes57736
Node: Comparison with Org Agenda searches57898
Node: org-sidebar58770
Node: License59049

End Tag Table