Re: [O] [RFC] Org syntax (draft)

2013-03-12 Thread orgmode


Hi Nicolas,

great work! It's fantastic that orgmode now gets a specification.

What may help is to document the syntax machine readable and somewhat  
more formal.  This ensures that there are less differences in  
interpretation and that the specification can be used to generate an  
orgmode parser directly.  An example could be how the ietf specifies  
things, have a look at https://en.wikipedia.org/wiki/ABNF or EBNF.   
It's not much difference from what you have done, but it's more  
unambigous.


Thanks for the great work!





[O] problems with org and pabbrev

2016-02-09 Thread orgmode

Hi,

somehow pabbrev mode doesn't work anymore with org, since I use org from 
elpa.


after loading org, pabbrev is a minor mode, as indicated in the 
modeline.


However  runs the command org-cycle instead of 
pabbrev-expand-maybe.


So I wrote the following functions:

(defun org-cycle-or-pabbrev-expand ()
  "use org-cycle in headline, otherwise use pabbrev-expand-maybe"
  (interactive)
  (if (looking-at org-outline-regexp)
  (org-cycle)
(pabbrev-expand-maybe 'nil)))

(add-hook 'org-mode-hook
  '(lambda ()
(define-key org-mode-map [tab] 
'org-cycle-or-pabbrev-expand)

  ))

This gives an error:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p 
nil)

  =(nil 4)
  (cond ((= uarg 4) (if (> (length pabbrev-expansion-suggestions) 1) 
(pabbrev-suggestions-goto-buffer pabbrev-expansion-suggestions) 
(pabbrev-call-previous-tab-binding))) ((eq last-command (quote 
pabbrev-expand-maybe)) (if (and (> (length 
pabbrev-expansion-suggestions) 1) (> (length 
pabbrev-last-expansion-suggestions) 1)) (pabbrev-suggestions-goto-buffer 
pabbrev-last-expansion-suggestions) 
(pabbrev-call-previous-tab-binding))) (pabbrev-expansion (progn (setq 
pabbrev-last-expansion-suggestions pabbrev-expansion-suggestions) 
(pabbrev-expand))) (t (pabbrev-call-previous-tab-binding)))

  pabbrev-expand-maybe-full(nil)
  (if pabbrev-minimal-expansion-p (pabbrev-expand-maybe-minimal uarg) 
(pabbrev-expand-maybe-full uarg))

  pabbrev-expand-maybe(nil)
  (if (looking-at org-outline-regexp) (org-cycle) (pabbrev-expand-maybe 
(quote nil)))

  org-cycle-or-pabbrev-expand()
  call-interactively(org-cycle-or-pabbrev-expand nil nil)
  command-execute(org-cycle-or-pabbrev-expand)


I've no idea how to preceed further, any help appreciated.

Versions I use:
emacs version 24.1
pabbrev Version: 4.2.1




Re: [O] problems with org and pabbrev

2016-02-10 Thread orgmode

Thanks very much.  The following line did the trick:

(define-key pabbrev-mode-map [tab] 'pabbrev-expand-maybe)

I set this after loading orgmode.  It seems pabbrev uses \tab and not 
[tab]. or orgmode somehow overrides it, and it has to be set explicitly.




On 2016-02-09 16:50, Eric S Fraga wrote:

On Tuesday,  9 Feb 2016 at 15:43, orgmode wrote:

Hi,

somehow pabbrev mode doesn't work anymore with org, since I use org
from elpa.

after loading org, pabbrev is a minor mode, as indicated in the
modeline.

However  runs the command org-cycle instead of
pabbrev-expand-maybe.


In my case,  seems to work although I do refer to it as [tab] in 
my

initialisation code:

#+begin_src emacs-lisp
  (require 'pabbrev)
  (setq pabbrev-idle-timer-verbose nil
pabbrev-read-only-error nil)
  (define-key pabbrev-mode-map [tab] 'pabbrev-expand-maybe)
  (add-hook 'text-mode-hook (lambda () (pabbrev-mode)))
#+end_src




[Orgmode] [PATCH] Stable key assignment for org-fast-tag-selection

2011-01-12 Thread emacs-orgmode
I noticed that the code to "automatically assign a character" in the
org-fast-tag-selection function assigns a different character depending
on whether or not the tag exists in the current heading.

To see the problem, do the following steps:

- Eval (setq org-use-fast-tag-selection t)
- Eval (setq org-fast-tag-selection-single-key "expert")
- Create a heading with tags :a1:a2:
- Create another heading with tags :a1:a2:
- Type "C-c a", "C-c a", "C-c a", "C-c a"
- Notice how it changes from a1 to a2

Below is a patch to make the character assignment stable, given that all
of the same tags exist in the file each time it's run.

(The tabs messed up the indentation in the git-diff output.)

Regards,
Jason


diff --git a/lisp/org.el b/lisp/org.el
index b2b08ae..fd49f3e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12947,7 +12947,8 @@ possibly with grouping information.  TODO-TABLE is a 
similar table with
 TODO keywords, should these have keys assigned to them.
 If the keys are nil, a-z are automatically assigned.
 Returns the new tags string, or nil to not change the current settings."
-  (let* ((fulltable (append table todo-table))
+  (let* ((table (sort table (lambda (a b) (string< (car a) (car b)
+(fulltable (append table todo-table))
 (maxlen (apply 'max (mapcar
  (lambda (x)
(if (stringp (car x)) (string-width (car x)) 0))

___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] The patch (org-exp-blocks), the question and the bug

2009-05-17 Thread emacs-orgmode
Hello,

I have created (in fact, I have copied and pasted with slights
modifications) a function to use asymptote's code
(http://asymptote.sourceforge.net) with the help of org-exp-blocks.
Unfortunately, I am clueless about how to make a patch with git. So,
with all my apologies, I will put it here as it might be useful to
someone.

(defun org-export-blocks-format-asy (body &rest headers)
  "Pass block BODY to the asy utility creating an image.
Specify the path at which the image should be saved as the first
element of headers, any additional elements of headers will be
passed to the asy utility as command line arguments. The default
output format is pdf, but you can specify any format supported by
Imagemagick convert program with '-f outformat'."
  (message "asy-formatting...")
  (let ((out-file (if headers (car headers)))
(args (if (cdr headers) (mapconcat 'identity (cdr headers) " ")))
(data-file (make-temp-file "org-asy")))
(setq body (if (string-match "^\\([^:\\|:[^ ]\\)" body)
   body
 (mapconcat (lambda (x) (substring x (if (> (length x) 1) 2 1)))
(org-split-string body "\n")
"\n")))
(cond 
 ((or htmlp latexp)
  (with-temp-file data-file (insert body))
  (message (concat "asy -globalwrite -f pdf -o " out-file " " args " " 
data-file))
  (shell-command (concat "asy -globalwrite -f pdf -o " out-file " " args " 
" data-file))
  (format "\n[[file:%s]]\n" out-file))
 (t (concat
 "\n#+BEGIN_EXAMPLE\n"
 body (if (string-match "\n$" body) "" "\n")
 "#+END_EXAMPLE\n")

Don't forget to change accordingly org-export-blocks.

But that leads me to a question. I use (setq
org-export-latex-image-default-option "") in my .emacs. But, as it might
not be convenient for everyone, I would like to disable locally that
option in the asymptote's block. In fact, the code should take
precedence above export options : if I put 'size(5cm,0);' in my block, I
don't want no variable messing with that. Is there a way to do that ?

Last, but not least, I have something looking like a bug to report.
Sometimes, when I hit C-k in agenda view, it kills me 2 lines instead of
the one I am currently on. I can tell that kill-whole-line has nothing
to do with that. It scares me so much that I have to TAB first while in
agenda view in order to kill the item I want to make disappear. I use
6.26d but I could swear this bug has been on for ages (maybe 4.xx,
certainly 5.xx).

Thanks.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] C-k makes entries disappear in agenda view

2009-05-23 Thread emacs-orgmode
Hello,

As I was saying in anoter post, it looks like there's something weird
happening when using C-k in agenda view:

1. Create two new remember entries (i.e. test and test2) with the same
tag (I used @office)
2. Narrow down the agenda view to only see the @office entries.
3. Kill the last but one entry (it should be "test") : both of "test"
and "test2" disappear frow the view. Actually, "test2" is not properly
killed, but it is scary nonetheless.

It only happens with two last entries.

Is anyone able to reproduce this ?

-- 
Nicolas Goaziou



_______
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] C-k makes entries disappear in agenda view

2009-05-24 Thread emacs-orgmode
Carsten Dominik  writes:

> Fixed, thanks, please verify.

To tell the truth, I have no way of getting my hands on the latest git
at the moment. But I do trust in your debugging powers !

I'll tell you if anything goes wrong when I have the chance to test it.

Thanks anyway.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Cycling visibility of blocks

2009-05-24 Thread emacs-orgmode
Hello,

I perhaps have missed it in the manual, but, would it be possible to
cycle visibility in blocks like in the example below ?

#+BEGIN_something
blah blah blah
blah
blah blah
and so much blah yet to come
#+END_something

becomes

#+BEGIN_something
...
#+END_something

It could help when you have those big BEGIN_SRC getting in the way.

Thanks.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Cycling visibility of blocks

2009-05-24 Thread emacs-orgmode
Eric Schulte  writes:

> The attached file should implement this feature, just load the file and
> then press tab while at the beginning of a source block.  Note that it
> requires a newish version of org-mode which includes the
> `org-tab-first-hook' variable.

Very nice ! Thank you.

> Maybe this would make sense for all org blocks, not just src blocks?

Sure, begin_src was just an example. It can be very useful in so many
cases.

-- 
Nicolas Goaziou



_______
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] C-k makes entries disappear in agenda view

2009-05-25 Thread emacs-orgmode
Carsten Dominik  writes:

> Fixed, thanks, please verify.

It works now. No more entries disappearing without notice.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [ANN] Emergency bugfix release: Org mode 9.7.5

2024-06-22 Thread emacs-orgmode



Ihor Radchenko  writes:


I just released Org mode 9.7.5 that fixes a critical vulnerability.
The release is coordinated with emergency Emacs 29.4 release.


Thanks for the release and the anouncement.

Will a CVE be released? I am interested if there are mitigating factors
such as using `emacs -nw` (without GUI), thus no possible preview of the
attachments (IIUC).

Best,



[BUG] Typo in docs (creating timestamps) [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.4/lisp/org/)]

2025-05-21 Thread emacs-orgmode


Hi,

I am reading
https://orgmode.org/manual/Creating-Timestamps.html

Quote:
> When called with a prefix argument, use the alternative format which
> contains date and time. The default time can be rounded to multiples
> of 5 minutes. See the option org-timestamp-rounding-minutes.

The correct name of the variable is `org-time-stamp-rounding-minutes`.



Q: placement of initialization for org-time-stamp-formats

2020-06-30 Thread hj-orgmode-1



 Hi,

 1. Org-Mode rocks!!

 2. I need to have, besides hours and minutes, also seconds and time 
zone in timestamps. I also need to be able to edit the timestamps down 
to seconds. If I set ( inside .spacemacs  in (custom-set-variables) ) :


'(org-display-custom-times t)
'(org-time-stamp-custom-formats (quote ("<%Y-%m-%d %a>" . "<%Y-%m-%d %a 
%H:%M:%S %Z>")))


   then I get non-editable timestamps. But if I don't set these, and I 
only manually set org-time-stamp-formats after I open an org-mode file, 
I get exactly what I need => editable timestamps with seconds and timezone


Question: Into which initialization file (and which location in that 
file) do I place the assignment for org-time-stamp-formats so I don't 
have to manually set the following every time after emacs startup?


(setq org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a %H:%M:%S 
%Z>"))



  Thanks!

    H.J.


 3. Environment : recent (less than 2 months old) installation of spacemacs

Emacs  : GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 
3.22.30)

 of 2019-05-11
Package: Org mode version 9.3.6 (9.3.6-75-gb614ed-elpaplus @ 
/home/user/.emacs.d/elpa/org-plus-contrib-20200525/)


current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a 
%H:%M:%S %Z>")

 org-log-note-clock-out t
 org-imenu-depth 8
 org-agenda-files '("~/git/jtodo/notes.org" "~/git/jtodo/jtodo.org" 
"~/git/tyra165/todo.org" "~/git/jtodo/skola.org")
 org-mode-hook '(#[0 "\301\211^P\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
toc-org-enable org-download-enable org-bullets-mode
 spacemacs//org-babel-do-load-languages 
spacemacs/add-org-surrounds evil-org-mode org-eldoc-load)

 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-restore-windows-after-quit t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-with-inline-images t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300^A\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)

 org-log-done 'time
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . 
php) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh)
  ("beamer" . latex) ("calc" . fundamental) ("cpp" 
. c++) ("ditaa" . artist) ("dot" . fundamental) ("elisp" . emacs-lisp)
  ("ocaml" . tuareg) ("screen" . shell-script) 
("shell" . sh) ("sqlite" . sql))

 org-catch-invisible-edits 'error
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t!)" "NEXT(n!)" "DOINGNOW(d!)" 
"BLOCKED(b@)" "TODELEGATE(g@)" "DELEGATED(D!)" "FOLLOWUP(f!)" 
"TICKLE(T!)" "|"

  "CANCELLED(c@)" "DONE(F@)")
 )
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)

 org-clock-persist-file "/home/user/.emacs.d/.cache/org-clock-save.el"
 org-id-locations-file "/home/user/.emacs.d/.cache/.org-id-locations"
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link 
:export org-attach-export-link :complete org-attach-complete-link)
   ("id" :follow org-id-open) ("eww" :follow eww 
:store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store 
org-rmail-store-link) ("mhe" :follow org-mhe-open :store org-mhe-store-link)
   ("irc" :follow org-irc-visit :store 
org-irc-store-link :export org-irc-export)
   ("info" :follow org-info-open :export 
org-info-export :store org-info-store-link)
   ("gnus" :follow org-gnus-open :store 
org-gnus-store-link)
   ("docview" :follow org-docview-open :export 
org-docview-export :store org-docview-store-link)
   ("bibtex" :follow org-bibtex-open :store 
org-bibtex-store-link)
   ("bbdb" :follow org-bbdb-open :export 
org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link)

  

Re: Q: placement of initialization for org-time-stamp-formats

2020-07-03 Thread hj-orgmode-1



 Hello again.

 After a lot of searching and trying, I finally figured one thing that 
seems to work: ( I am no lisp programmer, so I don't know what negative 
side effects might this have) ; I've added into dotspacemacs/user-config 
section inside .spacemacs :


 (add-hook 'org-load-hook
  (lambda ()
    (setq org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d 
%a %H:%M:%S %Z>")) ))


 Does that look like this should have no undesirable side effects?

  Thanks!

    H.J.


On 7/1/20 2:19 AM, hj-orgmod...@hj.proberto.com wrote:


 Hi,

 1. Org-Mode rocks!!

 2. I need to have, besides hours and minutes, also seconds and time 
zone in timestamps. I also need to be able to edit the timestamps down 
to seconds. If I set ( inside .spacemacs  in (custom-set-variables) ) :


'(org-display-custom-times t)
'(org-time-stamp-custom-formats (quote ("<%Y-%m-%d %a>" . "<%Y-%m-%d 
%a %H:%M:%S %Z>")))


   then I get non-editable timestamps. But if I don't set these, and I 
only manually set org-time-stamp-formats after I open an org-mode 
file, I get exactly what I need => editable timestamps with seconds 
and timezone


Question: Into which initialization file (and which location in that 
file) do I place the assignment for org-time-stamp-formats so I don't 
have to manually set the following every time after emacs startup?


(setq org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a 
%H:%M:%S %Z>"))



  Thanks!

    H.J.


 3. Environment : recent (less than 2 months old) installation of 
spacemacs


Emacs  : GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ 
Version 3.22.30)

 of 2019-05-11
Package: Org mode version 9.3.6 (9.3.6-75-gb614ed-elpaplus @ 
/home/user/.emacs.d/elpa/org-plus-contrib-20200525/)


current state:
==
(setq
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-after-execute-hook '(spacemacs/ob-fix-inline-images)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-time-stamp-custom-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a 
%H:%M:%S %Z>")

 org-log-note-clock-out t
 org-imenu-depth 8
 org-agenda-files '("~/git/jtodo/notes.org" "~/git/jtodo/jtodo.org" 
"~/git/tyra165/todo.org" "~/git/jtodo/skola.org")
 org-mode-hook '(#[0 "\301\211^P\207" [imenu-create-index-function 
org-imenu-get-tree] 2]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-show-all append local] 5]
 #[0 "\300\301\302\303\304$\207" [add-hook 
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes 
toc-org-enable org-download-enable org-bullets-mode
 spacemacs//org-babel-do-load-languages 
spacemacs/add-org-surrounds evil-org-mode org-eldoc-load)

 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-restore-windows-after-quit t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-startup-with-inline-images t
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-bibtex-headline-format-function #[257 "\300^A\236A\207" [:title] 
3 "\n\n(fn ENTRY)"]

 org-babel-pre-tangle-hook '(save-buffer)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)

 org-log-done 'time
 org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . 
php) ("C" . c) ("C++" . c++) ("asymptote" . asy) ("bash" . sh)
  ("beamer" . latex) ("calc" . fundamental) ("cpp" 
. c++) ("ditaa" . artist) ("dot" . fundamental) ("elisp" . emacs-lisp)
  ("ocaml" . tuareg) ("screen" . shell-script) 
("shell" . sh) ("sqlite" . sql))

 org-catch-invisible-edits 'error
 org-occur-hook '(org-first-headline-recenter)
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-todo-keywords '((sequence "TODO(t!)" "NEXT(n!)" "DOINGNOW(d!)" 
"BLOCKED(b@)" "TODELEGATE(g@)" "DELEGATED(D!)" "FOLLOWUP(f!)" 
"TICKLE(T!)" "|"

  "CANCELLED(c@)" "DONE(F@)")
 )
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)

 org-clock-persist-file "/home/user/.emacs.d/.cache/org-clock-save.el"
 org-id-locations-file "/home/user/.emacs.d/.cache/.org-id-locations"
 org-confirm-shell-link-function 'yes-or-no-p
 org-link-parameters '(("attachment" :follow org-attach-open-link 
:export org-attach-export-link :complete org-attach-complete-link)
   ("id" :follow org-id-open) ("eww" :follow eww 
:store org-eww-store-link)
   ("rmail" :follow org-rmail-open :store 
org-rmail-store-link) ("mhe" :follow org-mhe-open :store 
org-mhe-store-link)
   ("irc" :follow org-irc-visit :store 
org-irc-store-link :export org-i

Re: [SOLVED] Q: placement of initialization for org-time-stamp-formats

2020-07-06 Thread hj-orgmode-1



On 7/3/20 3:51 PM, Robert Pluim wrote:

On Fri, 3 Jul 2020 15:18:40 +0200, hj-orgmod...@hj.proberto.com said:

 hj-orgmode-1>  Hello again.

 hj-orgmode-1>  After a lot of searching and trying, I finally figured one 
thing that
     hj-orgmode-1> seems to work: ( I am no lisp programmer, so I don't know 
what
 hj-orgmode-1> negative side effects might this have) ; I've added into
 hj-orgmode-1> dotspacemacs/user-config section inside .spacemacs :

 hj-orgmode-1>  (add-hook 'org-load-hook
 hj-orgmode-1>   (lambda ()
 hj-orgmode-1>     (setq org-time-stamp-formats '("<%Y-%m-%d %a>"
     hj-orgmode-1> . "<%Y-%m-%d %a %H:%M:%S %Z>")) ))

 hj-orgmode-1>  Does that look like this should have no undesirable side 
effects?

Thatʼs normally written

 (with-eval-after-load "org"
   (setq org-time-stamp-formats '("<%Y-%m-%d %a>" . "<%Y-%m-%d %a%H:%M:%S 
%Z>")))

Robert



Thank you!! Your suggestion is working very well!!

 H.J.





documentation feature: typical .org files as starting points along with screencasts

2020-09-04 Thread hj-orgmode-1



 Hello,

 First of all, orgmode rocks!

  I am trying to work with with orgmode  for a few months now, and I 
feel like I am still only scratching the surface. I've read the manual, 
and the online docs, yet fully functional access to some features eludes 
me still.


  I would find it tremendously useful if, perhaps as a part of the 
documentation, there were several sample .org files, at various levels 
of complexity (features used) _along_ _with_ a quick and simple screen 
cast of its features being used in a real-life scenario. ( I find it 
most useful for such screen casts to display key presses as they occur 
... is there a "plugin" which would 1) show the keys being pressed and 
2) also show the resulting functions being invoked by those keystrokes? 
). Repeatedly I've spent more than an hour trying to figure out what 
happened when I haven't noticed that by mistake that I've pressed some 
weird key combo which has placed my orgmode/emacs session in an 
incomprehensible state - e.g. narrowing a buffer. Had I known which keys 
I had pressed by mistake, or at least the functions that they involved, 
I could have looked up the manual to see how to "undo" such mess. But 
when you don't know that your state is being called "narrowing buffer", 
you have no clue what just happened and that you should find out how to 
"widen" it again. ( That is very, VERY frustrating for an emacs/orgmode 
newbie. Someone please advise how to turn on a log of keystrokes and 
functions being invoked by those keystrokes. ... Consider having this on 
as default for newbies. )


 It seems to me that to get people started without unnecessary 
frustrations, we might want to put into the docs something like:


To include feature : timestamp-based unique IDs : Configure emacs thusly 
: insertion> and then see how this works ; ...  same for 
features like  HTML export, literal programming, custom timestamp 
(perhaps with down-to-seconds resolution) custom, etc


 I believe if I saw in a few screen casts how the orgmode 
"professionals" use orgmode, and had access to their sample orgmode 
files which I could follow along and literally identically modify during 
the screencast, I would be much father (and perhaps even happier) with 
the use of orgmode. I think the most crucial point for newbies is being 
able to literally follow the screencast along, perfectly replicating the 
screen cast results in their emacs / evil / spacemacs setup.


If people would want to send me URLs for their sample .org files for 
which they also have a demo screen cast on how to use their features, I 
would like to pull these together and create a section for the docs with 
these.


 Guys! You are a wonderful bunch and you are perfecting an amazing 
software! ... Let the world get more of a taste of your amazing work.


  Thanks so much for orgmode!

    John





a catastrophic orgmode issue - a definite show stopper, put on your tin hats

2020-09-06 Thread hj-orgmode-1

=== The alien abduction of Bastien ===

Just in:

The relentless activity - plethora of unstoppable emails - on the 
orgmode mailing list under the name "Bastien" is a clear proof that the 
impostor doesn't sleep and that it doesn't eat. It's a robot that just 
hammers and hammers at the keyboard. The only logical conclusion is that 
our Bastien has been abducted by aliens.


 Aliens! Beware! ... We will be looking for Bastien. Give us back our 
Bastien, or you will have a war on your hands!


 Until we find him, we'll enjoy all that this robot has got going ...

 - 23 -




Re: Shower thought: submit an IETF RFC to register Org as a MIME type

2020-09-17 Thread hj-orgmode-1



 I do not have much insight into all the possible outcomes (i.e. I am 
clueless about such outcomes) except one outcome - orgmode MIME type 
gets registered.  I think it would serve well the proliferation and 
popularization of org-mode. I.e. I do not see any negatives, only 
positives. After successful registration, I don't think anyone would 
really complain that their "Lotus Organiser" or organ audio samples do 
not get processed as usual.


 AFAIC, push this.

 H J

On 9/17/20 9:09 AM, TEC wrote:

I'm still hoping for that discussion :P

To the Org community, if you have thoughts on this - please share them
:)

Timothy.

Me earlier:

Bastien  writes:

Let's discuss this with care, and consider all possible outcomes.

This is /exactly/ what I was hoping to prompt with this email.
I think it would be a nice idea (assuming feasibility), but it's
certainly not something to rush.




typos in doc.org

2020-11-12 Thread hj-orgmode-1



https://www.orgmode.org/worg/sources/doc.org :

availables -> available ,  uesr -> user :

24c24
<  over availables options will open the custom interface, which
---
>  over available options will open the custom interface, which
27c27
< These are the main "internals" that the uesr may want to know about,
---
> These are the main "internals" that the user may want to know about,




advanced search for patterns

2021-01-04 Thread hj-orgmode-1
hello, I have been using orgmode for a while , and noticed that I can 
find headings based on tags, but I haven't figured out whether there is 
a way to say in emacs org-mode :


  find me all the (lowest-level) headings [ or heading-paths ] that 
contains text (whether formatted as source code blocks or whatever) that 
matches, say three, (regexp) patterns, e.g. :


   (M|m)artha
   ((buy|bought)[^\n]*milk(s?))
   (pay|paid|USD)

 How would one ask org-mode to find all such headings (in all opened 
org-mode buffers , preferably :) )


 I guess one could try to connect the three regexps with something like 
a negative-lookahead "does not contain '\n\*'" string, like


   (M|m)artha (:!\n\*){0}   ((buy|bought)[^\n]*milk(s?)) (:!\n\*){0}   
(pay|paid|USD)  |  \
   (pay|paid|USD)  (:!\n\*){0} (M|m)artha (:!\n\*){0} 
((buy|bought)[^\n]*milk(s?))    |  \
   ((buy|bought)[^\n]*milk(s?))  (:!\n\*){0}   (M|m)artha (:!\n\*){0}   
(pay|paid|USD)  |  \
   (pay|paid|USD)  (:!\n\*){0} (M|m)artha (:!\n\*){0} 
((buy|bought)[^\n]*milk(s?))    |  \

    ...

 but that's just ugly. And would it work at all? Would it not be so 
slow to make it impractical?


  Or is there a way to say "search all headings for pattern1" in all 
files, then filter the results by pattern2, then filter the results by 
pattern3 ?? How? Someone surely must have done this before ...



   thx!!

    HJ




[O] Inject value of macro into code using a variable

2019-10-15 Thread wlharvey4 via Emacs-orgmode
Is it possible to inject the value of a macro into code using a variable?

I set a macro called ‘version’ with a version number at the top of my .org 
file.  I would like to do something like this:

#+macro:version Version 0.2.5

#+name:code-name
#+begin_src js :tangle some-file.js :var ver={{{version}}} :exports both 
:results output
const version = ver;
#+end_src

When this code is evaluated during export, there is an error:

org-babel-ref-resolve: Reference ‘{{{version}}}’ not found in this buffer

Regards,
Wesley




[O] Bug: `#+OPTIONS: <:nil' has no effect when exporting to LaTeX [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-08-13 Thread Jakob Rosenblattl via Emacs-orgmode
When I export to LaTeX, the created LaTeX file contains \date{\today}.
However, I don't want it to show the date.  Using #+OPTIONS: date:nil
the LaTeX result will contain \date{} instead, which indeed hides the
date, but now there's empty space in place of the date when compiled to
a PDF document, which is undesirable.  As per the manual the argument <
to the OPTIONS keyword is supposed to "[t]oggle inclusion of time/date
active/inactive stamps (org-export-with-timestamps)".  Putting
#+OPTIONS: <:nil, however, has no effect at all; \date{\today} will
still end up in the LaTeX export.

Do I misunderstand the meaning of the argument 

[O] bug: org-table-convert-region-max-lines causes a "Code block produced nop output"

2019-08-20 Thread Charles Millar via Emacs-orgmode
In an org file I have a source code block to convert entries into and 
generate a recutils file


#+begin_src sh?? :file SomeFile.rec
cat << EOF
# -*- mode: rec -*-

 Begin recutils file

Approximately 770 records in recutils format each with about 20 entries; 
over 17,000 lines including line feeds or carriage returns


#+end_src

The following error is produced:

Starting new Ispell process /usr/bin/aspell with en_US dictionary...
executing Sh code block...
Wrote /tmp/babel-k8j93s/ob-input-LL2cYo
Error reading results: (user-error Region is longer than 
???org-table-convert-region-max-lines??? (999) lines; not converting)

Code block produced no output.

I admit that I have not evaluated this code block since last October.At 
that time the SomeFile.rec file was produced, as expected. However, the 
size of the entries has not changed and now the above error results.


I modified my init.el file to include

(setq org-table-convert-region-max-lines 2)

closed emacs, etc. (load-file init.el did not change the default 999 to 
2)


When I C-c C-c'ed the code block again the process hung. I confirmed 
that org-table-convert-region-max-lines was set to 2.


Is org-table-convert-region-max-lines?? supposed to be invoked and if so 
what should I modify?


Version information

Org mode version 9.2.5 (release_9.2.5-488-g9ddba9 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-20


Charlie Millar





Re: [O] bug: org-table-convert-region-max-lines causes a "Code block produced nop output"

2019-08-20 Thread Charles Millar via Emacs-orgmode

A follow up

On 8/20/19 9:32 AM, Charles Millar via Emacs-orgmode wrote:
In an org file I have a source code block to convert entries into and 
generate a recutils file


#+begin_src sh?? :file SomeFile.rec
cat << EOF
# -*- mode: rec -*-

 Begin recutils file

Approximately 770 records in recutils format each with about 20 
entries; over 17,000 lines including line feeds or carriage returns


#+end_src

The following error is produced:

Starting new Ispell process /usr/bin/aspell with en_US dictionary...
executing Sh code block...
Wrote /tmp/babel-k8j93s/ob-input-LL2cYo
Error reading results: (user-error Region is longer than 
???org-table-convert-region-max-lines??? (999) lines; not converting)

Code block produced no output.

I admit that I have not evaluated this code block since last 
October.At that time the SomeFile.rec file was produced, as expected. 
However, the size of the entries has not changed and now the above 
error results.


I modified my init.el file to include

(setq org-table-convert-region-max-lines 2)

closed emacs, etc. (load-file init.el did not change the default 999 
to 2)


When I C-c C-c'ed the code block again the process hung. I confirmed 
that org-table-convert-region-max-lines was set to 2.


Is org-table-convert-region-max-lines?? supposed to be invoked and if 
so what should I modify?


Version information

Org mode version 9.2.5 (release_9.2.5-488-g9ddba9 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 
3.24.10) of 2019-08-20


Charlie Millar

It appears that the above now creates a table, not a recutils file. 
Spaces are the delimiter,



#+begin_src sh?? :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

#+RESULTS:
| #?? | -*-?? | mode: | rec?? | -*- |
| %rec:?? | somerecord | |?? | |
| Account: | sometyhing | |?? | |
| Amount:?? | 0.0?? | |?? | |
|  | end?? | of?? | file | |




[O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-22 Thread Charles Millar via Emacs-orgmode
Org mode version 9.2.5 (release_9.2.5-494-g4848b8 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 59, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-22


ECM

#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

I expect that when I execute the above code block that

1. An external file test.rec is produced with contents

# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file

 and

2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created

#+RESULTS:
| # |   -*- | mode: | rec | -*- |
| %rec: | somerecord | | | |
| Account: | sometyhing | | | |
| Amount: | 0.0 | | | |
|  | end | of | file | |

I reported this earlier but my subject line was not correct.

Charlie Millar



Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-23 Thread Charles Millar via Emacs-orgmode

On 8/23/19 4:15 AM, Nicolas Goaziou wrote:

Hello,

Charles Millar via Emacs-orgmode  writes:


#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

I expect that when I execute the above code block that

1. An external file test.rec is produced with contents

# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file

   and

2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created


You probably need to specify that the output is a file, which is not the
default for "sh" language. You may want to add ":results file" to the
header of the source block.

Regards,


Thank you, Nicolas. That solved it.

Now a "just curious," comment and question:

I had a few files that used the ECM source code block, just many more 
entries in each. The last time that I evaluated any of them was last 
October and it produced the results I expected, i.e. I did not specify 
":results file"


So, up until October was I just lucky or did something change in Org 
that affected the sh language?


Regards,

Charlie Millar






Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-24 Thread Charles Millar via Emacs-orgmode



Nicolas Goaziou  writes:



It changed between Org 9.2 and Org 9.3, for every language. There is an
ORG-NEWS entry about it, namely:

  *** ~:file~ header argument no longer assume "file" ~:results~



Thank you. I read that entry and others concerning ;file prior to
posting and it did not penetrate my thick skull.

Regards,



[O] add names to org-babel-header-arg-names

2019-09-06 Thread Charles Millar via Emacs-orgmode



Hi,

To avoid errors while running org-lint in an org file with many recutils
source blocks I have added the following to my init.el file

(setq recutils-babel-header-arg-names '(data type fields join sort groupby))
  ;; cmdline already included in org-babel-header-arg-names so not part 
of above list
(setq org-babel-header-arg-names (concatenate 'list 
org-babel-header-arg-names recutils-babel-header-arg-names))


It appears that there are no problems, Never the less,

Is there a "better" way? For that matter, is there a safer way?

Charlie Millar