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




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,




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.




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 -




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





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.





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 

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)