Change in Org Capture target parsing

2024-02-21 Thread Derek Chen-Becker
Hi,

I started getting an error after updating to the latest commit on main:

Invalid capture target specification: (file+headline org-default-notes-file
"Tasks")

I bisected it down to 0a58a53edac955381266e49bd68d1140fbece33e, but I can't
tell from the commit what's wrong with my definition or how to fix it. I
found this thread in the mailing list, but it doesn't help me shed light on
what I'm doing wrong:

https://lists.gnu.org/archive/html/emacs-orgmode/2024-02/msg00153.html

Is it because I'm using the variable "org-default-notes-file" and not a
string? If that's the case then it's probably easy for me to fix in my
config, but I wanted to check first.

Thanks,

Derek

-- 
+-------+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: High CPU with org-set-tags-command in org-capture buffer

2023-09-15 Thread Derek Chen-Becker
Well, I haven't had time to try and repro, but I did a straight-pull to get
a newer version of Org and now the issue isn't happening anymore. I'm not
sure if there's any cause/effect there, but for any future folks looking at
this thread it might be worth a try.

Cheers,

Derek

On Wed, Aug 16, 2023 at 11:37 AM Ihor Radchenko  wrote:

> Derek Chen-Becker  writes:
>
> > ... It looks
> > like a duplicate of what was reported in
> > https://lists.gnu.org/archive/html/emacs-orgmode/2023-05/msg00402.html.
>
> Hard to say, because I was not able to reproduce.
>
> > ... Am
> > I correct that this is unresolved/unreproducible by others? If so, I'll
> see
> > if I can get a minimal repro.
>
> That would be nice. I cannot help without being able to see the problem.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


High CPU with org-set-tags-command in org-capture buffer

2023-08-16 Thread Derek Chen-Becker
Hi, I recently upgrade to Emacs 29.1 and I also pulled the latest org
(commit cc435cba7), and I just noticed that when I'm in an org capture
buffer and try to execute org-set-tags-command, the CPU goes to 100% and
just seems to stay there (I gave up and hit ctrl-G after a couple of
minutes). The same command works fine outside of a capture buffer. It looks
like a duplicate of what was reported in
https://lists.gnu.org/archive/html/emacs-orgmode/2023-05/msg00402.html. Am
I correct that this is unresolved/unreproducible by others? If so, I'll see
if I can get a minimal repro.

Thanks,

Derek

-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-07 Thread Derek Chen-Becker
In the code I posted, I had to explicitly (require 'sh-script) to ensure
that the sh-ancestor-alist is loaded before the code. I'm not enough of an
elisp guru to know if there's a way to defer that.

Cheers,

Derek

On Fri, Apr 7, 2023 at 9:30 AM Matt  wrote:

>
>   On Tue, 04 Apr 2023 08:30:34 -0400  Ihor Radchenko  wrote ---
>
>  > See the attached tentative patch.
>
> After applying the patch, I get the following error when trying to load
> Emacs:
>
> Warning (comp): /home/ahab/Projects/org-mode/lisp/org.el: Error: Symbol's
> value as variable is void sh-ancestor-alist
>
> I wasn't able to resolve it.  I suspect the issue is on my end, such as a
> mixed install or the need to  re-byte-compile  `sh-script.el'.
>
> To run Org from source I do one of the following:
>
> ;; When using my init
> (use-package org :straight (:local-repo "/home/ahab/Projects/org-mode"))
>
> ;; When running emacs -q
> (add-to-list 'load-path "/home/ahab/Projects/org-mode/lisp")
> (require 'org-loaddefs)
>
> If I need to recompile Emacs byte code, I'm not sure how I'd do that since
> I'm running Guix and those files live in the write protected /gnu/store.
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-04 Thread Derek Chen-Becker
The patch looks good to me!

Thanks,

Derek

On Tue, Apr 4, 2023 at 6:30 AM Ihor Radchenko  wrote:

> Derek Chen-Becker  writes:
>
> > I fiddled around a little bit this weekend and confirmed that this
> (sloppy)
> > code makes highlighting work for all shell types that sh-script supports:
> >
> > ;;A quick hack to try and support more shells syntax highlight in org
> babel
> > (require 'sh-script)
> > (require 'ob-shell)
> > (let ((shells (seq-filter (lambda (shell) (not (eq shell 'sh)))
> > (flatten-tree sh-ancestor-alist
>
> See the attached tentative patch.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-03 Thread Derek Chen-Becker
I fiddled around a little bit this weekend and confirmed that this (sloppy)
code makes highlighting work for all shell types that sh-script supports:

;;A quick hack to try and support more shells syntax highlight in org babel
(require 'sh-script)
(require 'ob-shell)
(let ((shells (seq-filter (lambda (shell) (not (eq shell 'sh)))
(flatten-tree sh-ancestor-alist
  (let ((toAppend (mapcar (lambda (shell) `(,(symbol-name shell) . sh))
shells)))
(setq org-src-lang-modes (-distinct (append toAppend
org-src-lang-modes)

I'm a relative newcomer to elisp, so comments and suggestions are welcome.
This is basically what I meant by "dynamically amend org-src-lang-modes
based on the contents of sh-ancestor-alist".

Thanks,

Derek

On Sat, Apr 1, 2023 at 5:22 PM Matt  wrote:

>
>   On Thu, 30 Mar 2023 04:55:32 -0400  Ihor Radchenko  wrote ---
>  > Matt m...@excalamus.com> writes:
>  >
>  > > I think this approach will work fine.   I tried examples for each
> shell type and keywords like if/then/else and function names are
> highlighted.
>  >
>  > Even for posh (powershell)?
>
> Yes.  It's not great since sh-mode looks for Korn-based keywords.  It does
> string highlighting and common keywords like 'if', 'exit', and 'param'.
>
>

-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-03-31 Thread Derek Chen-Becker
When I asked the question I was just thinking of using it as a reference
for expanding the current org-src-lang-modes values, but now that you've
asked the question, perhaps we could dynamically amend org-src-lang-modes
based on the contents of sh-ancestor-alist. Does that make sense?

Thanks,

Derek

On Fri, Mar 31, 2023 at 7:06 AM Ihor Radchenko  wrote:

> Derek Chen-Becker  writes:
>
> > Would it be fair to use the sh-ancestor-alist as a basis for all of the
> > supported shell variants?
> >
> >
> https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/sh-script.el#L177
>
> How can we use it?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-03-30 Thread Derek Chen-Becker
Would it be fair to use the sh-ancestor-alist as a basis for all of the
supported shell variants?

https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/sh-script.el#L177

Cheers,

Derek

On Thu, Mar 30, 2023 at 2:54 AM Ihor Radchenko  wrote:

> Matt  writes:
>
> > I think this approach will work fine.   I tried examples for each shell
> type and keywords like if/then/else and function names are highlighted.
>
> Even for posh (powershell)?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+-------+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-03-29 Thread Derek Chen-Becker
Cool, I would be happy to submit a patch!

Thanks,

Derek

On Wed, Mar 29, 2023 at 3:33 AM Ihor Radchenko  wrote:

> Matt  writes:
>
> >  Does anyone know which function is responsible for re-fontifing source
> blocks?
>
> `org-src-font-lock-fontify-block', which is using major-mode's native
> fontification. The major mode is determined by `org-src-get-lang-mode',
> which can be customized using `org-src-lang-modes'.
>
> Org provides some defaults for bash in `org-src-lang-modes' but not for
> other shell flavours. I guess we can add more defaults to
> `org-src-lang-modes', if we know for sure that e.g. zsh can be fontified
> sh-mode.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Font lock for org-babel shell scripts?

2023-03-28 Thread Derek Chen-Becker
Hi,

I'm trying to figure out whether there's a bug or just a misconfiguration
on my end with font lock for org-babel shell source blocks. If I run emacs
28.2 (with -q) and open the following org file, I can evaluate both source
blocks but only the "bash" block has syntax highlighting. I've confirmed
that opening a zsh script (e.g. with a zsh shebang) highlights correctly.
If this list isn't the right place to ask about this issue, does someone
know where I could look for help?

Thanks,

Derek

#+begin_src bash
  if [ -z $TEST ]; then
  echo Good
  fi
#+end_src

#+begin_src zsh
  if [ -z $TEST ]; then
  echo Good
  fi
#+end_src

# Local Variables:
# org-babel-load-languages: ((shell . t))
# End:



-- 
+-------+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: [BUG] Effort range format broken [9.5.5 (release_9.5.5 @ /usr/local/share/emacs/28.2/lisp/org/)]

2023-03-03 Thread Derek Chen-Becker
Confirmed, I upgraded to 9.6.1 and it works for me. Thanks!

On Fri, Mar 3, 2023 at 9:03 AM Ihor Radchenko  wrote:

> Derek Chen-Becker  writes:
>
> > Here is the minimal org file to repro:
> >
> > 
> > #+COLUMNS: %ITEM(Task) %Effort(Estimate){est+}
> >
> > * Table
> > #+BEGIN: columnview :id input
> >
> > #+END
> > ...
>
> With point at #+BEGIN, pressing C-c C-c works just fine for me.
> Using Org 9.6.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


[BUG] Effort range format broken [9.5.5 (release_9.5.5 @ /usr/local/share/emacs/28.2/lisp/org/)]

2023-03-02 Thread Derek Chen-Becker
"\207" ["news"
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("mailto" :follow #[514 "\301\300\302Q\"\207"
["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("https" :follow #[514 "\301\300\302Q\"\207"
["https" browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("http" :follow #[514 "\301\300\302Q\"\207" ["http"
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp"
browse-url ":"] 6 "\n\n(fn URL ARG)"])
   ("help" :follow org-link--open-help :store
org-link--store-help)
   ("file" :complete org-link-complete-file) ("elisp"
:follow org-link--open-elisp))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 )


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Re: Effort range support broken? (est+)

2023-03-02 Thread Derek Chen-Becker
It does seem broken for me on 28.2 (Org 9.5.5). I'll put together a minimum
repro and submit. Thanks!

Cheers,

Derek

On Thu, Mar 2, 2023 at 4:34 AM Ihor Radchenko  wrote:

> Derek Chen-Becker  writes:
>
> > https://lists.gnu.org/archive/html/emacs-orgmode/2020-09/msg00571.html),
> > and it appears that the range support for effort is still broken. I'm
> > wondering if anyone knows how this could be fixed, since effort ranges
> > would be really helpful for estimation. I'm a passable elisper, so I'm
> > happy to help fix this if someone can point me in the right direction.
>
> Thanks for reporting!
>
> The next reply in the thread claims that the issue has been fixed:
> https://list.orgmode.org/87zgww8i59@gnu.org/
>
> Is it broken for you now, on the latest Org?
> If so, could you please provide a reproducer?
> See https://orgmode.org/manual/Feedback.html#Feedback
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
+---+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+


Effort range support broken? (est+)

2023-03-01 Thread Derek Chen-Becker
Hi,

I was just reading
https://randomthoughts.dk/posts/2023/org-mode-for-project-estimation/ and
started learning about columnview and org mode. One thing I've run into is
that effort range values seem to be broken. The last mention of this on the
mailing list was back in 2020 (
https://lists.gnu.org/archive/html/emacs-orgmode/2020-09/msg00571.html),
and it appears that the range support for effort is still broken. I'm
wondering if anyone knows how this could be fixed, since effort ranges
would be really helpful for estimation. I'm a passable elisper, so I'm
happy to help fix this if someone can point me in the right direction.

Thanks,

Derek

-- 
+-------+
| Derek Chen-Becker |
| GPG Key available at https://keybase.io/dchenbecker and   |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---+