Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-06-02 Thread Greg Minshall
Ihor,

> Fixed, on main.
> I used a slightly different patch, because `always' is not available in
> Emacs 27.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=dc485a659

thanks!

cheers, Greg



Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-30 Thread Greg Minshall
Ihor,

> May you try the attached alternative patch?

it's been a week that i've been running this patch without seeing the
error messages (that used to come up once or more per day).

so, it would seem to have corrected the issue.

thanks again for looking at this.

cheers, Greg

> From 793f7df996b3aade65a66d936e4bd761af154b26 Mon Sep 17 00:00:00 2001
> Message-ID: 
> <793f7df996b3aade65a66d936e4bd761af154b26.1716370593.git.yanta...@posteo.net>
> From: Ihor Radchenko 
> Date: Fri, 17 May 2024 14:28:48 +0300
> Subject: [PATCH v2] lisp/org-persist.el: Ignore lock files when writing cache
> 
> * lisp/org-persist.el (org-persist--write-elisp-file): Ignore locks.
> 
> Reported-by: Greg Minshall 
> Link: https://orgmode.org/list/574109.1715751441@archlinux
> ---
>  lisp/org-persist.el | 15 +--
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/lisp/org-persist.el b/lisp/org-persist.el
> index 0df345536..8a7461649 100644
> --- a/lisp/org-persist.el
> +++ b/lisp/org-persist.el
> @@ -476,12 +476,15 @@ (defun org-persist--write-elisp-file (file data 
>  no-circular pp)
>  (start-time (float-time)))
>  (unless (file-exists-p (file-name-directory file))
>(make-directory (file-name-directory file) t))
> -(with-temp-file file
> -  (insert ";;   -*- mode: lisp-data; -*-\n")
> -  (if pp
> -  (let ((pp-use-max-width nil)) ; Emacs bug#58687
> -(pp data (current-buffer)))
> -(prin1 data (current-buffer
> +;; Force writing even when the file happens to be opened by
> +;; another Emacs process.
> +(cl-letf (((symbol-function #'ask-user-about-lock) #'always))
> +  (with-temp-file file
> +(insert ";;   -*- mode: lisp-data; -*-\n")
> +(if pp
> +(let ((pp-use-max-width nil)) ; Emacs bug#58687
> +  (pp data (current-buffer)))
> +  (prin1 data (current-buffer)
>  (org-persist--display-time
>   (- (float-time) start-time)
>   "Writing to %S" file)))
> -- 
> 2.45.1



Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-22 Thread Greg Minshall
Ihor,

> May you try the attached alternative patch?

thanks, will do.

cheers, Greg



Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-21 Thread Greg Minshall
hi, Ihor,

> Then, I need a backtrace. May you please enable debug-on-error and share it?

here is a backtrace.  is this enough, or should i do something extra to
give you more information from it?

the situation was: "it" put up the message


...rg-persist/gc-lock.eld locked by minshall@arch... (pid 630467): (s, q, p, 
?)? 


and i answered 'q'.

cheers, Greg



Debugger entered--Lisp error: (file-locked 
"/home/minshall/.cache/org-persist/gc-lock.eld" "minshall@archlinux (pid 
630467)")
  signal(file-locked ("/home/minshall/.cache/org-persist/gc-lock.eld" 
"minshall@archlinux (pid 630467)"))
  ask-user-about-lock("/home/minshall/.cache/org-persist/gc-lock.eld" 
"minshall@archlinux (pid 630467)")
  write-region(nil nil "/home/minshall/.cache/org-persist/gc-lock.eld" nil 0)
  org-persist--write-elisp-file("/home/minshall/.cache/org-persist/gc-lock.eld" 
(((26183 36837 959155 597000) 26189 28499 728982 83000) ((26183 36842 638577 
324000) 26189 28499 729139 115000)))
  org-persist--refresh-gc-lock()
  apply(org-persist--refresh-gc-lock nil)
  timer-event-handler([t 26189 24417 539879 3600 org-persist--refresh-gc-lock 
nil nil 962000 nil])



Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-18 Thread Greg Minshall
hi, Ihor,

i have a recurrence of the same problem.  see below.

cheers, Greg



Subject: [BUG] still fails... [9.7-pre (release_9.6.29-1441-gaa71fa @ 
/home/minshall/.emacs.d/straight/build/org/)]
Fcc: outbox
X-Mailer: MH-E 8.6+git; nmh 1.8; Emacs 30.0.50


>  ...rg-persist/gc-lock.eld locked by minshall@arch... (pid 630467): (s, q, p, 
> ?)? 
> Error running timer ‘org-persist--refresh-gc-lock’: (file-locked 
> "/home/minshall/.cache/org-persist/gc-lock.eld" "minshall@archlinux (pid 
> 630467)")

(following [C-h f org-persist], then goto line 481):
~/.emacs.d/straight/repos/org/lisp/org-persist.el

  (if pp
  (let ((pp-use-max-width nil)) ; Emacs bug#58687
(pp data (current-buffer)))
(prin1 data (current-buffer)))
  ;; Force writing even when the file happens to be opened by
  ;; another Emacs process.
  (unlock-buffer))

and
: lrwxrwxrwx 1 minshall minshall 62 May 17 20:11 
/home/minshall/.emacs.d/straight/build/org/org-persist.el -> 
/home/minshall/.emacs.d/straight/repos/org/lisp/org-persist.el

Emacs  : GNU Emacs 30.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 
3.24.38, cairo version 1.18.0)
 of 2023-11-20
Package: Org mode version 9.7-pre (release_9.6.29-1441-gaa71fa @ 
/home/minshall/.emacs.d/straight/build/org/)



Re: [BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-17 Thread Greg Minshall
Ihor,

> In theory, the odds should be quite slim, unless you open that file
> manually. Anyway...

as the saying goes, the difference between theory and practice is that
in theory there is no difference, but in practice there is.  :)

> Does the attached patch fix the problem for you?

i've applied it, and i'll let you know how it goes in a week or so (it
typically occurs several times per day, so a week without it should be
pretty strong evidence for the patch working).

cheers, Greg



[BUG] cache file conflict? [9.7-pre (release_9.6.29-1441-gaa71fa @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-14 Thread Greg Minshall


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


i run various Emacs instances, in each of which i run org.  i frequently
get these messages (followed by errors when i reply 'q'):

...rg-persist/gc-lock.eld locked by minshall@arch... (pid 546721): (s, q, p, 
?)? 
Error running timer ‘org-persist--refresh-gc-lock’: (file-locked 
"/home/minshall/.cache/org-persist/gc-lock.eld" "minshall@archlinux (pid 
546721)")


since i don't see a PID in the lock file name (i assume it is), i wonder
if the code occasionally has this problem when more than one instance
attempts to acquire this lock at a time?

cheers!

Emacs  : GNU Emacs 30.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 
3.24.38, cairo version 1.18.0)
 of 2023-11-20
Package: Org mode version 9.7-pre (release_9.6.29-1441-gaa71fa @ 
/home/minshall/.emacs.d/straight/build/org/)



Re: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-02 Thread Greg Minshall
Ihor,

> Then, if the backend does not define variable expansion method, do
> nothing. If the backend is not loaded, throw an error/warning (maybe
> depending on a customization).

great.  thanks.  if customizable, i'd vote to default with an error.


then, for what it's worth, my experience led me to write some code for a
command line program (basically, an elisp script) to tangle files.

if anyone is interested in playing/using it, that'd be great.  the idea
is to figure out what languages are needed by walking the source code
blocks, keeping track of languages, then set `org-babel-load-languages`
appropriately, and tangle the file.

https://sr.ht/~minshall/org-cli-tangle/


cheers, Greg



Re: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-05-01 Thread Greg Minshall
Ihor,

> > or some such to disable *that*?
> 
> I do not recall many people asking for such a feature.

no, i don't either.  :)

> It might be. But the real fix should be adding babel API to allow
> backends declaring the list of supported features.
> Such API is relatively easy to implement.

with such a fix, then if a language is not loaded that could accept a
:var, either an error would be thrown, or maybe the language would be
loaded?  (i would vote for the error, but ...)

either way that would be great.

cheers, Greg



Re: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-04-30 Thread Greg Minshall
Ihor,

thanks again.

> #+property: header-args :var common_variable = "foo"

ah, hierarchical :var's.  i didn't realize such existed.  of course,
then, you're right.

a dream might be something like ":var none" to allow the dot source code
block to indicate it wasn't expecting any ":var" anyway.  but, i guess
then one would want to allow picking and choosing:

: #+header: :var =common_variable

or some such to disable *that*?

maybe, anyway, a warning message *might* be nice -- "failing" (as the
user may see it) silently can be hard to debug.

cheers, Greg



Re: [BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-04-28 Thread Greg Minshall
hi, Ihor,

thanks for looking at this.

> This is because Org mode currently cannot distinguish between babel
> backends that simply do not support variable assignments and babel
> backends that are not loaded.

currently, is it possible to see well enough what is going on to
generate an error and abort the tangle?

(off the top of my head i would think a `:var` in either of the
situations you describe might be described as an error -- albeit a user
error.)

cheers, Greg



[BUG] oddity tangling src_blk with :var [9.7-pre (release_9.6.26-1368-g1ae978 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-04-27 Thread Greg Minshall
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


hi.  the following org block describes a problem i noticed.  possibly
the fix is simply issuing an appropriate error message (and aborting the
process of tangling.

thanks for looking at this when you have a chance.  and, apologies if
this is a FAQ.

cheers, Greg

#+begin_src org
  ,** introduction

  this is to show an oddity -- a bug, or a security feature? -- in
  tangling a source code block that has a variable (=:var=) header
  argument.

  if the variable =org-babel-load-languages= includes the source type of
  the code block (e.g., "shell", "python", etc.), the variable will be
  set in the tangled file.  if =org-babel-load-languages= does *not*
  include that source type, the variable will be unset in the tangled
  file.  without any error message.

  (note that in a running emacs, *removing* elements from
  =org-babel-load-languages= doesn't seem to cause this problem to
  appear.  maybe this is because the relevant "ob-..." files have
  already been loaded?)

  to see this, first *tangle* this file, to get works.el, fails.el, and
  variable.sh, and then evaluate this code block:

  ,#+name: DemonstrateBehavior
  ,#+begin_src sh :results output
./works.el
echo -n "works.el: "
./variable.sh
./fails.el
echo -n "fails.el: "
./variable.sh
  ,#+end_src

  ,#+RESULTS: DemonstrateBehavior
  : works.el: 2.4
  : fails.el: 

  notice that after running fails.el, the 2.4 disappears.


  ,** this is the test code and blocks

  here is the variable to be included.
  ,#+name: variable
  | 2.4 |

  and, the code block that includes that variable
  ,#+begin_src sh :var variable=variable :shebang #!/bin/sh :tangle variable.sh
echo "${variable}"
  ,#+end_src

  tangling with this works
  ,#+begin_src elisp :tangle works.el :shebang "#!/usr/bin/env -S emacs 
--script"
(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (shell . t)))
(org-babel-tangle-file "maybe.org")
  ,#+end_src

  tangling with this fails (notice the absence of =(shell . t)=)
  ,#+begin_src elisp :tangle fails.el :shebang "#!/usr/bin/env -S emacs 
--script"
(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)))
(org-babel-tangle-file "maybe.org")
  ,#+end_src
#+end_src


Emacs  : GNU Emacs 30.0.50 (build 14, x86_64-pc-linux-gnu, GTK+ Version 
3.24.38, cairo version 1.18.0)
 of 2023-11-20
Package: Org mode version 9.7-pre (release_9.6.26-1368-g1ae978 @ 
/home/minshall/.emacs.d/straight/build/org/)



Re: [BUG] crash [9.7-pre (release_9.6.11-927-g819cd7 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-04-17 Thread Greg Minshall
Ihor,

> You are on a fairly old common from main - 5 month old.
> May you upgrade to the latest main and let us know if you keep seeing 
> problems?

thanks.  i've re-freshed and re-built and am now on

Org mode version 9.7-pre (release_9.6.26-1368-g1ae978 @ 
/home/minshall/.emacs.d/straight/build/org/)


if i see another problem, i will let you know.

cheers, Greg



[BUG] crash [9.7-pre (release_9.6.11-927-g819cd7 @ /home/minshall/.emacs.d/straight/build/org/)]

2024-04-14 Thread Greg Minshall


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


i was editing a buffer, but it was in read-only mode, so i closed the
buffer and re-visited the file, then hit something like carriage return
and got the crash.

(it's possible, i suppose, that i was doing some for of "org-capture"
for that buffer?)

cheers.

-
⛔ Warning (org-element-cache): org-element--cache: Org parser error in 
sysnotes.org::2622892. Resetting.
 The error was: (error "org-element--cache: Emergency exit")
 Backtrace:
"  backtrace-to-string(nil)
  (progn (backtrace-to-string (backtrace-get-frames 'backtrace)))
  (if (and (fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) 
(progn (backtrace-to-string (backtrace-get-frames 'backtrace
  (format \"Org parser error in %s::%S. Resetting.\\n The error was: %S\\n 
Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x 
org-submit-bug-report).\" (buffer-name (current-buffer)) epom err (if (and 
(fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn 
(backtrace-to-string (backtrace-get-frames 'backtrace)
  (let* ((format-string (format \"Org parser error in %s::%S. Resetting.\\n The 
error was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list 
(M-x org-submit-bug-report).\" (buffer-name (current-buffer)) epom err (if (and 
(fboundp 'backtrace-get-frames) (fboundp 'backtrace-to-string)) (progn 
(backtrace-to-string (backtrace-get-frames ...)) (format-string (if (or 
(not org-element--cache-diagnostics-ring) (not (eq 'backtrace 
org-element--cache-self-verify))) format-string (prog1 (concat (format 
\"Warning(%s): \" (buffer-name ...)) format-string \"\\nBacktrace:\\n  \" 
(mapconcat #'identity (ring-elements org-element--cache-diagnostics-ring) \"\\n 
 \")) (setq org-element--cache-diagnostics-ring nil) (if (and (boundp 
'org-batch-test) org-batch-test) (error \"%s\" (concat \"org-element--cache: \" 
format-string)) (display-warning 'org-element-cache (concat 
\"org-element--cache: \" format-string
  (condition-case err (org-element--parse-to epom) ((debug error) (let* 
((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error 
was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x 
org-submit-bug-report).\" (buffer-name (current-buffer)) epom err (if (and ... 
...) (progn ... (format-string (if (or (not 
org-element--cache-diagnostics-ring) (not ...)) format-string (prog1 (concat 
... format-string \"\\nBacktrace:\\n  \" ...) (setq 
org-element--cache-diagnostics-ring nil) (if (and (boundp 'org-batch-test) 
org-batch-test) (error \"%s\" (concat \"org-element--cache: \" format-string)) 
(display-warning 'org-element-cache (concat \"org-element--cache: \" 
format-string (org-element-cache-reset) (org-element--parse-to epom)))
  (if cached-only (if (and (org-element--cache-active-p) (or (not 
org-element--cache-sync-requests) (< epom (aref (car 
org-element--cache-sync-requests) 1 (progn (org-element--cache-find epom))) 
(condition-case err (org-element--parse-to epom) ((debug error) (let* 
((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error 
was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x 
org-submit-bug-report).\" (buffer-name ...) epom err (if ... ...))) 
(format-string (if (or ... ...) format-string (prog1 ... ... (if (and 
(boundp 'org-batch-test) org-batch-test) (error \"%s\" (concat 
\"org-element--cache: \" format-string)) (display-warning 'org-element-cache 
(concat \"org-element--cache: \" format-string (org-element-cache-reset) 
(org-element--parse-to epom
  (setq element (if cached-only (if (and (org-element--cache-active-p) (or (not 
org-element--cache-sync-requests) (< epom (aref (car 
org-element--cache-sync-requests) 1 (progn (org-element--cache-find epom))) 
(condition-case err (org-element--parse-to epom) ((debug error) (let* 
((format-string (format \"Org parser error in %s::%S. Resetting.\\n The error 
was: %S\\n Backtrace:\\n%S\\n Please report this to Org mode mailing list (M-x 
org-submit-bug-report).\" ... epom err ...)) (format-string (if ... 
format-string ...))) (if (and (boundp ...) org-batch-test) (error \"%s\" 
(concat \"org-element--cache: \" format-string)) (display-warning 
'org-element-cache (concat \"org-element--cache: \" format-string 
(org-element-cache-reset) (org-element--parse-to epom)
  (let (element) (if (org-element--cache-active-p) (progn (if (not 
(save-current-buffer (set-buffer (or ... ...)) org-element--cache)) 
(org-element-cache-reset) (if cached-only nil (org-element--cache-sync 
(current-buffer) epom) (setq element (if cached-only (if (and 

Re: [BUG] list.orgmode.org managed to parse a message in future: 2023-10-29 [9.6.1 (release_9.6.1-223-gc8d20d @ /home/yantar92/.emacs.d/straight/build/org/)]

2023-02-10 Thread Greg Minshall
Jean Louis,

> In my opinion central computer that manages mailing lists should
> recogniz if time of users is far in future and handle it
> appropriately.

> Maybe re-writing time with explanation in e-mail header would be more
> appropriate.

maybe something like that.  though, this seems more an issue for
"mailing list management" mailing lists than for org-mode itself.
(maybe send them such a message, from the future? :)

cheers, Greg



Re: [BUG] list.orgmode.org managed to parse a message in future: 2023-10-29 [9.6.1 (release_9.6.1-223-gc8d20d @ /home/yantar92/.emacs.d/straight/build/org/)]

2023-02-05 Thread Greg Minshall
Jean Louis,

> Why did mailing list accept message from far future? It should not be
> so, that is bug to be reported.

there's an old internet adage to help achieve interoperability
(attributed to the late Jon Postel): be liberal in what you accept, and
conservative in what you send.

so, i wouldn't blame mail services for accepting mail with odd dates.
but, i would question MUAs (like mh-e, mutt, etc., i guess) that allow
one to send e-mail with odd dates.  (i mean, i guess if the person
stands on their head and swears up and down that they mean to do it,
... :)

cheers, Greg



Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-01 Thread Greg Minshall
thanks, Tomas and Ihor,

> > [2022-11-12 12:00 @Asia/Singapore] vs. [2022-11-12 12:00 @ Asia/Singapore]
> > 
> > Either way is possible.
> > I am in favour of my variant though :)
> 
> Same with me. I read @ as a sigil [1]
...
> [1] https://en.wikipedia.org/wiki/Sigil_(computer_programming)

i'll try to get my head around the sigils (but appreciate that either
way is valid).

cheers, Greg



Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-01-31 Thread Greg Minshall
Ihor,

thanks for all the information.

> 2022-11-12 12:00 @Asia/Singapore # tzdb syntax

aesthetically, allowing a space after the "@" sign might be nice.  i
don't know what that would do to the parsing/BNF/whatever.

cheers, Greg



Re: [POLL] Use compat.el in Org? (was: Useful package? Compat.el)

2023-01-30 Thread Greg Minshall
Ihor,

> >> 1. If compat.el happens to lack support of some function, we will need
> >>to contribute to compat.el directly and synchronize Org releases with
> >>compat.el releases.
> >
> > would a separate "org-compat.el" (in addition to compat.el) somehow
> > solve this?  (i worry about the synch'ing.)
> 
> That's what we already do.
> Using compat.el means that we can remove some of the functions from
> org-compat.el and instead rely on compat.el where the same functions are
> maintained more carefully.

i see, yes.  i'm just thinking that, for a given release CUR (like i
know anything about org-mode release procedures!)  we would use whatever
has been available in compat.el since release CUR-n (for whatever n we
use -- 2?), and supplement that, in org-compat.el, with whatever other
compatibility features *we* (org-mode) need to support releases [CUR-n
.. CUR].

(and, presumably, contribute whatever might be appropriate from
org-compat.el to compat.el, so we can prune it out from org-compat.el at
some future point in time.)

i'm *only* thinking of trying to de-couple org-mode development from
that of compat.el, in the mindset that "less cross-dependencies" ==
"less complication".  if that makes sense.

cheers, Greg



Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-30 Thread Greg Minshall
Ihor, makes sense.  that we probably need to *display* imprecision
doesn't mean we need to accept/parse it.



Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-30 Thread Greg Minshall
Ihor,

> That's all nice but what a headache will it be to implement. What will
> 2004-06~ mean for agenda, for example?

i don't know the specific "2004-06~", but i do think that for the agenda
(i assume), being able to express ambiguity to the user will be
important.  as people have pointed out (and it was new to me), future
time-zoned times are not clearly defined as "political" changes (in
daylight savings time definitions, for example) can change the UTC value
of that time.

- it's exactly at this moment of time

- it's almost certainly at this moment of time (i.e., that's today's
  politics), but that may change as we get closer to that date

- it seems like it might be at, or near, this moment of time

i guess the third is what "2004-06~" might mean (i visualize, in
amusement, a very light pink background over all of June, with some
decay function coming earlier into May, later into July :).

yours in favor of ibuprofen!  cheers, Greg



Re: [POLL] Use compat.el in Org? (was: Useful package? Compat.el)

2023-01-30 Thread Greg Minshall
Ihor,

> Cons:
> 
> 1. If compat.el happens to lack support of some function, we will need
>to contribute to compat.el directly and synchronize Org releases with
>compat.el releases.

would a separate "org-compat.el" (in addition to compat.el) somehow
solve this?  (i worry about the synch'ing.)

cheers, Greg



Re: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda

2023-01-30 Thread Greg Minshall
Ihor, Sterling, et al.,

just a thought/reminder.  there are "semantics" and "encoding".  a spec
like ISO-8601 specifies both.  the important thing for org-mode is to
use an encoding that

1. is easily parsable/understandable by the mere mortal

2. allows expression of all the semantics of the underlying spec/specs
   (be that ISO-8601, this new IETF spec, the Library of Congress spec,
   etc.)

3. and, importantly, is designed to *try* to follow updates to the
   underlying spec/specs (which will inevitably happen)

in my experience, it is easiest to accomplish 2 and 3 by adopting the
encoding in the underlying spec/specs (if "specs" -- hopefully they are
compatible! :)

but, i don't doubt that other encodings that accomplish 1, and still
accomplish 2 and 3, exist.

possibly, an important step forward is to complete the sentence,
"Org-mode datestamps are intended to conform to the semantics (but not
necessarily the encoding) specified in the following specifications:
...".

cheers, Greg



Re: Org mode timestamps on the Moon ; ] (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-01-30 Thread Greg Minshall
Tom,

> The only generalized solution is to record the full location (see
> intro to http://naggum.no/lugm-time.html which I'm surprised hasn't
> been linked in this thread yet, ...

very nice -- thanks for the pointer!

cheers, Greg



Re: OS advice

2023-01-06 Thread Greg Minshall
Ypo,

> Do you think that if I install a Linux OS, Orgmode would run fast? Any
> OS suggestion?

it might (*).  if it's not too hard to install linux (i have no idea), you
might figure out some sort of benchmark for your org experience, then
try switching, see what happens.  (there are a lot of variables.)

good luck.  Greg

(*) as a linux enthusiast, and a knee-jerk windows-denier, i want to
*believe* it will; that mostly unfounded belief will be of little help
to you, though.



Re: [MAINTENANCE] Org orphanage?

2023-01-06 Thread Greg Minshall
Ihor, Bastien, et al.,

i am not really following this conversation.

but, recently i was looking at org-grep, and found its new home:

https://github.com/emacsorphanage/org-grep


Ihor mentions the emacs orphange:
> Should we extend the org-contrib's current idea to other Org-related
> packages that are seeking a maintainer? Similar to
> https://github.com/emacsorphanage

are there reasons not to punt the orphanage issue to this emacs
orphanage (and, point to it from the org wiki)?  on the one hand, "less
control".  on the other, "less work" (even "globally", if things scale).

cheers, Greg



Re: [SECURITY] Arbitrary code evaluation security in Org

2023-01-02 Thread Greg Minshall
Ihor,

thanks for this.

one additional item (i don't *think* we discussed this before; apologies
if i'm forgetting): tangling.  if one is prompted to "merely" tangle ...

#+begin_src sh :tangle /var/tmp/foo.org.tangled
  echo 'hi!'
#+end_src


one could imagine more sinister scenarios for destination, content.

i don't really know what, how much, to do.  possibly just an option,
defaulting to =nil=, allowing tangle to write a file outside the subtree
that holds the .org file being tangled.

cheers, Greg



Re: Recommended way to work on main without upgrading Org?

2022-12-21 Thread Greg Minshall
i would also think it would be possible to have two different straight
recipes -- one for "org-mode", and one for "org-mode-test" -- which you
would enable or disable (by editing .emacs, if no other way) on
different invocations of emacs.  and, be careful not to have both
enabled at the same time! :)



Re: org-persist files in /tmp

2022-12-21 Thread Greg Minshall
hi, Ihor,

> Do we need to care about cleaning up /tmp?

my two cents is that maybe one should not care so much about cleaning up
/tmp, but i think it's worthwhile trying not to clutter it up too much.

cheers, Greg



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-15 Thread Greg Minshall
Johan,

> Absolutely, I just wanted to clarify that there is no confusion as to
> what an R list is in the context of R itself (as far as I can
> tell). Your post made it sound like there is.

ah, indeed -- thanks!

cheers, Greg



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-13 Thread Greg Minshall
hi, Johan,

> "Proper list" in the context of this discussion and pertaining to R
> would be a =list()=, not a vector which is what is usually returned by
> =c()=. A =data.frame()= is a special case of a =list()= where every
> column has to have the same length.

well, it's a language mapping problem.  what one considers a "list" in
org-mode is
- well
- something like
- this
  - maybe with
  - this

whereas in e-lisp, '("well" "something like" '("this" '("maybe with"
"this"))).

then, the question arises of how to translate something like that to
whatever data structures a given programming language offers.  it
*might* be to something that programming language calls a "list".

if we are ignoring "sub lists", then for R, one could argue either
vectors or lists.  (someone -- possibly you? -- pointed out that going
from an R list to a vector is as simple as an unlist() call.)

if we ever want to provide support for sub lists, then passing lists as
R lists seems like the way to go.

cheers, Greg


> list("well", "something like", list("this", list("maybe with")))
[[1]]
[1] "well"

[[2]]
[1] "something like"

[[3]]
[[3]][[1]]
[1] "this"

[[3]][[2]]
[[3]][[2]][[1]]
[1] "maybe with"



> unlist(list("well", "something like", list("this", list("maybe with"
[1] "well"   "something like" "this"   "maybe with"



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-12 Thread Greg Minshall
hi, Ihor,

> ** List references in source block variable assignments are now proper lists

just for background, one oddity is that the meaning of a "list" in R is
a bit loose.

> list(1,2,3)
[[1]]
[1] 1

[[2]]
[1] 2

[[3]]
[1] 3

> c(1,2,3)
[1] 1 2 3

(where =c= is the "concatenation operator".)

so, to me, at least, "proper list" is not a well-defined term in R.

cheers, Greg



Re: [BUG] org-mouse is activated without explicit require

2022-12-10 Thread Greg Minshall
Matt,

> I'm not too familiar with how emacs handles autoloads. However, I find
> org-mouse is automatically loaded if I call describe-function and then
> tab complete after typing "", "org-", "org-m", etc. This seems enough
> to load the entirely of the org-mouse.el file.

i'm also not an expert on autoload, but i noticed this in the e-lisp
info pages:

Autoload by Prefix

During completion for the commands ‘describe-variable’ and
‘describe-function’, Emacs will try to load files which may contain
definitions matching the prefix being completed.


and, i wonder if that at least explains part of your question.

cheers, Greg



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-08 Thread Greg Minshall
Ihor,

> The time span is years and I do not recall any related bug reports.
> So, nobody seems to care.

:)



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-08 Thread Greg Minshall
Ihor,

> Does it make sense from the point of view of R code?
> AFAIU, the current ob-R implementation converts lists into R tables,
> which is not accurate? Would it make sense to convert Elisp lists into R
> lists directly?

my "barely half a cent" would be that backwards compatibility here
trumps, hmm, "logic".  i suspect a note in the wiki page for ob-R
stating that lists are converted to single-column tables would be
sufficient.  (partly because i think people writing code need to refer
to such pages to understand these sorts of mappings.)

(one could make the case that "no one" passes lists to R code; that
could push *me* towards your suggestion.)

cheers, Greg



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-06 Thread Greg Minshall
Jeremie,

i am neutral w.r.t. what the output should be.  like you, i've always
sent in tables.

for me, i don't know that it makes much difference how lists are
presented to R code, as long as it is well-defined and stable over time.

given that, iiuc, 9.5 presented a list as (the equivalent of) multiple
rows of a table, i'd vote for staying with (going back to) that.

(i think that's what the two modifications in Chuck's e-mail give you.)

cheers, Greg



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-05 Thread Greg Minshall
Chuck,

sorry, i didn't see the change you had added.

> So, isn't that what is wanted?

that's a policy question that i can't answer.  :)

cheers, Greg



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-05 Thread Greg Minshall
hi, Charles,

> This makes a list like '("a" "b" "c") into a data.frame with one column.

1. which version of Org are you running?
: Org mode version 9.6 (9.6-g60de19 @ 
/home/minshall/.emacs.d/straight/build/org/):

2. is my below example yours?

i think i used to see the behavior you describe in 9.5.

cheers, Greg



#+begin_src R :var list='("a" "b" "c")
  list
#+end_src

#+RESULTS:
| a | b | c |



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-04 Thread Greg Minshall
for the record, these are the tests i ran with my off-the-cuff "fix"
(s/sequencep/listp/):

#+name: alist
- first item
- second item
- third item

#+begin_src R :var list=alist :session ss
 list
#+end_src

#+RESULTS:
| first item | second item | third item |

#+begin_src R :var variable='(a test)
  variable
#+end_src

#+RESULTS:
| a | test |

#+name: atable
| this | is | a | header | line |
|--++---++--|
| 1| 2  | 3 | 4  | 5|
| a| b  | c | d  | e|

#+begin_src R :var list=atable :session ss
 list
#+end_src

#+RESULTS:
| 1 | 2 | 3 | 4 | 5 |
| a | b | c | d | e |

#+begin_src R :var list='((1 2 3) (1 2))
  list
#+end_src

#+RESULTS:
| 1 | 2 | 3 |
| 1 | 2 |   |


#+begin_src elisp :var list=alist
 list
#+end_src

#+RESULTS:
| first item | second item | third item |



Re: [BUG] ob-R.el: extra empty data.frame columns generated from plain lists after recent change [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]

2022-12-04 Thread Greg Minshall
i see this same behavior.  to me, (org-babel-R-assign-elisp) seems to be
the problem, but it hasn't changed any time recently.  (nor, if my =git
blame= is done correctly, has anything else in ob-R.el.)

i don't understand how (org-babel-R-assign-elisp) thinks.  it seems to
assign =max= and =min= assuming that =value= is a list of (at least one)
list(s).

this *might* be a fix.  but, i don't have a lot of confidence it will
not have bad side effects for other cases.  (though i tested it with a
simple list, and a simple table with more than one row, and a list of
two lists, the first of length 3, the second of length 2.):

modified   lisp/ob-R.el
@@ -241,7 +241,7 @@ This function is called by `org-babel-execute-src-block'."
 (defun org-babel-R-assign-elisp (name value colnames-p rownames-p)
   "Construct R code assigning the elisp VALUE to a variable named NAME."
   (if (listp value)
-  (let* ((lengths (mapcar 'length (cl-remove-if-not 'sequencep value)))
+  (let* ((lengths (mapcar 'length (cl-remove-if-not 'listp value)))
 (max (if lengths (apply 'max lengths) 0))
 (min (if lengths (apply 'min lengths) 0)))
 ;; Ensure VALUE has an orgtbl structure (depth of at least 2).




Re: [BUG] ob-R: session evaluation returns empty ouputs with Org 9.6 [9.6 ( @ /home/fsantos/.emacs.d/elpa/org-9.6/)]

2022-12-01 Thread Greg Minshall
Frederic,

> > It looks like there is something wrong with comint-prompt-regexp in
> > R buffers. It somehow does not match the prompt.
> 
> I'm not sure it's the explanation either, since external (i.e.,
> non-session) evaluation works as expected. (Just remove the ":session
> *R*" part of the header, and you'll see everything is okay.)

Ihor will know, but i *think* that without :session, there is no R
"shell" running, so the ...-prompt-regexp isn't used.  rather (do i know
this?  assume this?), an R script is prepared and executed.

cheers, Greg



Re: processing a literal example line by line in a shell source block?

2022-11-06 Thread Greg Minshall
Ihor,

again, thanks for helping me with that problem.

and, just for my (or anyone's) future reference, how i probably *should*
have debugged this was to tangle the relevant source block, and then
examine the resulting shell-script file, and gone from there.

cheers, Greg



Re: processing a literal example line by line in a shell source block?

2022-11-03 Thread Greg Minshall
Ihor,

> Try
> 
> #+name: lbl
> #+begin_example
> line 1
> line 2
> #+end_example
> 
> #+begin_src bash :var input=lbl :results output
>   echo "${input}"
> #+end_src

ah, the double quotes!  thanks very much!

cheers, Greg



processing a literal example line by line in a shell source block?

2022-11-02 Thread Greg Minshall
hi.  i have a text in a named #+begin_example ... #+end_example block.
i would like to process this text line by line in a shell (bash, say)
code block.  but, it appears that the individual lines are not
separated, but passed as one long string to the source block.  (example
below.)

is there a magic incantation i can use to accomplish this?

cheers, Greg

#+name: lbl
#+begin_example
line 1
line 2
#+end_example

#+begin_src bash :var input=lbl :var in2='("first" "second")
  echo ${#input[@]}
  echo ${#in2[@]}
  echo ${input}
#+end_src

#+RESULTS:
|1 |   |  |   |
|2 |   |  |   |
| line | 1 | line | 2 |



Re: form-like process for entering rows in an org-mode table?

2022-09-29 Thread Greg Minshall
hi, Jean Louis,

> I do not know what is column view. But I understand that you need
>  descriptive text.

that was my state until recently, though i had seen various references
to it and its usage on the mailing list.  it at least offers some form
of completing read, at least for what might be in other contexts a "drop
down list".

it's probably at least glancing at to see if it might suit your need.

cheers, Greg



Re: how to remove parentheses from the output of a source code block

2022-09-28 Thread Greg Minshall
Andrés,

sorry -- of course, you can use base e-lisp =string-join= to accomplish
the same thing.

#+BEGIN_SRC emacs-lisp :var table=source-in-table :results value raw
  (let ((sqlcode (mapcar (lambda (row) 
   (concat "INSERT or ignore INTO labels_catalog (id, 
macro, language1, language2) VALUES ("
   (number-to-string (nth 0 row)) ", '" (nth 1 
row) "', '" (nth 2 row) "', '"
   (nth 3 row) "');\n")
   ) table)))
(string-join sqlcode " "))
#+END_SRC


cheers, Greg



Re: how to remove parentheses from the output of a source code block

2022-09-27 Thread Greg Minshall
Andrés,

this is maybe more of an e-lisp question, or, at least, here's more of
an e-lisp answer.  if you have the useful =s= package [1] installed,
then will using =s-join= give you what you want?

  (let ((sqlcode (mapcar (lambda (row) 
   (concat "INSERT or ignore INTO labels_catalog (id, 
macro, language1, language2) VALUES ("
   (number-to-string (nth 0 row)) ", '" (nth 1 
row) "', '" (nth 2 row) "', '"
   (nth 3 row) "');\n")
   ) table)))
(s-join " " sqlcode))

give you what you are looking for?

cheers, Greg

[1] https://github.com/magnars/s.el



Re: form-like process for entering rows in an org-mode table?

2022-09-27 Thread Greg Minshall
Jean Louis,

> * Greg Minshall  [2022-07-22 19:14]:
> > hi.  does anyone have any code, or know of any existing package, that
> > would allow for some sort of form-like (or "transient"-like) interface
> > for adding rows to an org-mode table?  in particular, that provides some
> > sort of =completing-read= interface for a given set of choices for a
> > given column, etc.
> 
> I have total understanding for this use case, as I do similar all the
> time. Just that I don't use Org tables, I use database tables.

the project that needs this has been on the back-burner for a while,
but, for the record, i have looked at "Column View" as a possible
replacement for "org tables as a database".  in addition to a
completing-read interface, column view gives the opportunity to add
descriptive text to a row -- i.e., just the regular, non-property,
content under a headline -- which is very nice.  but, i haven't played
with it enough to see how well it will fit my "needs".

cheers, Greg



Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-19 Thread Greg Minshall
Rudy,

> I would deeply appreciate this option for my Org notebook that contains
> two kinds of source blocks: (1) workers for on-demand execution and (2)
> reproducible examples for anytime execution.  I cannot figure out how to
> make Org work with both, meaning it would execute just the reproducible
> examples on 'org-babel-execute-buffer', leaving the workers alone.  As a
> workaround, I configure workers with ':eval query' and then lean against
> the 'n' key during 'org-babel-execute-buffer'. :)

i'm a bit unclear.  does your (single?) Org notebook consist of *one*
file (and thus, [normally? always? my ignorance precedes me], one
buffer), or two files (thus, two buffers).

in the former case (one buffer), i don't know if these proposals will
help.  though, maybe as they are flushed out (precedence of the
buffer-local and/or global-local with header line constructs), it would?

in the latter case (two buffers), then, yes.

cheers, Greg



Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-12 Thread Greg Minshall
hi, Tim,

> There are valid use cases for a configuration which does not require
> user interaction (to answer questions on block evaluation), for example,
> when you want to process many org files in a batch process without user
> interaction. Likewise, I don'tg want Emacs to become too much of a
> 'nanny'. If I decide the code in a file is safe and permanently safe, I
> want to be able to disable the queries on that file permanently. I'm
> happy using local variables to do this, though I would also like a
> global option as well.

sorry, i don't think i was clear.  i wasn't suggesting changing the
behavior if =org-confirm-babel-evaluate= is =nil= (either as a
buffer-local, or globally).  the trigger for prompting for "[y,n,Y,N,?]"
or long/short some such would be if it were =t= (i think?).

> With regard to long or short answers to such questions, I think the
> default should be the longer yes/no, but the user should be able to set
> it to y/n (i.e. same as normal Emacs behaviour). Ideally, this would
> fall under the same setting as the new y-or-n facility in recent emacs
> versions (replacing the old approaches like defalias).

ah, i didn't realize there was this configuration possibility.  that
makes sense.  thanks.

> Finally, while I can see there is a use case for being able to have fine
> grained control over individual block execution, I don't think having it
> as a prompt is the correct approach. Once you have many of these blocks
> in a file, that prompt will rapidly become annoying. When I've required
> this level of control, I've found header arguments work fine and I'm not
> sure the added complexity is worth it.

last time i tried to export a file with no buffer-local setting of
org-confirm-babel-evaluate, i was prompted on each code block.  and,
yes, it *is* annoying!  eliminating this behavior, while "preserving a
query", is what i find attractive in Fejda's proposal.

i apologize that i'm not sure of the header argument override?

but, still, i wouldn't argue for any new per-src-block-level
configuration.

cheers, Greg



Org version mismatch -- hooray!

2022-09-12 Thread Greg Minshall
i updated org, and in an existing emacs instance did something (in a
.org file), and got

byte-code: Org version mismatch.  Make sure that correct ‘load-path’ is set 
early in init.el


which i think is great!  thanks very much!

cheers, Greg



Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-12 Thread Greg Minshall
Ihor, Fedja, et al.,

i think this is very good.

my suggestion would be to *not* permanently mark a file as safe (i.e., i
would vote against org-confirm-babel-evaluate-safe-paths); rather, let a
local variable do that.  i worry about keeping state in "side cars" (if
one calls them that), as it may be harder for the user to "grep" to find
why some expected behavior is occurring, etc.

in the "default" setting, asking to evaluate a src block would ask:
- "yes" [y]
- "no" [n]
- "always this buffer" [Y?]
- "never this buffer" [N?]

the last two would only survive this buffer; once the buffer is closed
and re-opened, you're back to "default" (unless, of course, there's a
local variable set).

Ihor, you suggested other meanings for "yes +".  while they all are
useful, i like the simplicity of just the "always for this buffer".
and, per-src block seems overkill, and too complicated, too much state
for the user to remember (but, i'm old, so memory is *always* an issue!
:).

when the user responds "always this buffer", maybe a message that, if
they want the same behavior for future buffers of this same file, add a
local variable.

anyway, that's my 2 cents.

cheers, Greg

ps -- i'm neutral w.r.t. single letter versus word-length, completing
read, prompts [the above suggestions notwithstanding].



Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-07 Thread Greg Minshall
Steven,

> There is a neat solution to this problem using
> 
> * Local Variables :noexport:
> 
> see the discussion at stackoverflow
> 

thanks.  yes, if one has to do local variables, that is a very nice way
of doing it; i appreciate seeing that.

cheers, Greg



Re: per-file (or, really, per buffer) allowing/disallowing code block execution

2022-09-06 Thread Greg Minshall
Fedja,

> What I would like to have, to safely and easily use org-mode
> as an interactive notebook, is to not have to overload this
> function and to be asked only once per buffer/file whether to:
> 1) Unconditionally allow executing all code blocks
> 2) Unconditionally disallow executing all code blocks
> 3) Ask for every block.

i think that is an interesting idea, and maybe a more pleasant user
interface than what we currently have.  

probably, for me, it would allow me to drop a number of buffer-local
variable customizations, as i'm typically evaluating code in a given
buffer over and over again (and, so, would be happy to pay the price of
saying "yes" once per buffer (per emacs instance).

i'd be curious to hear what the downsides might be, especially anyone
who sees security-related downsides.

Ihor,

> 1) You can set org-confirm-babel-evaluate buffer-locally
> 2) Same or set :eval no header arg. (see
> https://orgmode.org/org.html#Evaluating-Code-Blocks)
> 3) You can set :eval query header arg.

for me the use case is 1) disabling all (or setting to "query") when,
e.g., you are exporting some file you received via e-mail and so trust
*none* of the code blocks; 2) enabling all for some file that you
yourself maintain, and so trust *all* the code blocks.  at least
initially, this seems a nice direction.

cheers, Greg



Re: Secrets in org-babel

2022-09-05 Thread Greg Minshall
Felix,

my setup is probably too complicated.  and, i don't really know what
"aws secretsmanager" is, or how you interact with it.  but, in case this
helps...

i put ("long-term") secrets in pass

https://www.passwordstore.org/


for "programmatic access" (in particular, for passwords needed by e-mail
sending and retrieving programs), avoiding having to enter my password
every ten minutes (or so), i wrote something called credeface/credepass

https://gitlab.com/minshall/credeface

which uses git's (!) credential cache for this service

https://git-scm.com/docs/git-credential


in your case, you might just use `credeface` to first store, then later
retrieve, whatever secrets you get from "aws secretsmanager".
occasionally (`--timeout`), you should be asked by `credeface` to
refresh that value.


bash archlinux (master): {1315} credeface --username ipsilon --host example.com 
store
this is that
bash archlinux (master): {1316} credeface --username ipsilon --host example.com 
get
cannot display secrets on the terminal
bash archlinux (master): {1317} credeface --username ipsilon --host example.com 
get | cat
this is that


cheers, Greg



Re: [FR, DISCUSSION] Re: [:results append] and [:wrap ...] don't play well together

2022-08-09 Thread Greg Minshall
Ihor,

thanks for your e-mail and explanation.

> We may clarify this in the manual.

probably worth doing.  though, trying to describe it succinctly will be
a challenge, i think!

> Another alternative could be treating
> :results append drawer/code/pp/org/latex/html
> differently and putting everything into a single drawer/src/export
> environment like:
> 
> #+begin_src R :results append :wrap foo
> Sys.time()
> #+end_src
> 
> #3:
> 
> #+RESULTS:
> #+begin_foo
> 2021-03-31 05:51:08
> 2021-03-31 05:51:10
> 2021-03-31 05:51:12
> #+end_foo
> 
> However, changing the behaviour will be a breaking change, which we do
> not want for the sake of back-compatibility.
> 
> Instead, we may introduce something like
> :results append-contents drawer
> that will behave like the above.
> 
> Is there a demand to have such a feature?

i suspect that at some point, it would be nice to have org be able to
"understand" how results of previous evaluations are laid out in the
buffer.  whether the need is now, i'm not sure (i can live without it).
(in the documentation you suggest above, it may help to have such an
option to point at; i.e., "if you don't really understand this, but want
something like this, try this option" :)

cheers, Greg



Re: Volunteering to maintain ob-asymptote.el within Org

2022-07-25 Thread Greg Minshall
hi, Munyoki,

i'm neutral w.r.t. asymptote support being in "core org" or in
"contrib".  but, ...

> I'm not _against_ supporting a proffesional-level
> graphics PL.  What I'm trying to say is that
> having it installed should be a choice made by the
> end-user.  Personally, I try to keep my systems as
> minimal as I can make them; and as such I advocate
> for users having that choice.  Very much by
> opinions.  Nevertheless...

in terms of keeping systems minimal, probably you knew this, but i just
wanted to mention that even if ob-asymptote.el is in "core org", the
user will not be required to install asymptote itself.

cheers, Greg



Re: Specify defaults for In Buffer Settings

2022-07-22 Thread Greg Minshall
Fraga, Eric  wrote:

> It comes with Emacs:

ah!  thanks!

cheers, Greg



form-like process for entering rows in an org-mode table?

2022-07-22 Thread Greg Minshall
hi.  does anyone have any code, or know of any existing package, that
would allow for some sort of form-like (or "transient"-like) interface
for adding rows to an org-mode table?  in particular, that provides some
sort of =completing-read= interface for a given set of choices for a
given column, etc.

cheers, Greg



Re: Specify defaults for In Buffer Settings

2022-07-22 Thread Greg Minshall
Eric,

> Have a look at #+SETUP but also consider the autoinsert package.

sorry, but what is the autoinsert package?

cheers, Greg



Re: numbering src blocks in HTML export

2022-07-22 Thread Greg Minshall
Ihor,

> Dear All, may we should provide a normal header arg as an equivalent of
> switches? Honestly, this whole switch syntax sounds unnecessary and only
> over-complicates things.

i'm a fan.



Re: [FR] Make :var foo=name-of-src-block assign the source block code instead of currently assigned result of evaluation (was: [PATCH] Add :noweb-prefix and :noweb-trans babel header arguments)

2022-07-16 Thread Greg Minshall
Ihor,

> Alternative ideas are welcome though. I'd prefer to avoid breaking
> change if we can find an equally simple syntax alternative to assign
> source block code to a variable.

my two cents would be to avoid the breaking change.  (i notice, for
example, that i use this construct in some of my .org files.)

cheers, Greg



Re: [FR] Make :var foo=name-of-src-block assign the source block code instead of currently assigned result of evaluation (was: [PATCH] Add :noweb-prefix and :noweb-trans babel header arguments)

2022-07-16 Thread Greg Minshall
Ihor,

> The current behaviour of :var foo=name-of-src-block is assigning result
> of evaluation. However, this behaviour is actually not documented.
> 16.4 Environment of a Code Block section of the manual only documents
> uses like

in fact, the text of the info page (on my system?) says
> code block without arguments
>  A code block name, as assigned by ‘NAME’ keyword from the example
>  above, optionally followed by parentheses.

note the "optionally".

cheers, Greg



Re: Alternatives or org-capture?

2022-07-14 Thread Greg Minshall
ypuntot,

by the way, i use =doct= to express org-capture templates:

https://github.com/progfolio/doct


in case that might seem more "intuitive" for you.

cheers, Greg



Re: [External] : Re: missing a character / font in agenda?

2022-07-13 Thread Greg Minshall
for what it's worth, without the symbola font on my machine (though i've
now added it), i seem to see the left-arrow 2b60 rendered using:

ftcrhb:-GNU-Unifont-normal-normal-normal-Sans-Serif-16-*-*-*-c-80-iso10646-1 
(#x2B61)

(if i'm interpreting the output of [C-u C-x =] correctly.)

cheers, Greg



Re: Confused about source code blocks evaluation when exporting

2022-07-12 Thread Greg Minshall
Alain,

let's see.  maybe look in the org manual for ":results" (with "value" or
"output" as options) and ":exports" (with "code" or "results" or "both"
as options).

that might help?

cheers, Greg



Re: [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...")

2022-07-10 Thread Greg Minshall
Juan Manuel,

> 1. There could be a defcustom, something like 'org-latex-use-fontspec'
> (I would vote for nil by default).

i just wanted to check: the "nil" case is for those of us who just want
it to work "out of the box"?

and, in the non-nil case, it would be up to the user to use "fontspec",
or whatever?

cheers, Greg



Re: LaTeX export: when is it more useful to use LuaTeX instead of pdfTeX?

2022-07-08 Thread Greg Minshall
Juan Manuel, et al.,

> TL;DR: A list of use cases where using LuaTeX is more advantageous than
> using pdfTeX

i'm guessing this would be a nice addtion to worg (if it's not already
there).

cheers, Greg



Re: Efficiently reuse code in org babel with R

2022-07-07 Thread Greg Minshall
Naresh,

> I want to source some data from databases, then use this data in
> various blocks.  I am looking for the most efficient way to achieve
> this.  In below blocks, is the code in block ``connection'' executed
> thrice (economy of code but no saving of time) or is it only executed
> once then used twice?  If the code is run thrice, is there another way
> to create code blocks so that the code is executed only once?

if you export this "file", the "connection" block will execute three
times.

Vikas suggested a session, which is something i often do for interactive
work.

or, the R code in "connection" could also use R variables to protect
itself against multiple executions.

or, i suppose you could invoke "connection" via a :var variable (rather
than via =<>), and use the :cache keyword to restrict
connection's evaluation to "every now and then" (for a very
precisely-defined, if not always intuitively definition of "every now
and then").  you'd have to be careful to not get bitten by the code
*not* being evaluated, and by it being evaluated too often.  (probably
too clever by half.)

hth, cheers, Greg



Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-24 Thread Greg Minshall
Ypo,

fwiw, [C-h k C-SPC] has a paragraph that says

With prefix argument (e.g., C-u C-SPC), jump to the mark, and set the mark from
position popped off the local mark ring (this does not affect the global
mark ring).  Use C-x C-@ to jump to a mark popped off the global
mark ring (see ‘pop-global-mark’).


i don't know if that helps at all.

cheers, Greg



Re: [DISCUSSION, default settings] Using mailcap as default handler for opening file links (was: [PATCH v3] Re: Bug in 9.5.3 org--file-default-apps)

2022-06-04 Thread Greg Minshall
hi, Ihor,

> It appears that using mailcap is giving us more trouble than benefits.
> I am not sure about the situation on Windows and Mac though.

> Should we change the default file handlers to Emacs globally (unless
> user customizes otherwise)? Should we continue efforts to work around
> mailcap issues? Maybe there is yet another alternative generic way to
> open files?

do you, or anyone else who might chime in, have a sense to what extent
"mainline emacs development" is committed to pushing the mailcap
solution?  and, to what extent are they running up against, and trying
to solve, problems similar to the ones you mention?

if "commitment + yes, trying", it might make sense to have, at least,
the *goal* of going mailcap.

my 2c.

cheers, Greg



Re: [PATCH] Re: tangle option to not write a file with same contents?

2022-06-01 Thread Greg Minshall
Ihor,

> The patch is attached.

great -- thanks very much!  this will be very helpful.

cheers, Greg



Re: Fwd: Help with my first elisp

2022-05-24 Thread Greg Minshall
Ypo,

> > but, using whatever the name of the logos-focus mode map, pointing at
> > your functions?
...
> I think "logos" doesn't have a map, is it possible?

certainly possible (i don't use logos).

in fact,

https://gitlab.com/protesilaos/logos/-/blob/main/logos.el


has the lines


;; Logos does not define any key bindings.  Try something like this:
;;
;; (let ((map global-map))
;;   (define-key map [remap narrow-to-region] #'logos-narrow-dwim)
;;   (define-key map [remap forward-page] #'logos-forward-page-dwim)
;;   (define-key map [remap backward-page] #'logos-backward-page-dwim))
;;
;; By default those key bindings are: C-x n n, C-x ], C-x [.


which certainly implies no map.  and, iiuc, *these* =define-key= lines
are global, i.e., remain true whether you are in, or out of, logos mode.

cheers, Greg



Re: Help with my first elisp

2022-05-23 Thread Greg Minshall
Ypo,

> (defun salto ()
>   (interactive)
>   (if posicion 1
> (posicion2)
>   (if posicion 2
>   (posicion3)
> (if posicion 3
> (posicion1)

your function =salto= may be using =if= incorrectly.  try marking that
=defun= and hitting TAB to justify it.  my guess is, that's not what you
want.

> ;; (define-key global-map (kbd "SPC") #'salto)
> (local-set-key "j" 'posicion1)
> (local-set-key "k" 'posicion2)
> (local-set-key "l" 'posicion3)
> ))

maybe use something like

>>  (define-key mh-letter-mode-map
>>   (kbd "C-c s")
>>   'ggm-mh-sentaddrs-completion)

but, using whatever the name of the logos-focus mode map, pointing at
your functions?

cheers, Greg



Re: Help with my first elisp

2022-05-22 Thread Greg Minshall
Ypo,

> Additional problem: I don't know how to recover keys 1, 2 and 3 to
> their normal functioning, right now I can't type 1, 2 or 3 on my
> Emacs. xD

you have, e.g.,

> (define-key global-map (kbd "1") #'posicion1)
> (define-key global-map (kbd "2") #'posicion2)
> (define-key global-map (kbd "3") #'posicion3)

but, that is in the global map.  for a given mode, i sometimes do
something like that:

> (add-hook 'mh-show-mode-hook #'(lambda ()
>  (local-set-key "q" 'mh-show-execute-commands)))

or, closer to what you have, sometimes like

> (define-key mh-letter-mode-map
>  (kbd "C-c s")
>  'ggm-mh-sentaddrs-completion)

i am no elisp expert, and so those are just random things i've found
that work.  but, hopefully this may give you a hint of a direction to
follow.

cheers, Greg



Re: Tips on using Org-mode to manage a reading list

2022-05-16 Thread Greg Minshall
hi, Sébastien,

> I got to many books and articles for a table...

hmm.  why too many?  each column would be an attribute (title, author,
score, publisher, ...), or a status (unread, finished, ...) and each row
would be a book.  that should scale.

the downside of a table (though that is almost certainly what i would
have suggested) is the "notes", i.e., the freeform text that would
follow the property table in a node in your scheme.  there's not a
"naive" way to do that.

cheers, Greg



Re: Regarding arbitrary Org blocks

2022-05-11 Thread Greg Minshall
Russell, the behavior you describe, that used to work, sounds reasonable
to me.  otoh, in case you haven't discovered =narrow-to-region= and
friends, (which i only recently did), that might also give you some of
what you want.  cheers, Greg



Re: leading superscript on a line for ODT export

2022-03-16 Thread Greg Minshall
Max and Eric, thanks for the explanation!  "hmm...", about manual
patches at the moment.



Re: leading superscript on a line for ODT export

2022-03-16 Thread Greg Minshall
hi.

> @@org:@@^1 blah

i'm not familiar with the '@@' construct.  in the manual, searching for
the string "@@", i see references to various =@@foo...=, but not, for
example, =@@org:@@=.

is there a general definition?  might the index (or, one of the indices)
usefully have references to various "special" characters (like "^", "|",
and "@" when used in TODOs, iiuc)?

cheers, Greg



Re: interleaving comment between rows of a table?

2022-03-07 Thread Greg Minshall
Juan Manuel,

> I find the annotate package useful for inserting comments and
> annotations in "difficult" places.

thanks -- annotate looks very applicable!

cheers, Greg



interleaving comment between rows of a table?

2022-03-07 Thread Greg Minshall
hi, all.

i don't remember anybody asking about this.

i'd sometimes find it useful to be able to interleave comments -- using
(almost) whatever syntax -- between rows in an org-mode table.
(normally, this would be to provide context/rationale for the subsequent
row(s).)

something like:

| column name | another name   |
|-+|
# i put this in early
| some data   | some more data |
# this helps with some issue
| a bit more  | on the way |


is there any known way to do this?  some switch, or an exposed regexp?

cheers, Greg



Re: quotation marks in table cell vs. org-babel-ref-resolve

2022-02-28 Thread Greg Minshall
i have a problem similar to this from a few months ago.  in this case,
it seems to be when trying to pass a column with a quoted-string inside
of it.  (this is on the "bugfix" branch.)  my e-lisp code seems to get
just the initial part of the string from the cell with "odd" contents.


#+name: xl
| this, "he said" | is where, | "you go in" there |

#+begin_src elisp :var xl=xl
  (message "%S" xl)
#+end_src


when i execute this, *Messages* says

(("this, \"he said\"" "is where," "you go in"))
Code block evaluation complete.

(my complaint: there's no there there. :)

in December, when i reported something similar, Tim pushed back, and
maybe i should elaborate:

> The key question is what is the use case for having this 'mixed'
> content in a table cell?

for better or worse, i most often use org-mode tables as (storage and
data entry mechanisms for) simple data bases.  other than the pipe
symbol ('|'), i assume i can put "anything" in a cell, and extract it
later.  i find this very valuable.

normally, i pass such tables to some R code (this example, btw, breaks
passing to R code).  but occasionally i do other things with them.

the behavior i'm seeing seems to me inconsistent, indicating it is maybe
not intentional.  exporting, for example, at least to html. i see the
full contents of the third column.

cheers, Greg



Re: including one double quote in an anonymous footnote?

2022-02-28 Thread Greg Minshall
Nicolas and Juan Manuel,

thanks very much.  the bugfix branch seems to work for my case.

cheers, Greg



Re: including one double quote in an anonymous footnote?

2022-02-26 Thread Greg Minshall
Juan Manuel,

> I can confirm that behavior. One possible solution is to use an entity
> (M-x org-entities-help):

thanks very much -- that does the trick for my case.

cheers, Greg



including one double quote in an anonymous footnote?

2022-02-26 Thread Greg Minshall
hi.  experimenting [after significant confusion!], it appears that
including a single (unpaired) double quote inside an anonymous footnote
eliminates the recognition of the footnote.  is this intentional?

this works:

this is a test.[fn:: a very long footnote]


whereas this doesn't:

this is a test.[fn:: "a very long footnote]


i notice that for purposes of exporting, i can have the single double
quote accepted by escaping it with a backslash:

this is a test.[fn:: \"a very long footnote]

but,
- the backslash itself shows up in both latex and html exporting
- the footnote doesn't get displayed in the org buffer as a footnote
  (the separate colors; this is "font locking"?)

Org mode version 9.5.2 (9.5.2-gbb6830 @ 
/home/minshall/.emacs.d/straight/build/org/)

cheers, Greg



Re: How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread Greg Minshall
Edgar,

one of my .org files has this

#  ^:{}: disable super/subscripting: https://stackoverflow.com/a/698791/1527747
#+options: ^:{}


ymmv.



Re: Bug: SCHEDULED's end time wrong [9.5.2 (9.5.2-gfbff08 @ /Users/liutos/.emacs.d/elpa/org-9.5.2/)]

2022-02-20 Thread Greg Minshall
Ihor,

> Which is perfectly fine. 24:29 is one of the expected time formats for
> org-agenda. If I recall correctly, this kind of time range is used in
> the wild. See https://orgmode.org/list/874l3w7woq@gmail.com

ah, i see.  thanks for the correction!

cheers, Greg



Re: Bug: SCHEDULED's end time wrong [9.5.2 (9.5.2-gfbff08 @ /Users/liutos/.emacs.d/elpa/org-9.5.2/)]

2022-02-20 Thread Greg Minshall
Ihor,

i tried Liutos' example, and ended up with

> * a simple entry
>   SCHEDULED: <2022-02-20 Sun 23:59-24:29>

i think it is the "-24:29" that is of concern.



Re: [PATCH] lisp/org-capture.el: Add hook & hook options to org-capture (Valentin Herrmann)

2022-02-10 Thread Greg Minshall
fwiw...

> I've implemented what you're proposing here (and much more) in a 
> package you may find useful a couple years ago. I pitched adopting 
> some of the ideas into org-mode proper and was willing to do the 
> work. My proposal was met with enthusiastic silence:
> 
> https://www.github.com/progfolio/doct

i've been using doct for a while, and have been very happy with it.

(thanks for implementing it.)

cheers, Greg



Re: Unable to get current or via use-package

2022-02-09 Thread Greg Minshall
Loris, et al.,

> Thanks, that did the trick.  I was hoping that when I use the same
> init.el on a different machine I wouldn't have to remember anything and
> use-package would automatically install the latest version.  Seemingly
> not :-/

this is maybe an appropriate time to insert a plug for straight.el:

https://github.com/raxod502/straight.el

though, in reality, it has its own rough edges.  yremv ("your rough
edges may vary" :).

cheers, Greg



Re: [BUG] bug in 'ox-man?

2022-01-31 Thread Greg Minshall
> #+begin_src bash :results output :exports code :eval never-export
>   echo 'lf "\n"'
> #+end_src

it seems that `.man` files are in troff(1) format, which uses backslash
escapes up the wazoo (however that is spelled).  it seems that (one way)
to getting a backslash character through troff is representing it as
"\e".

for my *particular* instance, where the backslash is in an org src
block, the below modification to `(org-man-src-block)` may work.

presumably one might have backslash sequences in example blocks, or in
the main text, or ...?  i don't know enough to have any idea if there is
some general mechanism that might solve all those.

cheers, Greg


From 0d0dadc6b4e7f3358612f056a9eb032c1eb4145f Mon Sep 17 00:00:00 2001
From: Greg Minshall 
Date: Mon, 31 Jan 2022 16:08:35 -0800
Subject: [PATCH] lisp/ox-man.el: escape backslashes from org src blocks

---
 lisp/ox-man.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index e808edcdf..6eb6b5ff8 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -748,7 +748,9 @@ CONTENTS holds the contents of the item.  INFO is a plist 
holding
 contextual information."
   (if (not (plist-get info :man-source-highlight))
   (format ".RS\n.nf\n\\fC%s\\fP\n.fi\n.RE\n\n"
- (org-export-format-code-default src-block info))
+  (replace-regexp-in-string
+   "" "e"
+  (org-export-format-code-default src-block info)))
 (let* ((tmpdir temporary-file-directory)
   (in-file  (make-temp-name (expand-file-name "srchilite" tmpdir)))
   (out-file (make-temp-name (expand-file-name "reshilite" tmpdir)))
--
2.34.1




[BUG] bug in 'ox-man?

2022-01-31 Thread Greg Minshall
hi, all.

this works when exporting as a .pdf or a .html.  but, not when
exporting to 'ox-man:

#+begin_src bash :results output :exports code :eval never-export
  echo 'lf "\n"'
#+end_src

(the result has a "0" in it, appears to have gotten confused by maybe
trying to substitute a newline character for the backslash-n, ???)

i'm running:
Org mode version 9.5.1 (9.5.1-g14ed65 @ 
/home/minshall/.emacs.d/straight/build/org/)


cheers, Greg



Re: Depreciating TeX-style LaTeX fragments

2022-01-16 Thread Greg Minshall
Colin,

> > Colin Baxter writes:
> >> Ah, LaTeX3 - whatever happened to that?
...
> Yes, I know. My remark was tongue in cheek.

which leaves open whether your tongue was already in your cheek at:

> Indeed. Compare something like
> 
> $g=\lim_{\delta m\to 0}(\delta F/\delta m)$
> 
> with
> 
> \(g=\lim_{\delta m\to 0}(\delta F/\delta m)\)

?

additionally, fwiw, i was a long time '$...$'-user.  at one point i was
betrayed, and switched to '\(...\)'.  it may be more to type (i hadn't
noticed the suggestion Eric just sent in), but i liked the
repeatability.  and, in terms of parsing, i'm very sympathetic to having
"directional" end markers.

cheers, Greg



Re: Question Regarding Creating Workflow For Automatic Formulas For Finance Based Org Spreadsheet

2022-01-10 Thread Greg Minshall
> I'm wondering if your opinion about Ledger isn't influenced by the fact
> that it uses basic accounting principles, like the idea of double-entry
> accounting.  For me, it's /very/ simple and intuitive, but I graduated
> in economics many years ago and had a (basic, but still) course on
> accounting.  If that is your problem, I'd suggest spending some time on
> understanding that - even if you don't end up using Ledger but some
> other software, you might find learning about accounting useful.  (Also,
> it's fascinating.  No, really!  It's an extremely clever abstract
> system with a real-life use-case.)

i agree that learning the principles of double-entry is worthwhile,
actually interesting, and of a very interesting history!



Re: [BUG] Eval src block does not redisplay inline image [9.5.1 (9.5.1-g36086a @ /Users/rob/.emacs.d/elpa/org-9.5.1/)]

2021-12-09 Thread Greg Minshall
Robert,

i have the following commented out in my .emacs.  i have no memory of
it, why i put it in, why i took it out, or if it might provide you any
clue.  but, with all those caveats...

;; in org-mode, display images inline after execution
;; except, after a while, this gets tiresome.  one can C-c C-x C-v
;; (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)


cheers, Greg



Re: On zero width spaces and Org syntax

2021-12-06 Thread Greg Minshall
Robert,

> Thereʼs no need to modify Emacs: see
> `glyphless-char-display-control'. ZWS falls under 'format-control'.

very nice.  thanks!

cheers, Greg



Re: Concrete suggestions to improve Org mode third-party integration :: an afterthought following Karl Voit's Orgdown proposal

2021-12-06 Thread Greg Minshall
Ihor,

> Search result is just an entrance for users to be curious about the
> new beast of "Org mode". The website front page is the means to make
> users try. And the Org mode itself is the way to make users fall in
> love with Org in one way or another (even unrelated to Emacs [at least
> initially]).

i *do* agree that our hope is that people will see the great benefit of,
and use, "emacs org mode".  however, along with others, i don't want
people to fall in love with "org mode" itself, but, rather with the full
"running org mode with emacs".

at the same time, i have a desire that "the general public" will be able
to "work with" "emacs org mode" *files*; i.e., treat them as somewhat
more than a collection of octets.  *how much* more is tbd; i sort of saw
Karl Voit's proposal of "level 1", ..., as being an attempt to define
ways of extracting (limited) utility from an org mode file.

cheers, Greg




Re: Concrete suggestions to improve Org mode third-party integration :: an afterthought following Karl Voit's Orgdown proposal

2021-12-06 Thread Greg Minshall
Juan Manuel (and, Tim, i think),

> On the other hand, we must not forget that Org, as part of Emacs, is
> part of GNU, and this is a mailing list from the GNU project. I think
> everything related to the (possible) extension of GNU Org Mode outside
> of GNU Emacs (even in software incompatible with the ethics and
> philosophy of the GNU project) should be considered offtopic here and
> be discussed in other forums. Otherwise it would only create confusion
> among users.

i hope we don't adopt such an "official policy" regarding discussions on
this list.  i don't think we've had any problems where non-FSF/GNU
topics have somehow swamped our discussions.

cheers, Greg



Re: quotation marks in table cell vs. org-babel-ref-resolve

2021-12-06 Thread Greg Minshall
sigh.

the following is pretty much a lie.  apologies.

> =org-babel-ref-resolve= is convenient to use (as you provide a REF,
> rather than create a [temp] buffer, visit the file, whatever).

the creating a temp buffer, visiting the file, are *not* provided by
=org-babel-ref-resolve=.

cheers (or, cheerless's :), Greg



Re: quotation marks in table cell vs. org-babel-ref-resolve

2021-12-05 Thread Greg Minshall
hi, Tim,

thanks for the reply.

> I don't know. It could be related to the spreadsheet capabilities or it
> could simply be an oversight in how the code extracts values from
> tables.

if anyone has any knowledge in this area, i'd be curious to hear.

> I tend to use the function org-table-to-list to extract the data from a
> table. It gives me a nested list which I can then process with elisp in
> any way I want. I don't know if that would help or how it will interpret
> a cell whic contains both quoted and unquoted data.

for the record, things -- lists and lisps -- being equal, the function
you presumably meant to write was =org-table-to-lisp=.

=org-babel-ref-resolve= is convenient to use (as you provide a REF,
rather than create a [temp] buffer, visit the file, whatever).  but, it
isn't clear to me what functions (=org-babel-ref-resolve= and/or
=org-table-to-lisp=) should be considered part of the "Emacs Org Mode
API". :)

(i've gotten "around" the issue by prepending my e-mail addresses with
[: SPACE].)

cheers, Greg



  1   2   3   4   >