RE: Problem with let/cl-letf binding stuff with org-capture

2023-02-15 Thread arthur miller
Ämne: Re: Problem with let/cl-letf binding stuff with org-capture Arthur Miller writes: > > Anyway, a follow question: Where is the source code?! lisp/textmodes/string-edit.el > Normally the help window says "... is a Lisp function in ." > My Emacs tells me it's

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-15 Thread Bruno Barbier
Arthur Miller writes: > > Anyway, a follow question: Where is the source code?! lisp/textmodes/string-edit.el > Normally the help window says "... is a Lisp function in ." > My Emacs tells me it's an autoloaded function with the usual link. Bruno

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-15 Thread Arthur Miller
Ihor Radchenko writes: > Arthur Miller writes: > >> Based on a Reddit thread: >> >> https://www.reddit.com/r/emacs/comments/10xhvd8/a_little_readstring_utility_using_an_org_mode/j7xziao/?context=3 >> >> I did a small experiment to see if I can re-use org-capture, to just capture >> a >> string

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-13 Thread Bruno Barbier
Ihor Radchenko writes: > Note that Emacs 29 has `read-string-from-buffer'. I completely missed the fact that it was already in Emacs. I'll definitely use the string-edit version (the version with callbacks). Thanks Ihor. Bruno

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-13 Thread Bruno Barbier
Arthur Miller writes: > Bruno Barbier writes: > >> > > That looks very nice indeed. I am not aware of that package, I will definitely > use it somewhere, sometime. But with that we are getting now into 1K extra > sloc > solution. With this experiment, I was mostly interesting to see how I can

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-12 Thread Ihor Radchenko
Arthur Miller writes: > And for the last time: I am not using this version of read-string, I don't > need > it myself; it was just me thinking how to implement something after reading a > blog post. Anyway, thanks for the input, it was valuable to me. Note that Emacs 29 has

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-12 Thread Arthur Miller
Bruno Barbier writes: > Hi Arthur, > > Arthur Miller writes: > >> Bruno Barbier writes: >> >> ... but I feel a >> bit of passive aggressivity here, for no good reason tbh. > > I'm just trying to help, giving some valid or invalid advices. I'm > sorry that what I wrote, and how I wrote it,

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-12 Thread Bruno Barbier
Hi Arthur, Arthur Miller writes: > Bruno Barbier writes: > > ... but I feel a > bit of passive aggressivity here, for no good reason tbh. I'm just trying to help, giving some valid or invalid advices. I'm sorry that what I wrote, and how I wrote it, made you feel that way. >> >> Yes, let

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-11 Thread Arthur Miller
Bruno Barbier writes: > Arthur Miller writes: > >> Bruno Barbier writes: >> >>> Arthur Miller writes: >>> >>> The hook `org-capture-mode-hook' will be run in your special >>> capture buffer. You can override the "C-c C-c" binding only there. >> >> Yes and in every other capture buffer > > No.

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-11 Thread Bruno Barbier
Arthur Miller writes: > Bruno Barbier writes: > >> Arthur Miller writes: >> >> The hook `org-capture-mode-hook' will be run in your special >> capture buffer. You can override the "C-c C-c" binding only there. > > Yes and in every other capture buffer No. If you modify the hook only during

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-11 Thread Ihor Radchenko
Arthur Miller writes: > Based on a Reddit thread: > > https://www.reddit.com/r/emacs/comments/10xhvd8/a_little_readstring_utility_using_an_org_mode/j7xziao/?context=3 > > I did a small experiment to see if I can re-use org-capture, to just capture a > string from a buffer, without actually

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-11 Thread Arthur Miller
Bruno Barbier writes: > Arthur Miller writes: > >>> Bruno Barbier writes: >>> If you really want to just get the piece of text, you might be able to >>> use the hook `org-capture-mode-hook' to replace the key binding to >>> 'C-c C-c' in the capture buffer, so that it calls your own function

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-10 Thread Bruno Barbier
Arthur Miller writes: >> Bruno Barbier writes: >> If you really want to just get the piece of text, you might be able to >> use the hook `org-capture-mode-hook' to replace the key binding to >> 'C-c C-c' in the capture buffer, so that it calls your own function that >> will take the string and

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-10 Thread Arthur Miller
Bruno Barbier writes: > Arthur Miller writes: > >> However I see that the binding for the org-capture-finalizer, in capture >> buffer, >> is still the default 'org-capture--default-finalize' and not my lambda. >> >> I am really not an expert on emacs lisp; and I do understand that this is >>

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-10 Thread Bruno Barbier
Arthur Miller writes: > However I see that the binding for the org-capture-finalizer, in capture > buffer, > is still the default 'org-capture--default-finalize' and not my lambda. > > I am really not an expert on emacs lisp; and I do understand that this is > somewhat "creative" use of

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-10 Thread Arthur Miller
Ruijie Yu writes: > Hi Arthur, > > Please excuse my brevity and semi-random line of thought, as I’m replying on > mobile right now. See below. > >> On Feb 10, 2023, at 23:11, Arthur Miller wrote: >> >>  >> Based on a Reddit thread: >> >>

Re: Problem with let/cl-letf binding stuff with org-capture

2023-02-10 Thread General discussions about Org-mode.
Hi Arthur, Please excuse my brevity and semi-random line of thought, as I’m replying on mobile right now. See below. > On Feb 10, 2023, at 23:11, Arthur Miller wrote: > >  > Based on a Reddit thread: > >

Problem with let/cl-letf binding stuff with org-capture

2023-02-10 Thread Arthur Miller
Based on a Reddit thread: https://www.reddit.com/r/emacs/comments/10xhvd8/a_little_readstring_utility_using_an_org_mode/j7xziao/?context=3 I did a small experiment to see if I can re-use org-capture, to just capture a string from a buffer, without actually writing to any file. My plan was to