How to create a template file for org-capture in Spacemacs? - org-mode

I use a template file to capture a list of books. However last night, after wipe my old installation of spacemacs, when i try to capture a new book, it was impossible. I saw in capture buffer "Invalide Capture Template"
My org-capture-templates configuration is:
(setq org-capture-templates
'(("r" ; touche pour rentrer une référence
"Réference livre" ; on indique que l'on rentre la référence du livre
entry (file+datetree+prompt "~/git/org/Liste_Livres.org") ; On sauve la référence dans le fichier associé.
file "~/git/org/tpl-Liste-Livres.org" ) ; on utilise le template associé au fichier
("l" ; touche pour ajouter une entrée du lycée
"Journal Lycée" ; on indique que l'on rentre la référence du livre
entry (file+datetree "~/git/org/Journal_Lycee.org" ) ; On sauve l'entrée du journal dans le fichier associé.
"* %? %^g") ; on utilise le template pour la note à ajouter
("n" ; touche pour ajouter une note
"Notes" ; on indique que l'on rentre la référence du livre
entry (file "~/git/org/Notes.org" ) ; On sauve la note dans le fichier associé.
"* %? %t %^g \n :PROPERTIES:\n :LIEN: %i %a \n :END:") ; on utilise le template pour la note à ajouter
)
)
My tpl-Liste-Livres.org is:
* Titre :tags:
:PROPERTIES:
:Titre:
:Auteur:
:Pages:
:Editeur:
:Type:
:Sujet:
:Résumé:
:Prets:
:Lien:
:Lu:
:Acheté:
:ISBN:
:END:
I use emacs 25.1.1 from debian stable and spacemacs 0.300 develop

It looks like your targets are out of date with the newest version of org-mode. file+datetree is deprecated, and has been replaced with file+olp+datetree with some new properties to control the datetree type and prompt options. Current templates are documented here
(Note also that your reference book target file+datetree+prompt is also out of date, and would need to be replaced with the file+olp+datetree target, and the new :time-prompt property.)

Related

Créer une hiérarchie dans un filtre sous Tableau [closed]

Closed. This question is not written in English. It is not currently accepting answers.
Stack Overflow is an English-only site. The author must be able to communicate in English to understand and engage with any comments and/or answers their question receives. Don't translate this post for the author; machine translations can be inaccurate, and even human translations can alter the intended meaning of the post.
Closed 6 days ago.
Improve this question
Bonjour,
J'aimerais pouvoir créer dans un filtre des regroupements que je pourrais développer ou réduire sur le même principe qu'une hiérarchie.
Par exemple : dans une colonne VEGE, j'ai la liste carottes, courgettes, celeri,banane, ananas, abricot...j'aimerais dans le filtre VEGE pouvoir regrouper carottes, courgettes et celeri sous légumes et le reste sous fruits avec la possibilité de déployer les groupes dans le filtre.
j'ai tenté une hiérarchie mais je n'arrive pas à la en filtre et ce n'est finalement pas le résultat attendu, j'ai continué sur la piste avec la création d'ensemble mais je fais chou blanc.
Merci pour votre aide

ERROR 117 on nvim when i press "tab" in insert mode

I'm installing some plugins and mapping some shortcuts on my init.vim file, the thing is that when I press the "tab" button on my keyboard in insert mode the program shows me this, in insert mode the tab doesn't work but in normal mode tab works correctly, I'm new using this text editor and I have no idea on how to solve this.
this is my init.vim script
":::instalacion de plugins:::
call plug#begin('~/.config/nvim/plugged') "directorio donde se van a instalar los plugins
"plugins
Plug 'joshdick/onedark.vim' "tema
Plug 'Yggdroot/indentLine' "indentacion
Plug 'mattn/emmet-vim' "emmet para diseño web
Plug 'vim-airline/vim-airline' "diseño de la barra en la cual se muestran los modos, la linea, etc.
Plug 'vim-airline/vim-airline-themes' "temas para el vim-airline
Plug 'preservim/nerdtree' "gestor de archivos en forma de arbol.
Plug 'christoomey/vim-tmux-navigator' "poder navegar entre archivos abiertos
Plug 'jiangmiao/auto-pairs' "autocompletado de llaves, corchetes, etc.
Plug 'neoclide/coc.nvim', {'branch': 'release'} "autocompletado inteligente
call plug#end() "cerramos el llamado de los plugins
"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"CONFIGURACIONES BASICAS
set number "muestra los numeros de cada linea en la parte izquierda
set relativenumber "la distribucion de los numeros en lineas de manera relativa
set mouse=a "permite la interaccion con el mouse
set noshowmode "me deja de mostrar el modo en el que estamos 'normal, insert, visual, etc'
syntax enable "activa el coloreado de sintaxis en algunos tipos de archivos como html, c, c++
set encoding=utf-8 "permite setear la codificación de archivos para aceptar caracteres especiales
set sw=4 "la indentación genera 4 espacios
set nowrap "el texto en una linea no baja a la siguiente, solo continua en la misma hasta el infinito.
"set noswapfile "para evitar el mensaje que sale al abrir algunos archivos sobre swap.
set clipboard=unnamed "para poder utilizar el portapapeles del sistema operativo 'esto permite poder copiar y pegar desde cualquier parte a nvim y viceversa.
"configuracion del tema
set termguicolors "activa el true color en la terminal
colorscheme onedark "activar el tema onedark
"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"configuracion de emmet-vim
let mapleader=' '
let g:user_emmet_leader_key=',' "mapeando la tecla lider por una coma, con esto se completa los tag con doble coma.
nmap <Leader>w :w<CR>
nmap <Leader>q :q<CR>
"configuracion de vim-airline
let g:airline#extensions#tabline#enabled = 1 "muestra la linea de pestaña en la que estamos buffer
let g:airline#extensions#tabline#formatter = 'unique_tail' "muestra solo el nombre del archivo que estamos modificando
let g:airline_theme='onedark' "el tema de airline
"configuracion de nerdtree
"mapeando el abrir y cerrar de nerdtree con nerdtreetoggle vemos los archivos en el arbol y podemos cerrarlo a la vez, map es la C mayuscula representa el
"control y -n la tecla n lo que indica que realizará la siguiente funcion de excribir el comando NERDTreeToggle y CR significa ENTER.
map <C-n> :NERDTreeToggle<CR>
"configuracion por defecto de coc
" TextEdit might fail if hidden is not set.
set hidden
" Some servers have issues with backup files, see #649.
set nobackup
set nowritebackup
" Give more space for displaying messages.
set cmdheight=2
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Don't pass messages to |ins-completion-menu|.
set shortmess+=c
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
if has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
" Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-#> coc#refresh()
endif
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
" Note coc#float#scroll works on neovim >= 0.4.0 or vim >= 8.2.0750
nnoremap <nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
" NeoVim-only mapping for visual mode scroll
" Useful on signatureHelp after jump placeholder of snippet expansion
if has('nvim')
vnoremap <nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#nvim_scroll(1, 1) : "\<C-f>"
vnoremap <nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#nvim_scroll(0, 1) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
i was trying to install some plugins and also mapping some new shortcuts

Use of wildcards in Microsoft word to selected text or numbers between round brackets or before a dot

Hi I am a complete novice with Microsoft word wildcard function using ctrl h.
So I need some assistance in selecting all sequence text or numbers between round brackets or before a dot, (including the brackets and dots)
.
More specifically I need to select at once,
all sequence Art.227. -, Art.228. -... or
all sequence (1),(2),(3)... or
all sequence a),b),c) or
all sequence 1.,2.,3., or
all sequence (i),(ii),(iii),
which are bolded in the text, as in the following sample:
Art. 227. -
(1) Banca Naţională a României are competenţa de a aplica sancţiuni administrative, în cazurile în care constată că entităţile prevăzute la art. 223 alin. (1) şi/sau oricare dintre persoanele care exercită responsabilităţi de administrare şi/sau conducere a activităţii de prestare de servicii de plată în cadrul acestora se fac vinovate de următoarele fapte:
a) încălcarea prevederilor art. 150-165, art. 218-221, art. 248 alin. (3), a reglementărilor emise în aplicarea acestor articole, precum şi a actelor delegate adoptate de Comisia Europeană în materie de servicii de plată;
(i) respectarea imediată a clauzelor contractuale care au fost încălcate;
(ii) dispunerea încetării încasării, respectiv restituirea sumelor încasate fără temei legal, într-un termen de cel mult 15 zile calendaristice de la data luării la cunoştinţă a procesului-verbal de constatare a contravenţiei;
(iii) aducerea contractului sau tuturor contractelor, după caz, potrivit prevederilor legale, în termen de cel mult 15 zile calendaristice de la data luării la cunoştinţă a procesului-verbal de constatare a contravenţiei;
b) nerespectarea măsurilor administrative dispuse potrivit art. 223 alin. (2) lit. c).
1. acceptarea operaţiunilor de plată - serviciu de plată prin care un prestator de servicii de plată, în baza unui contract încheiat cu beneficiarul plăţii, acceptă şi prelucrează operaţiuni de plată în scopul transferării fondurilor către beneficiarul plăţii;
2. agent - persoană fizică sau juridică care furnizează servicii de plată în numele şi pe seama unei instituţii de plată sau unui furnizor specializat în servicii de informare cu privire la conturi;
3. autentificare - procedură care permite prestatorului de servicii de plată să verifice identitatea unui utilizator al serviciilor de plată sau valabilitatea utilizării unui anumit instrument de plată şi care include utilizarea elementelor de securitate personalizate ale utilizatorului;
(2) În cazurile prevăzute la alin. (1), Banca Naţională a României are competenţa de a aplica următoarele sancţiuni administrative:
a) avertisment scris;
b) amendă cuprinsă între 10.000 lei şi 100.000 lei, pentru faptele prevăzute la alin. (1) lit. a) şi b);
c) amendă până la de două ori valoarea profiturilor obţinute sau a pierderilor evitate de către persoana responsabilă, în măsura în care acestea pot fi determinate, aplicabilă prestatorilor de servicii de plată;
d) suspendarea temporară a dreptului prestatorilor de servicii de plată de a presta servicii de plată până la remedierea situaţiei care a determinat suspendarea;
e) suspendarea dreptului de acces la sistemele de plăţi până la remedierea situaţiei care a determinat suspendarea.
(3) Sancţiunile administrative prevăzute la alin. (1) pot fi aplicate concomitent cu dispunerea de măsuri administrative potrivit art. 223 alin. (2) lit. c) sau independent de acestea.
(4) Amenzile încasate se fac venit la bugetul de stat.
(5) Aplicarea sancţiunilor administrative prevăzute la alin. (1) se prescrie în termen de 1 an de la data constatării faptei, dar nu mai mult de 3 ani de la data săvârşirii acesteia.
Art. 228. -
(1) Constatarea faptelor prevăzute la art. 227 alin. (1) se realizează de către reprezentanţi împuterniciţi ai Băncii Naţionale a României pe baza raportărilor făcute potrivit legii ori reglementărilor emise în aplicarea acesteia sau actelor delegate adoptate de Comisia Europeană în materie de servicii de plată sau la solicitarea expresă a Băncii Naţionale a României ori în cursul verificărilor desfăşurate la sediul profesional sau real al entităţilor prevăzute la art. 223 alin. (1) sau la locaţiile acestora ori la sediile/locaţiile furnizorilor externi în cazul externalizării activităţilor, după caz.
(2) Actele prin care sunt aplicate sancţiuni administrative şi sunt dispuse măsuri administrative potrivit prevederilor art. 227 şi reglementărilor emise în aplicarea acestora se emit de către guvernatorul, prim-viceguvernatorul sau viceguvernatorii Băncii Naţionale a României, conform reglementărilor interne, cu excepţia sancţiunilor administrative prevăzute la art. 227 alin. (2) lit. d) şi e), care sunt de competenţa Consiliului de administraţie al Băncii Naţionale a României.
(3) Actele prevăzute la alin. (2) trebuie să cuprindă cel puţin elementele de identificare ale persoanei vinovate, descrierea faptei şi a circumstanţelor efectuării acesteia şi temeiul de drept al dispunerii măsurii administrative sau, după caz, al aplicării sancţiunii administrative.
If this is not possible in word, can you help me with regex expressions in notepad++?
Thank you
If I have understood you well ? Use below code in notepad++ regular expression mode ....
Find:^\(?\w+[.)].*$
Replace with: leave it empty or your desired typing
Update ^\(?(\w{1,3})[.)].*$ is a bit more safe

Get parameter of a specific Simulink Block and compare it, Matlab

I'm parsing a text file with matlab which looks like this :
[Date]
2019-03-27 10:45:10.167618
[Component]
Component_Name : Manager principal
Component_ID : _ocl_MEu9Eemg_bhrv2HEbw
{Port}
Port_Name : FOP 1
Port_ID : _sZMXoEu9Eemg_bhrv2HEbw
Port_Type : Outgoing Port
[Component]
Component_Name : Manager 2
Component_ID : _r-HlMEu9Eemg_bhrv2HEbw
{Port}
Port_Name : FIP 1
Port_ID : _sZWIoku9Eemg_bhrv2HEbw
Port_Type : Incoming Port
[Link]
Link_Name : On/Off
Link_ID : _sZfSkku9Eemg_bhrv2HEbw
Link_Source_Name : Manager principal
Link_Source_ID : _ocl_MEu9Eemg_bhrv2HEbw
Link_Source_Port_Name : FOP 1
Link_Source_Port_ID : _sZMXoEu9Eemg_bhrv2HEbw
Link_Target_Name : Manager 2
Link_Target_ID : _r-HlMEu9Eemg_bhrv2HEbw
Link_Target_Port_Name : FIP 1
Link_Target_Port_ID : _sZWIoku9Eemg_bhrv2HEbw
I create a systeme for each [Component] i find and in each systems i create an input or output if the [Component] is a Source or a Target of a [Link].
In my text file example : On/Off is a link between 'Manager principal' and 'Manager 2'. So in the first System (Manager principal) i have an output called On/Off with a specific tag in tag description i set and in the second system (Manager 2) an input called On/Off with a specific tag in the Block tag i set.
So when i launch my code i have 2 system with 1 block in each system.
In this 2 blocks, if it's about the same link (in this example it is) we have this tag :
#_sZMXoEu9Eemg_bhrv2HEbw ==> #_sZWIoku9Eemg_bhrv2HEbw
The ID of the source port ==> the ID of the target port
This is what distinguish a Link than an other.
The context is : if the user change only the name of the Link for example Off/On instead of On/Off it must not create a new block because it's the same Link. So i would like to make a findBlocks() and for each blocks in the current system, i would like to do : if both ID's in tag description are same than in the text file so we just update the name of the block for example .
Here is the code where i create my blocks :
Update : I success to recover C which is the string inside Block tag.
B = find_system(sprintf('%s', component_NameValue));
C = get_param(find_system(sprintf('%s/%s', component_NameValue, link_NameValue)), 'Tag');
if (compareOut == 1) && (compareSource == 1) % Si c'est un port sortant et que c'est le port source du link
add_block('simulink/Ports & Subsystems/In1',[component_NameValue '/' link_NameValue]); % alors on ajoute un block Output de même nom que le link dans le système du composant que l'on parse
linkDescription = sprintf('Link : \n\n%s ==> %s \n\nComposant : \n\nDe : %s (%s) \nVers : %s (%s) \n\nPort Source : \n\n%s \n%s \n\n', link_NameValue , link_IDValue , link_SourceNameValue , link_SourceIDValue, link_TargetNameValue , link_TargetIDValue, link_SourcePortNameValue, link_SourcePortIDValue);
linkTag = sprintf('#%s ==> #%s', link_SourcePortIDValue, link_TargetPortIDValue);
set_param(gcb, 'Tag', linkTag);
set_param(gcb,'Description',linkDescription); % On ajoute une description au block contenant les infos du lien en question contenus dans le fichier texte
end
if (compareIn == 1) && (compareTarget == 1) % Si c'est un port entrant et que c'est le port target du link
add_block('simulink/Ports & Subsystems/Out1',[component_NameValue '/' link_NameValue]); % alors on ajoute un block Input de même nom que le link dans le système du composant que l'on parse
linkDescription = sprintf('Link : \n\n%s ==> %s \n\nComposant : \n\nDe : %s (%s) \nVers : %s (%s) \n\nPort Target : \n\n%s \n#%s', link_NameValue , link_IDValue , link_SourceNameValue , link_SourceIDValue, link_TargetNameValue , link_TargetIDValue,link_TargetPortNameValue, link_TargetPortIDValue);
linkTag = sprintf('#%s ==> #%s', link_SourcePortIDValue, link_TargetPortIDValue); %On ajoute un # devant l'ID du port pour pouvoir le retrouver et voir si un port à été modifié/rajouté/supprimé
set_param(gcb, 'Tag', linkTag);
set_param(gcb,'Description',linkDescription); % On ajoute une description au block contenant les infos du lien en question contenus dans le fichier texte
end
Thanks for helping in advance

Libreoffice command line crashes opening DOCX or converting to PDF, on Windows 7

Need to convert DOCX document to PDF using LibreOffice in command line mode. But it crashes:
soffice.exe -headless -invisible -convert-to pdf myfile.docx
It also crashes when trying to open the same document:
soffice.exe -o myfile.docx
However, it opens the file perfectly when opening LibreOffice from the Start menu.
Here are Windows 7 (32-bit) error details (in Spanish, no translation yet):
Firma con problemas:
Nombre del evento de problema: APPCRASH
Nombre de la aplicación: soffice.bin
Versión de la aplicación: 4.3.2.2
Marca de tiempo de la aplicación: 541af548
Nombre del módulo con errores: MSVCR110.dll
Versión del módulo con errores: 11.0.51106.1
Marca de tiempo del módulo con errores: 5098858e
Código de excepción: 40000015
Desplazamiento de excepción: 000a327c
Versión del sistema operativo: 6.1.7601.2.1.0.256.1
Id. de configuración regional: 3082
Información adicional 1: da3c
Información adicional 2: da3c0e7aedc374a773565a4a8dfc0c7a
Información adicional 3: 7958
Información adicional 4: 795815baca3b4b1817fdd25f3f5f80de
It's a confirmed bug for LibreOffice 4.3.x on Windows
see:
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=85777
And it can be workaround by
start /wait "lo" "C:\Program Files (x86)\LibreOffice 4\program\soffice" C:\a.ods