-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb-shell.el
More file actions
95 lines (79 loc) · 4.49 KB
/
b-shell.el
File metadata and controls
95 lines (79 loc) · 4.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
;;; b-shell.el --- b:shell facilities -*- lexical-binding: t; -*-
(orgCmntBegin "
* Summary: Additional facilities to manipulate (read, write) files.
" orgCmntEnd)
;;;#+BEGIN: b:elisp:file/copyLeftPlus :outLevel 1
(orgCmntBegin "
* Libre-Halaal Software --- Part Of Blee --- Poly-COMEEGA Format.
** This is Libre-Halaal Software. © Libre-Halaal Foundation. Subject to AGPL.
** It is not part of Emacs. It is part of Blee.
** Best read and edited with Poly-COMEEGA (Polymode Colaborative Org-Mode Enhance Emacs Generalized Authorship)
" orgCmntEnd)
;;;#+END:
;;;#+BEGIN: b:elisp:file/authors :authors ("./inserts/authors-mb.org")
(orgCmntBegin "
* Authors: Mohsen BANAN, http://mohsen.banan.1.byname.net/contact
" orgCmntEnd)
;;;#+END:
;;;#+BEGIN: b:elisp:file/orgTopControls :outLevel 1
(orgCmntBegin "
* [[elisp:(org-cycle)][|/Controls/| ]] :: [[elisp:(org-show-subtree)][|=]] [[elisp:(show-all)][Show-All]] [[elisp:(org-shifttab)][Overview]] [[elisp:(progn (org-shifttab) (org-content))][Content]] | [[file:Panel.org][Panel]] | [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] | [[elisp:(bx:org:run-me)][Run]] | [[elisp:(bx:org:run-me-eml)][RunEml]] | [[elisp:(delete-other-windows)][(1)]] | [[elisp:(progn (save-buffer) (kill-buffer))][S&Q]] [[elisp:(save-buffer)][Save]] [[elisp:(kill-buffer)][Quit]] [[elisp:(org-cycle)][| ]]
** /Version Control/ :: [[elisp:(call-interactively (quote cvs-update))][cvs-update]] [[elisp:(vc-update)][vc-update]] | [[elisp:(bx:org:agenda:this-file-otherWin)][Agenda-List]] [[elisp:(bx:org:todo:this-file-otherWin)][ToDo-List]]
" orgCmntEnd)
;;;#+END:
(orgCmntBegin "
* Relevant Panels:
** [[file:/bisos/git/auth/bxRepos/blee-binders/blee-core/blee-pkgs/blee-libs/_nodeBase_/fullUsagePanel-en.org]]
* Planned Improvements:
" orgCmntEnd)
;;;#+BEGIN: blee:bxPanel:foldingSection :outLevel 0 :title "REQUIRES" :extraInfo "Imports"
(orgCmntBegin "
* _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* [[elisp:(outline-show-subtree+toggle)][| _REQUIRES_: |]] Imports [[elisp:(org-shifttab)][<)]] E|
" orgCmntEnd)
;;;#+END:
;;;#+BEGIN: blee:bxPanel:foldingSection :outLevel 1 :title "Variables And Constants" :extraInfo "defvar, defcustom"
(orgCmntBegin "
* _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* [[elisp:(outline-show-subtree+toggle)][| *Variables And Constants:* |]] defvar, defcustom [[elisp:(org-shifttab)][<)]] E|
" orgCmntEnd)
;;;#+END:
;;;#+BEGIN: blee:bxPanel:foldingSection :outLevel 0 :title "Common Facilities" :extraInfo "Library Candidates"
(orgCmntBegin "
* _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* [[elisp:(outline-show-subtree+toggle)][| _Common Facilities_: |]] Library Candidates [[elisp:(org-shifttab)][<)]] E|
" orgCmntEnd)
;;;#+END:
;;;#+BEGIN: b:elisp:defs/defun :defName "b:shell-command-to-string|cleansed"
(orgCmntBegin "
* _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* defun [[elisp:(outline-show-subtree+toggle)][||]] <<b:shell-command-to-string|cleansed>> [[elisp:(org-cycle)][| ]]
" orgCmntEnd)
(defun b:shell-command-to-string|cleansed (
;;;#+END:
<inCmnd)
" #+begin_org
** DocStr: Strip the trailing \n
Previous unreliable implementation was:
(substring
(shell-command-to-string <inCmnd)
0 -1))
#+end_org "
(replace-regexp-in-string
"\n$" ""
(shell-command-to-string <inCmnd)))
(orgCmntBegin "
** Basic Usage:
#+BEGIN_SRC emacs-lisp
(b:shell-command-to-string|cleansed (symbol-name 'date))
#+END_SRC
#+RESULTS:
: Sat 26 Nov 2022 11:13:13 AM PST
" orgCmntEnd)
;;;#+BEGIN: b:elisp:file/provide :modName nil
(provide 'b-shell)
;;;#+END:
;;;#+BEGIN: b:elisp:file/endOf :outLevel 1
(orgCmntBegin "
* [[elisp:(show-all)][(>]] ~END-OF-FILE~ [[elisp:(org-shifttab)][<)]] E|
" orgCmntEnd)
;;; local variables:
;;; no-byte-compile: t
;;; end:
;;;#+END: