* [bug#37080] [PATCH] Update emacs-org-recent-headings.
@ 2019-08-19 6:34 Brian Leung
2019-08-27 10:30 ` Ludovic Courtès
2021-11-23 4:26 ` [bug#37080] [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-0.97418d5 Morgan.J.Smith
0 siblings, 2 replies; 5+ messages in thread
From: Brian Leung @ 2019-08-19 6:34 UTC (permalink / raw)
To: 37080
[-- Attachment #1.1: Type: text/plain, Size: 233 bytes --]
The version of emacs-org-recent-headings on Guix doesn't work correctly for
people with Helm installed. I submitted patches to the upstream maintainer
of emacs-org-recent-headings. Attached is a Guix patch incorporating the
changes.
[-- Attachment #1.2: Type: text/html, Size: 263 bytes --]
[-- Attachment #2: 0001-gnu-emacs-org-recent-headings-Update-to-0.1-1.6336a0.patch --]
[-- Type: text/x-patch, Size: 11776 bytes --]
From 240c13331359e8c19fc5aa2b35a6839b37fabda2 Mon Sep 17 00:00:00 2001
From: Brian Leung <bkleung89@gmail.com>
Date: Sun, 11 Aug 2019 18:21:19 +0200
Subject: [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-1.6336a0c.
* gnu/packages/emacs-xyz.scm: Update to 0.1-1.6336a0c.
* gnu/packages/patches/emacs-org-recent-headings.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/emacs-xyz.scm | 57 +++++---
.../patches/emacs-org-recent-headings.patch | 137 ++++++++++++++++++
3 files changed, 174 insertions(+), 21 deletions(-)
create mode 100644 gnu/packages/patches/emacs-org-recent-headings.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index aab29beb0a..04d35686aa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -782,6 +782,7 @@ dist_patch_DATA = \
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
%D%/packages/patches/emacs-json-reformat-fix-tests.patch \
%D%/packages/patches/emacs-highlight-stages-add-gexp.patch \
+ %D%/packages/patches/emacs-org-recent-headings.patch \
%D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \
%D%/packages/patches/emacs-source-date-epoch.patch \
%D%/packages/patches/emacs-unpackaged-req.patch \
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ffc662f746..28571911d7 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -10853,28 +10853,43 @@ a heuristic based on frequency and recency.")
(license license:gpl3+))))
(define-public emacs-org-recent-headings
- (package
- (name "emacs-org-recent-headings")
- (version "0.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/alphapapa/org-recent-headings.git")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0gsrzmg3mssh9s28yjm9m866fnhm1pcligssz1q6brga6dm6f2yy"))))
- (build-system emacs-build-system)
- (propagated-inputs
- `(("emacs-org" ,emacs-org)
- ("emacs-dash" ,emacs-dash)
- ("emacs-frecency" ,emacs-frecency)))
- (home-page "https://github.com/alphapapa/org-recent-headings")
- (synopsis "Navigate to recently used Org headings and lists")
- (description "This package maintains a list of recently used Org headings,
+ (let ((commit "6336a0c36ef1048ba1f4e07716a421dce106d082")
+ (revision "1"))
+ (package
+ (name "emacs-org-recent-headings")
+ (version (git-version "0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alphapapa/org-recent-headings.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1lpkjvlm969pr64j25zkpmsacjnr7qbq9zfwwzb9xyqlhaf5zzz0"))
+ ;; XXX: Remove once
+ ;; https://github.com/alphapapa/org-recent-headings/pull/12
+ ;; and
+ ;; https://github.com/alphapapa/org-recent-headings/pull/13
+ ;; are merged. We need this patch to ensure that Helm users
+ ;; on Guix are able to use the package properly, since the
+ ;; upstream and the release version currently mishandle the
+ ;; optional Helm dependency. People who aren't using
+ ;; Guix-installed packages don't seem to be encountering this
+ ;; problem.
+ (patches (search-patches "emacs-org-recent-headings.patch"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-org" ,emacs-org)
+ ("emacs-frecency" ,emacs-frecency)))
+ (inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-s" ,emacs-s)))
+ (home-page "https://github.com/alphapapa/org-recent-headings")
+ (synopsis "Navigate to recently used Org headings and lists")
+ (description "This package maintains a list of recently used Org headings,
as well as functions for navigating between these headings.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public emacs-org-super-agenda
;; emacs-org-sidebar depends on a newer commit than the latest release version.
diff --git a/gnu/packages/patches/emacs-org-recent-headings.patch b/gnu/packages/patches/emacs-org-recent-headings.patch
new file mode 100644
index 0000000000..1cfc31b8b4
--- /dev/null
+++ b/gnu/packages/patches/emacs-org-recent-headings.patch
@@ -0,0 +1,137 @@
+From 9452ff5d9d36974d522fcb9d66ea7243202b1eb5 Mon Sep 17 00:00:00 2001
+From: Brian Leung <bkleung89@gmail.com>
+Date: Thu, 15 Aug 2019 04:42:37 +0200
+Subject: [PATCH] Change handling of optional dependencies.
+
+org-recent-headings-helm: `declare-function` does not seem to work on
+macros, so `helm-make-source` is used instead of
+helm-build-sync-source.
+
+org-recent-headings-ivy: Add dispatch actions.
+---
+ org-recent-headings.el | 89 ++++++++++++++++++++++++++++++------------
+ 1 file changed, 63 insertions(+), 26 deletions(-)
+
+diff --git a/org-recent-headings.el b/org-recent-headings.el
+index aea76f5..335fb89 100644
+--- a/org-recent-headings.el
++++ b/org-recent-headings.el
+@@ -222,27 +222,26 @@ With prefix argument ARG, turn on if positive, otherwise off."
+
+ ;;;;; Helm
+
+-(with-eval-after-load 'helm
+-
+- ;; This declaration is absolutely necessary for some reason. Even if `helm' is loaded
+- ;; before this package is loaded, an "invalid function" error will be raised when this
+- ;; package is loaded, unless this declaration is here. Even if I manually "(require
+- ;; 'helm)" and then load this package after the error (and Helm is already loaded, and I've
+- ;; verified that `helm-build-sync-source' is defined), once Emacs has tried to load this
+- ;; package thinking that the function is invalid, it won't stop thinking it's invalid. It
+- ;; also seems to be related to `defvar' not doing anything when run a second time (unless
+- ;; called with `eval-defun'). But at the same time, the error didn't always happen in my
+- ;; config, or with different combinations of `with-eval-after-load', "(when (fboundp 'helm)
+- ;; ...)", and loading packages in a different order. I don't know exactly why it's
+- ;; happening, but at the moment, this declaration seems to fix it. Let us hope it really
+- ;; does. I hope no one else is suffering from this, because if so, I have inflicted mighty
+- ;; annoyances upon them, and I wouldn't blame them if they never used this package again.
+- (declare-function helm-build-sync-source "helm")
+- (declare-function helm-exit-and-execute-action "helm")
+- (declare-function helm-marked-candidates "helm")
+- (declare-function with-helm-alive-p "helm")
+- (declare-function helm-make-actions "helm-lib")
++;; This declaration is absolutely necessary for some reason. Even if `helm' is loaded
++;; before this package is loaded, an "invalid function" error will be raised when this
++;; package is loaded, unless this declaration is here. Even if I manually "(require
++;; 'helm)" and then load this package after the error (and Helm is already loaded, and I've
++;; verified that `helm-build-sync-source' is defined), once Emacs has tried to load this
++;; package thinking that the function is invalid, it won't stop thinking it's invalid. It
++;; also seems to be related to `defvar' not doing anything when run a second time (unless
++;; called with `eval-defun'). But at the same time, the error didn't always happen in my
++;; config, or with different combinations of `with-eval-after-load', "(when (fboundp 'helm)
++;; ...)", and loading packages in a different order. I don't know exactly why it's
++;; happening, but at the moment, this declaration seems to fix it. Let us hope it really
++;; does. I hope no one else is suffering from this, because if so, I have inflicted mighty
++;; annoyances upon them, and I wouldn't blame them if they never used this package again.
++(declare-function helm-make-source "ext:helm-source")
++(declare-function helm-exit-and-execute-action "ext:helm")
++(declare-function helm-marked-candidates "ext:helm")
++;; (declare-function with-helm-alive-p "ext:helm")
++(declare-function helm-make-actions "ext:helm-lib")
+
++(with-eval-after-load 'helm
+ (defvar helm-map)
+ (defvar org-recent-headings-helm-map
+ (let ((map (copy-keymap helm-map)))
+@@ -251,7 +250,7 @@ With prefix argument ARG, turn on if positive, otherwise off."
+ "Keymap for `helm-source-org-recent-headings'.")
+
+ (defvar helm-source-org-recent-headings
+- (helm-build-sync-source " Recent Org headings"
++ (helm-make-source " Recent Org headings" 'helm-source-sync
+ :candidates (lambda ()
+ (org-recent-headings--prepare-list)
+ org-recent-headings-list)
+@@ -297,16 +296,54 @@ With prefix argument ARG, turn on if positive, otherwise off."
+
+ ;;;;; Ivy
+
+-(with-eval-after-load 'ivy
++(declare-function ivy-read "ext:ivy")
++(declare-function ivy-set-actions "ext:ivy")
+
+- ;; TODO: Might need to declare `ivy-completing-read' also, but I
+- ;; haven't hit the error yet.
++(with-eval-after-load 'ivy
++ (defun org-recent-headings-make-tuple (entry)
++ "Make a tuple containing the display text of ENTRY paired with ENTRY."
++ (let* ((init-display (org-recent-headings-entry-display entry))
++ (heading-fragment (substring init-display
++ (next-property-change 0 init-display)))
++ (final-display (concat (org-recent-headings-entry-file entry)
++ ":"
++ heading-fragment)))
++ (cons final-display entry)))
++
++ (defun org-recent-headings--show-entry-indirect-ivy (cand)
++ "Ivy-friendly wrapper for org-recent-headings--show-entry-indirect."
++ (org-recent-headings--show-entry-indirect
++ (cdr cand)))
++ (defun org-recent-headings--show-entry-direct-ivy (cand)
++ "Ivy-friendly wrapper for org-recent-headings--show-entry-direct."
++ (org-recent-headings--show-entry-direct
++ (cdr cand)))
++ (defun org-recent-headings--bookmark-entry-ivy (cand)
++ "Ivy-friendly wrapper for org-recent-headings--bookmark-entry"
++ (org-recent-headings--bookmark-entry
++ (cdr cand)))
++ (defun org-recent-headings--show-entry-default-ivy (cand)
++ "Ivy-friendly wrapper for org-recent-headings--show-entry-default."
++ (funcall org-recent-headings-show-entry-function
++ (cdr cand)))
+
+ (defun org-recent-headings-ivy ()
+ "Choose from recent Org headings with Ivy."
+ (interactive)
+- (let ((completing-read-function #'ivy-completing-read))
+- (org-recent-headings))))
++ (ivy-read "Recent Org headings: "
++ (progn
++ (org-recent-headings--prepare-list)
++ (-map #'org-recent-headings-make-tuple
++ org-recent-headings-list))
++ :history 'org-recent-headings-ivy-history
++ :caller 'org-recent-headings-ivy
++ :action 'org-recent-headings--show-entry-default-ivy))
++
++ (ivy-set-actions
++ 'org-recent-headings-ivy
++ '(("n" org-recent-headings--show-entry-indirect-ivy "show in indirect buffer")
++ ("d" org-recent-headings--show-entry-direct-ivy "show in direct buffer")
++ ("b" org-recent-headings--bookmark-entry-ivy "bookmark heading"))))
+
+ ;;;; Functions
+
+--
+2.22.0
+
--
2.23.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#37080] [PATCH] Update emacs-org-recent-headings.
2019-08-19 6:34 [bug#37080] [PATCH] Update emacs-org-recent-headings Brian Leung
@ 2019-08-27 10:30 ` Ludovic Courtès
[not found] ` <CAAc=MEy6Va6Ln=5Lpr1b_m+1A-N+HvdK0u2ORzyRf7pcRFmbiA@mail.gmail.com>
2021-11-23 4:26 ` [bug#37080] [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-0.97418d5 Morgan.J.Smith
1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2019-08-27 10:30 UTC (permalink / raw)
To: Brian Leung; +Cc: 37080
Hi Brian,
Brian Leung <bkleung89@gmail.com> skribis:
> The version of emacs-org-recent-headings on Guix doesn't work correctly for
> people with Helm installed. I submitted patches to the upstream maintainer
> of emacs-org-recent-headings. Attached is a Guix patch incorporating the
> changes.
Have these patches been applied upstream?
Since we’re building from an upstream commit, we might just as well wait
until the changes are available upstream.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#37080] [PATCH] Update emacs-org-recent-headings.
[not found] ` <CAAc=MEy6Va6Ln=5Lpr1b_m+1A-N+HvdK0u2ORzyRf7pcRFmbiA@mail.gmail.com>
@ 2019-09-10 4:24 ` Maxim Cournoyer
0 siblings, 0 replies; 5+ messages in thread
From: Maxim Cournoyer @ 2019-09-10 4:24 UTC (permalink / raw)
To: Brian Leung; +Cc: 37080
Hello Brian,
Brian Leung <bkleung89@gmail.com> writes:
> Hi Ludovic,
>
> The patches haven't been applied upstream. The upstream maintainer doesn't
> review PRs in a timely manner, so I thought it might be worth submitting
> the patch here.
>
> Thanks,
> Brian
>
> On Tue, Aug 27, 2019 at 12:30 PM Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Hi Brian,
>>
>> Brian Leung <bkleung89@gmail.com> skribis:
>>
>> > The version of emacs-org-recent-headings on Guix doesn't work correctly
>> for
>> > people with Helm installed. I submitted patches to the upstream
>> maintainer
>> > of emacs-org-recent-headings. Attached is a Guix patch incorporating the
>> > changes.
>>
>> Have these patches been applied upstream?
>>
>> Since we’re building from an upstream commit, we might just as well wait
>> until the changes are available upstream.
>>
>> Thanks,
>> Ludo’.
+1, especially since the patches submitted upstream are still a WIP, AFAICT.
(see: https://github.com/alphapapa/org-recent-headings/issues/11).
Let's wait until a conclusion for a fix is reached and merged upstream
before we continue.
Thanks for your efforts in investigating the problem and working on a fix.
Maxim
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#37080] [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-0.97418d5.
2019-08-19 6:34 [bug#37080] [PATCH] Update emacs-org-recent-headings Brian Leung
2019-08-27 10:30 ` Ludovic Courtès
@ 2021-11-23 4:26 ` Morgan.J.Smith
2021-11-23 9:33 ` bug#37080: " Nicolas Goaziou
1 sibling, 1 reply; 5+ messages in thread
From: Morgan.J.Smith @ 2021-11-23 4:26 UTC (permalink / raw)
To: 37080, bkleung89, ludo, maxim.cournoyer; +Cc: Morgan Smith
From: Morgan Smith <Morgan.J.Smith@outlook.com>
* gnu/packages/emacs-xyz.scm (emacs-org-recent-headings): Update to 0.1-0.97418d5.
[propagated-inputs]: Add emacs-s and emacs-helm
---
Looks like the issue got fixed upstream.
The issue for reference: https://github.com/alphapapa/org-recent-headings/issues/11
gnu/packages/emacs-xyz.scm | 46 +++++++++++++++++++++-----------------
1 file changed, 25 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f98425eab9..0fb3ee3a0c 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -17702,28 +17702,32 @@ (define-public emacs-frecency
(license license:gpl3+))))
(define-public emacs-org-recent-headings
- (package
- (name "emacs-org-recent-headings")
- (version "0.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/alphapapa/org-recent-headings")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0gsrzmg3mssh9s28yjm9m866fnhm1pcligssz1q6brga6dm6f2yy"))))
- (build-system emacs-build-system)
- (propagated-inputs
- `(("emacs-org" ,emacs-org)
- ("emacs-dash" ,emacs-dash)
- ("emacs-frecency" ,emacs-frecency)))
- (home-page "https://github.com/alphapapa/org-recent-headings")
- (synopsis "Navigate to recently used Org headings and lists")
- (description "This package maintains a list of recently used Org headings,
+ (let ((commit "97418d581ea030f0718794e50b005e9bae44582e")
+ (revision "0"))
+ (package
+ (name "emacs-org-recent-headings")
+ (version (git-version "0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/alphapapa/org-recent-headings")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1y11rlnhi36lzhc1cagninv6hlcwbvj88xfr0g0xzpbzy7hys021"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-frecency" ,emacs-frecency)
+ ("emacs-helm" ,emacs-helm)
+ ("emacs-org" ,emacs-org)
+ ("emacs-s" ,emacs-s)))
+ (home-page "https://github.com/alphapapa/org-recent-headings")
+ (synopsis "Navigate to recently used Org headings and lists")
+ (description "This package maintains a list of recently used Org headings,
as well as functions for navigating between these headings.")
- (license license:gpl3+)))
+ (license license:gpl3+))))
(define-public emacs-org-super-agenda
(package
--
2.34.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#37080: [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-0.97418d5.
2021-11-23 4:26 ` [bug#37080] [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-0.97418d5 Morgan.J.Smith
@ 2021-11-23 9:33 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2021-11-23 9:33 UTC (permalink / raw)
To: Morgan.J.Smith; +Cc: bkleung89, ludo, maxim.cournoyer, 37080-done
Hello,
Morgan.J.Smith@outlook.com writes:
> * gnu/packages/emacs-xyz.scm (emacs-org-recent-headings): Update to 0.1-0.97418d5.
> [propagated-inputs]: Add emacs-s and emacs-helm
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-23 9:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-19 6:34 [bug#37080] [PATCH] Update emacs-org-recent-headings Brian Leung
2019-08-27 10:30 ` Ludovic Courtès
[not found] ` <CAAc=MEy6Va6Ln=5Lpr1b_m+1A-N+HvdK0u2ORzyRf7pcRFmbiA@mail.gmail.com>
2019-09-10 4:24 ` Maxim Cournoyer
2021-11-23 4:26 ` [bug#37080] [PATCH] gnu: emacs-org-recent-headings: Update to 0.1-0.97418d5 Morgan.J.Smith
2021-11-23 9:33 ` bug#37080: " Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.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.