Re: Help: How to change faces of words between parenthesis

2024-02-24 Thread Kepa

Thanks, William

I'm not writing citation. I am studying a text, and it has citations. To 
delete them all, generates friction, while to let them all be, generates 
distraction. So with the help of Ihor (and chatgpt) I have added this 
code to my init file, so they are shadowed:


(defun yant/apply-custom-faces ()
  (add-to-list 'org-font-lock-extra-keywords 
'("(\\([A-Z][a-zA-Z]*[^)]*[0-9]\\{4\\}[^)]*\\))" . (0 'shadow prepend)) 
'append))

(add-hook 'org-font-lock-set-keywords-hook #'yant/apply-custom-faces)


About citations: A time ago I learned to use org-ref, but my PC is not 
very powerful, so Emacs turned to be too slow. Then I stopped working 
with citations.


By now I am adding bibtex properties to my headlines, so in the future I 
can use org-bibtex and probably I will learn about citation with your 
tutorials: https://www.miskatonic.org/2024/01/08/org-citations-basic/


Best regards


On 14/02/2024 0:33, William Denton wrote:

On Sunday, February 11th, 2024 at 08:57, Ypo  wrote:


Could it be possible to change the color of words between parentheses?

For example, in:

"mejorar su bienestar psicológico (Cronin et al., 2012; Molero, Fuster, Jetten y 
Moriano, 2011; Outten, Schmitt, García y Branscombe, 2009; Pérez-Garín et al., 
2016)."

For citations in brackets, another approach might be to use Org's citation 
system with the CSL export processor, and then use András Simonyi's 
org-cite-csl-activate and customize the face:

https://github.com/andras-simonyi/org-cite-csl-activate

That might involve changing your whole citation process, which is a big step, 
but citations are on my mind so I thought I'd mention it.

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada





Best regards

Org-attach risks

2024-03-14 Thread Kepa
Hi

Each time I change the DIR property for attachments, I have to answer correctly 
two questions: if I want to move every file to the new path, and if I want to 
delete the old folder.

Is it possible to not receive these questions?
For me, it's a big risk I don't want to take every time.

Best regards


Re: Org-attach risks

2024-03-17 Thread Kepa

Kepa  writes:

>/Each time I change the DIR property for attachments, I have to answer /
>/correctly two questions: if I want to move every file to the new 
path, and if /

>/I want to delete the old folder./
>
>/Is it possible to not receive these questions?/
>/For me, it's a big risk I don't want to take every time./

May you elaborate on what other behavior you would prefer to see?

--
Ihor Radchenko // yantar92,

Hi Ihor.

It would be enough to have the option to not having those prompt.

If I could set it to don't offer to copy files, and the option to don't 
offer to delete old folder, it would be enough.


Best regards,

Kepa




I can't make a custom face to take effect

2024-03-30 Thread Kepa

Hi

I have added a custom face, but it doesn't work unless I do "M-x 
org-mode-restart".


The custom face:

(defun yant/apply-custom-faces ()
  (add-to-list 'org-font-lock-extra-keywords 
'("(\\([^)]*?[A-Z]+[^)]+?[0-9]\\{3,4\\}[^)]*\\))" . (0 'shadow prepend)) 
'append))


(add-hook 'org-font-lock-set-keywords-hook #'yant/apply-custom-faces)

I have tried saving the desktop manually, but it doesn't take effect, I 
have to reload org-mode each session.


This is my desktop-save config:

 '(desktop-auto-save-timeout nil)
 '(desktop-base-file-name "emacs-desktop")
 '(desktop-file-name-format 'tilde)
 '(desktop-lazy-idle-delay 0)
 '(desktop-load-locked-desktop t)
 '(desktop-missing-file-warning nil)
 '(desktop-path '("~/.emacs.d/"))
 '(desktop-restore-eager t)
 '(desktop-restore-forces-onscreen 'all)
 '(desktop-save nil)

(setq desktop-restore-frames t)
(setq desktop-restore-in-current-display t)
(desktop-read)



[FR] Add customization for default answers to `org-attach-set/unset-directory' prompt (was: Org-attach risks)

2024-03-30 Thread Kepa

Hi Ihor



In addition to the sequence of prompts when changing the attachment
directory:

1. Copy over attachments from old attachment directory to new one?
2. Delete old attachment directory?

we can introduce a custom variable `org-attach-move-attachments' with
the following values:

1. 'ask (default) - display the prompts
2. 'move - move the attachments form old to new directory (same as yes,
yes answer)
3. 'copy - copy the attachments, keeping the old directory (yes, no answer)
4. 'keep or nil - keep the attachments in the old directory (no, no answer)

It would solve it. Thanks.


Re: I can't make a custom face to take effect

2024-03-30 Thread Kepa

You're right, I moved it near the top of my init file, and it works


Solved!

Thanks

On 30/03/2024 12:43, yantar92 at posteo.net wrote:

Kepa  writes:


I have added a custom face, but it doesn't work unless I do "M-x
org-mode-restart".

The custom face:

(defun yant/apply-custom-faces ()
    (add-to-list 'org-font-lock-extra-keywords
'("(\\([^)]*?[A-Z]+[^)]+?[0-9]\\{3,4\\}[^)]*\\))" . (0 'shadow prepend))
'append))

(add-hook 'org-font-lock-set-keywords-hook #'yant/apply-custom-faces)

I have tried saving the desktop manually, but it doesn't take effect, I
have to reload org-mode each session.

I suspect that the part of your config defining the hook is loaded too
late. Try to reproduce the problem starting from emacs -Q, as described
inhttps://orgmode.org/manual/Feedback.html#Feedback


Possible bug in sparse trees Todo keywords

2024-05-20 Thread Kepa
Sparse tree doesn't seem to work if the Todo states finishes with a dot. For 
example "PROJ."

Best regards


Error message after upgrading to devel version: const:tag

2024-05-25 Thread Kepa
Hi

After updating org-mode to org-9.7pre0.20240524.175607

I get this warning message:
■  Warning (emacs): Value 't' does not match type (choice (const :tag nofold: 
show all nofold) (const :tag fold: overview fold) (const :tag fold: show two 
levels show2levels) (const :tag fold: show three levels show3levels) (const 
:tag fold: show four levels show4evels) (const :tag fold: show five levels 
show5levels) (const :tag content: all headlines content) (const :tag show 
everything, even drawers showeverything))

Best regards



Possible bug: Adding a new item to a list "a)"

2024-06-01 Thread Kepa
I have a weird behavior when trying to add a new item to an ordered list.
Version: Org mode version 9.7-pre (release_N/A-N/A-a3c1a8502 @ 
c:/.../elpa/org-9.7pre0.20240524.175607/)

Instructions for the example:
Point: placed after "[...]" instead of "(point)".
Send: M-ENTER
Result: First line "a)..." is indented. 

Example:

* Error orgmode
a) /Estímulo único/. Consiste en
1) _entrenar varios grupos de sujetos para que un estímulo adquiera cierto 
control (convirtiéndolo en un E+ o en un E-)_
2) _y después exponer a cada grupo a un estímulo de prueba diferente, en 
cuanto a su parecido con el estímulo original._
[...] (point) cuanto mayor es el parecido de éste con el estímulo original 
mayor es la fuerza (probabilidad, tasa, intensidad, etc.) de la respuesta.

Behaviour:
* Error orgmode
a) /Estímulo único/. Consiste en
1) _entrenar varios grupos de sujetos para que un estímulo adquiera cierto 
control (convirtiéndolo en un E+ o en un E-)_
2) _y después exponer a cada grupo a un estímulo de prueba diferente, en 
cuanto a su parecido con el estímulo original._
[...]
b) c1) to mayor es el parecido de éste con el estímulo original mayor es la 
fuerza (probabilidad, tasa, intensidad, etc.) de la respuesta.

Expected behavior:

* Error orgmode
a) /Estímulo único/. Consiste en
1) _entrenar varios grupos de sujetos para que un estímulo adquiera cierto 
control (convirtiéndolo en un E+ o en un E-)_
2) _y después exponer a cada grupo a un estímulo de prueba diferente, en 
cuanto a su parecido con el estímulo original._
[...] 
b) cuanto mayor es el parecido de éste con el estímulo original mayor es la 
fuerza (probabilidad, tasa, intensidad, etc.) de la respuesta.

Behavior for my customized emacs; 
in emacs -q, after "a) ..." sending M-ENTER adds a new headline, instead of a 
new list item.


Best regards




Doubt about writing before PROPERTIES

2024-06-06 Thread Kepa
Hi

I would like to know if this "syntax" is ok or if I shouldn't write anything in 
the first line after a headline:

EXAMPLE 1:

** PROY CLIENT
DEADLINE: <2024-07-03 mi.> (26 weeks excluding week 52, ready)
:PROPERTIES:
:DIR:  c:/CLIENT
:END:
ETC
*** ETC


EXAMPLE 2:

** PROY CLIENT
DEADLINE: <2024-07-03 mi.>
(26 weeks excluding week 52, ready)
:PROPERTIES:
:DIR:  c:/CLIENT
:END:
ETC
*** ETC

Best regards


[BUG] org-appear error after uninstalled [9.8-pre (release_N/A-N/A-c426f4)

2024-07-15 Thread Kepa
Hi,

I have uninstalled org-appear several days ago, and I am constantly receiving 
this error:

Error in post-command-hook (org-appear--post-cmd): (wrong-type-argument 
number-or-marker-p nil)

I tried listing the hooks:
M-x describe-variable RET post-command-hook RET

But nothing related to org-appear appears there.

So, I ran these commands, getting a warning that advised me to inform the 
mailing list:
(require 'org-appear)
(add-hook 'post-command-hook 'org-appear--post-cmd)

Warning:
⛔ Warning (org-element): ‘org-element-at-point’ cannot be used in non-Org 
buffer # (lisp-interaction-mode)
⛔ Warning (org-element): org-element--cache: Org parser error in 
*scratch*::305. Resetting.
 The error was: (error "rx ‘**’ range error")
 Backtrace:
nil
 Please report this to Org mode mailing list (M-x org-submit-bug-report).

Emacs : GNU Emacs 29.3 (build 2, x86_64-w64-mingw32)
of 2024-03-24

Package: Org mode version 9.8-pre (release_N/A-N/A-c426f4 @ 
./.emacs.d/elpa/org-9.8pre0.20240603.143202/)

Best regards,


Issue opening files with accented words, using org-attach-open

2024-08-04 Thread Kepa
Hi

I'm encountering an issue when trying to open a file using org-attach-open from 
org-attach. The problem occurs when the file name, or file path, contain words 
with accents.
Windows OS sends me this error:
Error code: 0x80070002
The system cannot find the file specified.

I have not this problem using dired.

System:
Windows 11
Org mode version 9.8-pre (release_N/A-N/A-c426f4)
GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) from 2024-03-24

Best regards


Re: Issue opening files with accented words, using org-attach-open

2024-08-05 Thread Kepa
Hi

Accentuated characters are in the path and in the file name.

It seems windows can't find the file, because emacs sends the accentuated 
characters substituted.

As said before, this doesn't happen with Dired.

Kind regards

From: tomas at tuxteam.de 

To: emacs-orgmode at gnu.org 
CC: Kepa 
Date: 2024-08-05T04:33:28Z
Subject: Re: Issue opening files with accented words, using org-attach-open

> On Sun, Aug 04, 2024 at 08:37:32PM +, Kepa wrote:
>> Hi
>> 
>> I'm encountering an issue when trying to open a file using org-attach-open 
>> from org-attach. The problem occurs when the file name, or file path, 
>> contain words with accents.
>> Windows OS sends me this error:
>> Error code: 0x80070002
>> The system cannot find the file specified.
> 
> I can't help directly: trying to help to help: the accented characters are in
> the file name, not in the content?
> 
> Cheers


RE: Issue opening files with accented words, using org-attach-open

2024-08-05 Thread Kepa
Hi, Ihor

I get no error using " M-x debug-on-entry  org-open-file ".

If I use org-attach-open from the attach menu, I get this backtrace:

Debugger entered--entering a function:
* org-open-file("p:/170 Buzón/oq.pdf" nil)
  org-attach-open(nil)
  funcall-interactively(org-attach-open nil)
  command-execute(org-attach-open)
  org-attach()
  funcall-interactively(org-attach)
  command-execute(org-attach)


Although I've now noticed that the error only occurs when the file is on the 
local network. If it's on my hard drive, access works correctly. P: is a local 
network drive.

Best regards

-Original Message-
From: yantar92 at posteo.net  
Sent: Monday, August 5, 2024 8:53 PM
To: Kepa 
Cc: emacs-orgmode at gnu.org 
Subject: Re: Issue opening files with accented words, using org-attach-open

Kepa  writes:

> Hi
>
> I'm encountering an issue when trying to open a file using org-attach-open 
> from org-attach. The problem occurs when the file name, or file path, contain 
> words with accents.
> Windows OS sends me this error:
> Error code: 0x80070002
> The system cannot find the file specified.
>
> I have not this problem using dired.

What if you

1. Run M-x debug-on-entry  org-open-file  2. Try to open the file 3. 
Share the resulting backtrace 4. M-x cancel-debug-on-entry  
   (cleanup)

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>, or support my work 
at <https://liberapay.com/yantar92>





Re: Issue opening files with accented words, using org-attach-open

2024-08-05 Thread Kepa
Funny: the path was p:/170 Buzon/oq.pdf, where the "o" was accentuated: 
https://en.m.wikipedia.org/wiki/%C3%93

From: gnu.cognition...@slmails.com
To: yantar92 at posteo.net ; Kepa 

CC: emacs-orgmode at gnu.org 
Date: 2024-08-05T20:24:50Z
Subject: RE: Issue opening files with accented words, using org-attach-open

>  Don't forget to remove this section if you reply to this email 
> Email sent on behalf of alias gnu.cognition...@slmails.com using mailbox 
> alaskad...@outlook.com
> --
> Hi, Ihor
> 
> I get no error using " M-x debug-on-entry  org-open-file ".
> 
> If I use org-attach-open from the attach menu, I get this backtrace:
> 
> Debugger entered--entering a function:
> * org-open-file("p:/170 Buzn/oq.pdf" nil)
>   org-attach-open(nil)
>   funcall-interactively(org-attach-open nil)
>   command-execute(org-attach-open)
>   org-attach()
>   funcall-interactively(org-attach)
>   command-execute(org-attach)
> 
> 
> Although I've now noticed that the error only occurs when the file is on the 
> local network. If it's on my hard drive, access works correctly. P: is a 
> local network drive.
> 
> Best regards
> 
> -Original Message-
> From: yantar92 at posteo.net 
> Sent: Monday, August 5, 2024 8:53 PM
> To: Kepa 
> Cc: emacs-orgmode at gnu.org 
> 
> Subject: Re: Issue opening files with accented words, using org-attach-open
> 
> Kepa  writes:
> 
>> Hi
>> 
>> I'm encountering an issue when trying to open a file using org-attach-open 
>> from org-attach. The problem occurs when the file name, or file path, 
>> contain words with accents.
>> Windows OS sends me this error:
>> Error code: 0x80070002
>> The system cannot find the file specified.
>> 
>> I have not this problem using dired.
> 
> What if you
> 
> 1. Run M-x debug-on-entry  org-open-file  2. Try to open the file 
> 3. Share the resulting backtrace 4. M-x cancel-debug-on-entry  
>    (cleanup)
> 
> -- 
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>, or support my 
> work at <https://liberapay.com/yantar92>




RE: Issue opening files with accented words, using org-attach-open

2024-08-06 Thread Kepa
is non-nil, Emacs will visit the file.  With a 
double\nprefix argument, try to open outside of Emacs, in the application 
the\nsystem uses for this file type.\n\nWhen point is on a timestamp, open the 
agenda at the day\nspecified.\n\nWhen point is a footnote definition, move to 
the first reference\nfound.  If it is on a reference, move to the 
associated\ndefinition.\n\nWhen point is on a src-block of inline src-block, 
open its result.\n\nWhen point is on a citation, follow it.\n\nWhen point is on 
a headline, display a list of every link in the\nentry, so it is possible to 
pick one, or all, of them.  If point\nis on a tag, call `org-tags-view' 
instead.\n\nOn top of syntactically correct links, this function also tries\nto 
open links and timestamps in comments, node properties, and\nkeywords if point 
is on something looking like a timestamp or\na link." (interactive "P") 
#) nil)

  org-open-at-point(nil)

  funcall-interactively(org-open-at-point nil)

  call-interactively(org-open-at-point)





  #f(compiled-function (&optional indent arg interactive) "Goto next table row 
or insert a newline.\n\nCalls `org-table-next-row' or `newline', depending on 
context.\n\nWhen optional INDENT argument is non-nil, 
call\n`newline-and-indent' with ARG, otherwise call `newline' with ARG\nand 
INTERACTIVE.\n\nWhen `org-return-follows-link' is non-nil and point is on\na 
timestamp, a link or a citation, call `org-open-at-point'.\nHowever, it will 
not happen if point is in a table or on a \"dead\"\nobject (e.g., within a 
comment).  In these case, you need to use\n`org-open-at-point' directly." 
(interactive "i\nP\np") #)(nil nil 1)





  apply(#f(compiled-function (&optional indent arg interactive) "Goto next 
table row or insert a newline.\n\nCalls `org-table-next-row' or `newline', 
depending on context.\n\nWhen optional INDENT argument is non-nil, 
call\n`newline-and-indent' with ARG, otherwise call `newline' with ARG\nand 
INTERACTIVE.\n\nWhen `org-return-follows-link' is non-nil and point is on\na 
timestamp, a link or a citation, call `org-open-at-point'.\nHowever, it will 
not happen if point is in a table or on a \"dead\"\nobject (e.g., within a 
comment).  In these case, you need to use\n`org-open-at-point' directly." 
(interactive "i\nP\np") #) (nil nil 1))

  org-return(nil nil 1)

  funcall-interactively(org-return nil nil 1)





  command-execute(org-return)



[cid:image001.png@01DAE848.A4D542E0]



https://i.ibb.co/NynYwVB/Captura-de-pantalla-2024-08-06-213339.png



Best regards



-Original Message-
From: yantar92 at posteo.net 
Sent: Tuesday, August 6, 2024 7:23 PM
To: Kepa 
Cc: emacs-orgmode at gnu.org 
Subject: RE: Issue opening files with accented words, using org-attach-open



Kepa mailto:gnu.cognition...@slmails.com>> writes:



> I get no error using " M-x debug-on-entry  org-open-file ".

>

> If I use org-attach-open from the attach menu, I get this backtrace:

>

> Debugger entered--entering a function:

> * org-open-file("p:/170 Buzón/oq.pdf" nil)

>   org-attach-open(nil)

>   funcall-interactively(org-attach-open nil)

>   command-execute(org-attach-open)

>   org-attach()

>   funcall-interactively(org-attach)

>   command-execute(org-attach)

>

>

> Although I've now noticed that the error only occurs when the file is on the 
> local network. If it's on my hard drive, access works correctly. P: is a 
> local network drive.



Ok.

What about the same steps, but using

M-x debug-on-entry... w32-shell-execute ?



--

Ihor Radchenko // yantar92,

Org mode contributor,

Learn more about Org mode at <https://orgmode.org/>.

Support Org development at <https://liberapay.com/org-mode>, or support my work 
at <https://liberapay.com/yantar92>




RE: Issue opening files with accented words, using org-attach-open

2024-08-10 Thread Kepa
> -Original Message-
> From: yantar92 at posteo.net
> 
> Sent: Saturday, August 10, 2024 3:53 PM
> To: Kepa 
> Cc: emacs-orgmode at gnu.org  orgmode_at_gnu_org_kqcgk...@simplelogin.co>
> Subject: RE: Issue opening files with accented words, using org-attach-open
> 
> Kepa  writes:
> 
> > I get not output with w32-shell-execute,
> 
> Did you customize `org-file-apps'?
> 

THAT'S IT!
I had added:

(when (eq system-type 'windows-nt)
  (setq org-file-apps
'(("\\.\\(docx\\|doc\\)\\'" . (lambda (file link) (shell-command 
(concat "start \"\" \"" file "\""
  ("\\.\\(xlsx\\|xls\\)\\'" . (lambda (file link) (shell-command 
(concat "start \"\" \"" file "\""
  ("\\.\\(pdf\\)\\'" . (lambda (file link) (shell-command (concat 
"start \"\" \"" file "\""
  ("\\.\\(pptx\\|ppt\\)\\'" . (lambda (file link) (shell-command 
(concat "start \"\" \"" file "\""

  (auto-mode . emacs

After commenting those lines, I can open files with accentuated names through 
org-attach. 

What should I customize to open links with the default software of the OS?

Best regards


[SOLVED]: Issue opening files with accented words, using org-attach-open

2024-08-18 Thread Kepa
Thanks, Ihor.
That change worked.


(when (eq system-type 'windows-nt)
  (setq org-file-apps
'((\\.\\(docx\\|doc\\)\\' . system)
  (\\.\\(xlsx\\|xls\\)\\' . system)
  (\\.\\(pdf\\)\\' . system)
  (\\.\\(pptx\\|ppt\\)\\' . system)
  (auto-mode . emacs



Orgmode keybindings in Dired?

2024-08-22 Thread Kepa
Hi

I'm starting to use Dired and I like it.
I would like to know your opinion, fellow orgmode users about keybindings in 
Dired:
Is it worth modifying Dired's keybindings to match those of Org-mode? Could it 
have any side effect?
Any specific advice?

Has this configuration already been shared? I assume someone else must have 
thought of this before...

Best regards!


RE: Orgmode keybindings in Dired?

2024-08-23 Thread Kepa
Hi Marcin!
Below I shared some ideas

> -Original Message-
> From: mbork at mbork.pl
> 
> Sent: Friday, August 23, 2024 7:21 AM
> To: Kepa 
> Subject: Re: Orgmode keybindings in Dired?
> 
> On 2024-08-22, at 18:27, Kepa  wrote:
> 
> > Hi
> >
> > I'm starting to use Dired and I like it.
> > I would like to know your opinion, fellow orgmode users about keybindings
> in Dired:
> > Is it worth modifying Dired's keybindings to match those of Org-mode?
> Could it have any side effect?
> > Any specific advice?
> >
> > Has this configuration already been shared? I assume someone else must
> have thought of this before...
> 
> Which keybindings do you mean exactly?  Dired's keybindings are usually
> consistent with the rest of Emacs (and most of them predate Org mode, I
> believe), so one would need to be quite careful not to introduce any
> inconsistencies.

Examples:
w to (dired-do-rename), instead of R, like refile speedkey.
o to (browse-url-of-dired-file), instead of W, like org-open-at-point speedkey.
M-RET to (dired-create-directory), instead of +.
And maybe other org speedkeys.

Although I have found that using dired-subtree gives naturally this oportunity. 
Here some examples (I must change "u" keybinding, since it is used to unmark 
files, maybe I could use C-g to unmark files, could it be risky?


;; Bind 'TAB' to toggle subtree visibility (cycle through subdirectories)
(with-eval-after-load 'dired
  (define-key dired-mode-map (kbd "TAB") 'dired-subtree-cycle))

;; (org-speed-move-safe 'outline-up-heading) (similar to 'u' in Org-mode for 
dired-subtree-up)
(define-key dired-mode-map (kbd "u") 'dired-subtree-up)

 ;; Bind 's' to narrow the view to the current subdirectory
  (define-key dired-mode-map (kbd "s") 'dired-subtree-narrow)


> 
> Best,
> 
> --
> Marcin Borkowski
> https://mbork.pl
> https://crimsonelevendelightpetrichor.net/





M-RET ok, C-RET wrong?

2024-08-23 Thread Kepa
Hello,

I'm experiencing strange behavior when setting a keybinding.

C-RET keybinding does not work for me, and I have had to use C-, 
although M-RET does work:

This doesn't work:
(define-key dired-mode-map (kbd "C-RET") 'dired-w32explore)

I receive this message:
C- is undefined

This works, though:
(define-key dired-mode-map (kbd "C-") 'dired-w32explore)

This works too:
(define-key dired-mode-map (kbd "M-RET") 'dired-create-directory)

GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24

Best regards


[CLOSED] M-RET ok, C-RET wrong?

2024-08-23 Thread Kepa
Sorry, this message is not for this list.
I will share it with emacs help list.

Best regards


Re: Orgmode keybindings in Dired?

2024-08-24 Thread Kepa

From: Fraga, Eric
Subject: Re: Orgmode keybindings in Dired?
Date: Fri, 23 Aug 2024 12:51:32 +
User-agent: gnus (Emacs 31.0.50)

Response below/inline for email Kepa wrote:
> (original email sent 22 Aug 2024 at 18:27)
> I'm starting to use Dired and I like it.

dired is an excellent tool!

> I would like to know your opinion, fellow orgmode users about
> keybindings in Dired:
> Is it worth modifying Dired's keybindings to match those of Org-mode?

What exactly are you imagining?  org mode keybindings make sense within
an org file.  I'm not sure what you expect to do in a dired buffer that
would use org mode keybindings?

Having said that, I do use org-store-link (globally bound to C-c l) all
the time in dired buffers.

--
: Eric S Fraga, with org 9.7.10-5ebd97 in Emacs 31.0.50


By the way, Eric, thanks for your tip. I probably wouldn't found that 
org-store-link can be used in Dired. Combined with org-super-links and 
org-open-at-point, it makes it joyful.


You asked about what was I imagining, so I will share the configuration 
I have finished with (by now).


My imagination goes beyond, though, like using "r" and "l" to "move" 
subdirectories one level down or up. Although maybe I would never use 
it. As said, the keybindings I am using in Dired, inspired many of them 
by org-mode keybindings:


;; Bind 'TAB' to toggle subtree visibility (cycle through subdirectories)
(with-eval-after-load 'dired
  (define-key dired-mode-map (kbd "TAB") 'dired-subtree-cycle))

;; Create a new directory (similar to 'M-RET' in Org-mode)
  ;; Existing Dired keybinding: '+' is used for 'dired-create-directory'
  ;; New keybinding: 'M-RET'
(define-key dired-mode-map (kbd "M-RET") 'dired-create-directory)

;; (org-speed-move-safe 'outline-up-heading) (similar to 'u' in Org-mode 
for dired-subtree-up)

  ;; Existing Dired keybinding: 'u' for dired-unmark
(define-key dired-mode-map (kbd "u") 'dired-subtree-up)

 ;; Bind 's' to narrow the view to the current subdirectory
(define-key dired-mode-map (kbd "s") 'dired-subtree-narrow)

(define-key dired-mode-map (kbd "U") 'dired-unmark)
(define-key dired-mode-map (kbd "C-g") 'dired-unmark-all-marks)
(define-key dired-mode-map (kbd "N") 'dired-next-line)
(define-key dired-mode-map (kbd "C-") 'dired-w32explore)


Ideas to generate unique search context for id:links

2024-08-25 Thread Kepa

Hi

I'm exploring the new option implemented in org 9.7:

"id: links support search options like [[id:my-id::*child heading]]: Any 
valid fuzzy location will work as a search option."



Do you use any way to generate UNIQUE search contexts?


I was thinking about submitting this feature request, but probably it 
will have caveats:


If the search context is in the form "fn:number", update that "number" 
too when normalizing footnotes (org-footnote-normalize.


For example:

* headline 1

:PROPERTIES:
:ID:   2024-08-25T121008356645
:END:

blah blah [fn:20] blah

* headline 2

The goal is to automatically create unique search contexts using the 
features of the footnotes, like in this link to 
[[id:2024-08-25T121008356645::fn:20][blah]]




Re: Ideas to generate unique search context for id:links

2024-08-25 Thread Kepa

Ideas to generate unique search context for id:links
From: Kepa
Subject: Ideas to generate unique search context for id:links
Date: Sun, 25 Aug 2024 13:07:01 +0200
Hi

I'm exploring the new option implemented in org 9.7:

"id: links support search options like [[id:my-id::*child heading]]: 
Any valid fuzzy location will work as a search option."



Do you use any way to generate UNIQUE search contexts?


I was thinking about submitting this feature request, but probably it 
will have caveats:


If the search context is in the form "fn:number", update that "number" 
too when normalizing footnotes (org-footnote-normalize.


For example:

* headline 1

:PROPERTIES:
:ID:   2024-08-25T121008356645
:END:

blah blah [fn:20] blah

* headline 2

The goal is to automatically create unique search contexts using the 
features of the footnotes, like in this link to 
[[id:2024-08-25T121008356645::fn:20][blah]]


Caveat 1: If the footnote reference has not a footnote definition, 
after (org-footnote-normalize) a definition proposal appears (even if 
Org Footnote Define Inline is set to "t").


Caveat 2: If the proposed "id:link" is in a different file than the 
footnote reference, it could be impractical updating its fn:number with 
(org-footnote-normalize).


Interesting option: setting Org Footnote Auto Label to "Create a random 
label" could work as it is to generate unique search contexts. Just 
never, never, ever  (org-footnote-normalize) should be used.




[BUG] Speed command for rot13-region

2024-09-06 Thread Kepa
Hi,

Something strange happens when trying to set the following as a speed command:
("c" . rot13-region)

In my customized Emacs, a warning appears.

In Emacs -q, first it doesn't do anything if no region is active. Then, it 
affects a headline where there is not the point, and this happens without 
needing to have a region active.

Best regards.

NB: I liked to read the SUMMARY of the last meet up, thanks!
https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg2.html


Inconsistent org-sort numeric

2024-09-06 Thread Kepa
Hi

It seems inconsistent, org-sort numeric.
If org-sort numeric is applied to each of these one level headlines, the order 
is different in both (tested with emacs -q):


* Inconsistent org-sort. M-x org-sort numeric
** !Cuatro
** ~Cinco
** Tres
** 1
** 2

* Inconsistent org-sort. M-x org-sort numeric
** Tres
** !Cuatro
** ~Cinco
** 1
** 2


Doubt. Differences between id search and target links.

2024-09-07 Thread Kepa
Hi

I have a doubt about two kind of links, that are very similar in functionality: 
id links with search options and <> links

What would be the best option?

In terms of performance, id links could be better, since the search is narrowed 
to the contents of a headline, while <> link has to search in several 
files?

Any other consideration?
Easiness to automate link generation?
Bidirectionality?
Time proof?
Scalability?

Best regards


Re: [BUG] Speed command for rot13-region

2024-09-10 Thread Kepa

From: Ihor Radchenko
Subject: Re: [BUG] Speed command for rot13-region
Date: Mon, 09 Sep 2024 18:12:44 +
If you can reproduce from emacs -Q, may your please share more detailed
instructions on how to trigger the problem you are seeing?


Emacs -Q

Create org file with:

* 1
aaa
* 2
bbb
* 3
ccc


Eval this:

(setq org-use-speed-commands t)

(setq org-speed-commands '(("c" . rot13-region)))

Try "c" speed command on * 2 headline: * 1 headline is encrypted.

Try "c" speed command on * 3 headline: * 1 and * 2 headlines are encrypted.


Re: Inconsistent org-sort numeric

2024-09-10 Thread Kepa
I thought it would be similar to alphabetical sort, where numbers are ordered 
although they are not part of the alphabet.

If it's as intended, ok.


RE: Link Abbreviations with Org-Attach

2024-10-12 Thread Kepa
Hi Ihor,

I've moved on, and I probably won't need that feature. 

> -Original Message-
> From: yantar92 at posteo.net
> 
> Sent: Saturday, October 12, 2024 8:06 PM
> To: Kepa 
> Cc: emacs-orgmode at gnu.org  orgmode_at_gnu_org_kqcgk...@simplelogin.co>
> Subject: Re: Link Abbreviations with Org-Attach
> 
> Kepa  writes:
> 
> > Is it possible to use org-attachments with link abbreviation definitions?
> >
> > I'm testing it, and it seems not to work. I'm referring to elements like 
> > these:
> >
> > * 1 Link Abbreviation Definition
> > #+LINK: shortcut /path/to/folder/
> >
> > * 2 Attachment Directory Property doesn't work
> > :PROPERTIES:
> > :DIR: shortcut:file.el
> > :END:
> 
> :DIR: value must be a directory path, not an Org link.
> So, what you are asking for is not supported.
> 
I placed a file in :DIR: by mistake. The same question applied to a directory 
in :DIR: was the correct.
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>, or support
> my work at <https://liberapay.com/yantar92>

Best regards.




[SOLVED] How to use italics in headlines

2024-10-08 Thread Kepa

I think it's solved: just don't set the height in the italics definition, so it 
can take the context height.

----
From: Kepa
Subject: How to use italics in headlines
Date: Sun, 6 Oct 2024 10:22:56 +

What would be the correct way to customize italics and bold so they get the 
face of the context? (in the headline, in the content, in a table, etc)



Best regards


Re: Problems inserting accentuated dates

2024-10-08 Thread Kepa


On 08/10/2024 6:33, tomas at tuxteam.de wrote:

On Mon, Oct 07, 2024 at 08:42:24PM +, Kepa wrote:

Hi, Ihor

Sorry I don't know how mail lists work, so sometimes my answers don't go to the 
correct place.

This seems to work fine :)
If I answer to the recived e-mail, it usually works. If try to answer 
from the mail archive, it usually doesn't work.



The cause was this line:
(setq locale-coding-system 'utf-8)
But I don't know why, and I would like to know.
https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00313.html

OK. Asking Emacs, it tells us about the variable `locale-coding-system':

   locale-coding-system is a variable defined in ‘C source code’.

   Its value is ‘utf-8-unix’

   Coding system to use with system messages.
   Potentially also used for decoding keyboard input on X Windows,
   and is used for encoding standard output and error streams.

   Probably introduced at or before Emacs version 21.1.

Now my questions to you:

- this \341 thing happens directly when you enter á?

No, I've never had problems entering anything.

- you are using X on some operating system (e.g. Gnu/Linux,
   some BSD)?

Windows OS

- if yes: go to a terminal (XTerm), type in "locale" 
   and tell us what the output is.

My guess is that your X (if you have one) is set up to trade in
an unibyte encoding (most probably iso-8859-1 aka Latin-1) and
you told Emacs to expect utf-8 (the iso-8859-1 encoding for "á"
is one byte represented in octal as 341 and an illegal byte in
an UTF-8 stream: Emacs is smart enough to have a way to keep those
internally, and that is how it shows them).

But alas, my guesses aren't always right :)

Probably it's that. Windows takes the dates from locale, or something...


Cheers

Thanks!

[SOLVED]: org-levels customization

2024-10-05 Thread Kepa
Got it:
'(org-n-level-faces 1)

8-)

Best regards

From: idlip at protonmail.com 
Sent: Saturday, October 5, 2024 6:36 PM
Cc: gnu.cognition...@slmails.com
Subject: Re: HELP: org-levels customization


(set-face-attribute 'org-level-1 nil :height 1.5 :foreground "#b4befe")

(set-face-attribute 'org-level-2 nil :height 1.4 :foreground "#f5deb5")


How to use italics in headlines

2024-10-06 Thread Kepa
Hi

I'm trying to have control over the appearance of faces, but it seems to be 
unmanageable for me.

For example:
Is it possible to use italics in headlines, matching the size of the headline? 
Or is the italic face determined by itself, meaning it will always have a fixed 
size regardless of whether it is used in?

What would be the correct way to customize italics and bold so they get the 
face of the context? (in the headline, in the content, in a table, etc)

Best regards



Re: HELP: org-levels customization

2024-10-05 Thread Kepa

On 05/10/2024 18:35, idlip at protonmail.com wrote:

> In Emacs -Q there is not this issue.

This indicates the issue is with your config.

Yes, that's for sure.


I suspect it can be from theme.


When I make a search for "theme" word in my init.el file, I get just one 
result:


 '(custom-safe-themes '(default))



Are you sure there is no config editing org-level-* faces somewhere?


When I make a search for "org-level", I only get org-level as 
inheritance (aside from the set-face-attribute I shared before). Example:


 '(org-upcoming-deadline ((t (:inherit org-level-3



> (set-face-attribute 'org-level-1 nil :inherit 'org-default :height 1.5)
> (set-face-attribute 'org-level-2 nil :inherit 'org-level-1 :height 1.4)
> (set-face-attribute 'org-level-3 nil :inherit 'org-level-1 :height 1.2)

Also do note height work as an increment from inherited value. It does
override. So according to this config org-level-2 height will be 1.4x
times that of org-level-1.
Yes, the problem by now is that I don't get any change in org-level-2, 
3, etc. whatever the value I set.


> When I evaluate (describe-face) on any headline level, it consistently
> reports that it is org-level-1.
I assume you are calling it interactively (via M-x), this gets
completing-read and allows you to select. Maybe you got only org-level-1
and selectec it?


I call (describe-face) interactively, and it offers a default selection.

This default selection is always the face where the point is on. 
Although the point was on a headline of level 2, 3, etc, when calling 
(describe-face) the default selected face is always org-level-1.




Try this,

(set-face-attribute 'org-level-1 nil :height 1.5 :foreground "#b4befe")
(set-face-attribute 'org-level-2 nil :height 1.4 :foreground "#f5deb5")


org-level-1 changes are applied to every org-level:

https://ibb.co/XW2KSF3



Again, if it works in emacs -Q or vanilla org-mode. You need to debug
your init and theme.


I know. I tried bug hunter.

Any help?



--
Best,
Dilip

Best regards!

RE: Problems inserting accentuated dates

2024-10-07 Thread Kepa
Hi, Ihor

Sorry I don't know how mail lists work, so sometimes my answers don't go to the 
correct place.


The cause was this line:
(setq locale-coding-system 'utf-8)
But I don't know why, and I would like to know.
https://lists.gnu.org/archive/html/emacs-orgmode/2024-09/msg00313.html

Best regards

> -Original Message-
> From: yantar92 at posteo.net
> 
> Sent: Monday, October 7, 2024 9:18 PM
> To: Kepa 
> Cc: emacs-orgmode at gnu.org  orgmode_at_gnu_org_kqcgk...@simplelogin.co>
> Subject: Re: Problems inserting accentuated dates
> 
> Kepa  writes:
> 
> > I have a problem some time ago. I don't know the cause:
> > I can't insert dates accentuated, for example Saturday (in Spanish it is
> Sábado). If I do it, I get:
> > <2024-09-28 s \341.>
> > Instead of
> > <2024-09-28 sá .>
> > ...
> 
> This looks like coding system misconfiguration.
> 
> > ...
> > I have not that problem in emacs -Q
> 
> So the problem is somewhere in your config.
> Did you try to bisect it or narrow down the problem in some other way?
> 
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>, or support
> my work at <https://liberapay.com/yantar92>





Help. SPC in speed commands

2024-10-18 Thread Kepa
Hello,

This speed commands keybinding is not working for me. Should it be done 
differently to use SPC?
 ("SPC" . org-todo)

Best regards



[Help] Handling links

2024-10-20 Thread Kepa
Section 4.5 [Handling Links], page 42 says:
"For Org files, if there is a '<>' at point, the link points to the 
target. If there is a named block (using '#+name:') at point, the link points 
to that name. Otherwise it points to the current headline, which is also the 
description."

I don't understand it, or it doesn't work for me...
If the point is over the string "<>" and I call org-store-link.
When I call org-insert-link I get no reference to the <>, should I get 
it?

And, a doubt: is it possible to have several "#+name:" in the same headline?
"#+name: ref1"
"#+name: ref2"
Would it work? I am only able to store one reference using "#+name:"

Best regards



HELP: org-levels customization

2024-10-05 Thread Kepa
Hi

I am encountering an issue while trying to customize the headlines in Org-mode.
I have taken the customization lines, corresponding to org-levels, from 
custom-set-faces to the body of my init file. So I have now this:

(set-face-attribute 'org-default nil :inherit 'default :family "Atkinson 
Hyperlegible" :foreground "#FF" :height 1.0)
(set-face-attribute 'org-level-1 nil :inherit 'org-default :height 1.5)
(set-face-attribute 'org-level-2 nil :inherit 'org-level-1 :height 1.4)
(set-face-attribute 'org-level-3 nil :inherit 'org-level-1 :height 1.2)

PROBLEM:
When I evaluate (describe-face) on any headline level, it consistently reports 
that it is org-level-1.
Additionally, the attributes I set for org-level-2 and lower levels do not take 
effect; all headers are customized as org-level-1.

In Emacs -Q there is not this issue.
I have tried to not use :inherit. No result.
I have tried to just change the color of different org-levels. No change.
I have tried bug-hunter, but it hasn't been unable to identify the cause of the 
problem.

Every org-level seems to be org-level-1
What could it be?

Best regards,


[Help] How to show contents of just the filtered headlines

2024-10-23 Thread Kepa
Hi

I would like to generate a buffer with the agenda entries with a specified tag, 
including their contents, not only headlines. The ideal way would be to unfold 
directly in the agenda, is it possible?
What would be the easiest way to get a buffer with JUST filtered headlines and 
their contents?

Best regards



RE: [Solved] How to show contents of just the filtered headlines

2024-11-03 Thread Kepa
Hi Ihor, that is great. I am sorry I didn't know org-agenda-entry-text-mode, 
nor org-agenda-write. Great, really.

Thanks!

> -Original Message-
> From: yantar92 at posteo.net
> 
> Sent: Wednesday, October 30, 2024 8:10 PM
> To: Kepa 
> Cc: emacs-orgmode at gnu.org  orgmode_at_gnu_org_kqcgk...@simplelogin.co>
> Subject: Re: [Help] How to show contents of just the filtered headlines
> 
> Kepa  writes:
> 
> > I would like to generate a buffer with the agenda entries with a specified
> tag, including their contents, not only headlines. The ideal way would be to
> unfold directly in the agenda, is it possible?
> 
> Check out org-agenda-entry-text-mode and org-agenda-follow-mode.
> 
> > What would be the easiest way to get a buffer with JUST filtered headlines
> and their contents?
> 
> Probably M-x org-agenda-write file.org
> 
> There might be third-party packages with this kind of functionality. AFAIK,
> org-roam does something similar. Maybe org-sidebar.
> 
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>, or support
> my work at <https://liberapay.com/yantar92>





RE: Help. SPC in speed commands

2024-10-26 Thread Kepa
It works on emacs -Q.
But with my config it is not working, it just shows breadcrumbs in the mini 
buffer, showing some upper level headline.


Best regards

> -Original Message-
> From: yantar92 at posteo.net
> 
> Sent: Saturday, October 26, 2024 11:55 AM
> To: Kepa 
> Cc: emacs-orgmode at gnu.org  orgmode_at_gnu_org_kqcgk...@simplelogin.co>
> Subject: Re: Help. SPC in speed commands
> 
> Kepa  writes:
> 
> > Hello,
> >
> > This speed commands keybinding is not working for me. Should it be done
> differently to use SPC?
> >  ("SPC" . org-todo)
> 
> Try
> 
> (" " . org-todo)
> 
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>, or support
> my work at <https://liberapay.com/yantar92>





Link Abbreviations with Org-Attach

2024-09-23 Thread Kepa
Hello,

Is it possible to use org-attachments with link abbreviation definitions?

I'm testing it, and it seems not to work. I'm referring to elements like these:

* 1 Link Abbreviation Definition
#+LINK: shortcut /path/to/folder/

* 2 Attachment Directory Property doesn't work
:PROPERTIES:
:DIR: shortcut:file.el
:END:

Best regards


Problems inserting accentuated dates

2024-09-28 Thread Kepa
I have a problem some time ago. I don't know the cause:
I can't insert dates accentuated, for example Saturday (in Spanish it is 
Sábado). If I do it, I get:
<2024-09-28 s \341.>
Instead of
<2024-09-28 sá .>

And if I try to save the buffer, the minibuffer is open with "Select coding 
system" message.

I have no problem writing manually sáb. or sábado in the buffer, I have no 
coding problems.

If I do M-x describe-coding-system in the buffer, I get this:

Coding system for saving this buffer:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Default coding system (for new files):
  U -- utf-8 (alias: mule-utf-8 cp65001)

Coding system for keyboard input:
  U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)

Coding system for terminal output:
  U -- utf-8 (alias: mule-utf-8 cp65001)

Coding system for inter-client cut and paste:
  U -- utf-16le-dos

Defaults for subprocess I/O:
  decoding: U -- utf-8-dos (alias: mule-utf-8-dos cp65001-dos)

  encoding: U -- utf-8-unix (alias: mule-utf-8-unix cp65001-unix)


Priority order for recognizing coding systems when reading files:
  1. utf-8 (alias: mule-utf-8 cp65001)
  2. iso-latin-1 (alias: iso-8859-1 latin-1)
  3. iso-2022-7bit
  4. iso-2022-7bit-lock (alias: iso-2022-int-1)
  5. iso-2022-8bit-ss2
  6. emacs-mule
  7. raw-text
  8. iso-2022-jp (alias: junet)
  9. in-is13194-devanagari (alias: devanagari)
  10. chinese-iso-8bit (alias: cn-gb-2312 euc-china euc-cn cn-gb gb2312)
  11. utf-8-auto
  12. utf-8-with-signature
  13. utf-16
  14. utf-16be-with-signature (alias: utf-16-be)
  15. utf-16le-with-signature (alias: utf-16-le)
  16. utf-16be
  17. utf-16le
  18. japanese-shift-jis (alias: shift_jis sjis)
  19. chinese-big5 (alias: big5 cn-big5 cp950)
  20. undecided


I have not that problem in emacs -Q
GNU Emacs 29.3 (build 2, x86_64-w64-mingw32) of 2024-03-24
Org mode version 9.8-pre


[SOLVED] Problems inserting accentuated dates

2024-09-29 Thread Kepa
Kind of solved (thanks to bug-hunter). The cause was this line:


 (setq locale-coding-system 'utf-8)


But I don't know why, and I would like to know.


Best regards


VISIBILITY property: Is it mixed children and content?

2024-09-30 Thread Kepa
Hi

Using :VISIBILITY: in a headline PROPERTIES drawer:

It seems ":visibility: children" shows the headline content and children.

While ":visibility: content" shows just headline's children

Intuitively I'd say it should be the opposite way.

Org mode version 9.8-pre-28b631

Best regards


Re: Help with my first elisp

2022-05-24 Thread Kepa Diez



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?


Hi Greg

I think "logos" doesn't have a map, is it possible?



On Mon, May 23, 2022 at 09:46:09AM -0700, Greg Minshall wrote:
>/Ypo,/
>//
>/> (defun salto ()/
>/> (interactive)/
>/> (if posicion 1/

You are comparing the value of posicion to 1?

Then it should probably be "(if (= posicion 1) ...)" or
"(if (equal posicion 1) ...)" or something like that.

Cheers
--
t
Thanks, Tomas. It seems the "if" part works, now I use my elisp just 
with the spacebar :-)


(add-hook 'logos-focus-mode-hook #'(lambda ()

(defvar posicion
  "Position where is the cursor.")

  (defun focusPointStart ()
  (interactive)
  (next-line 1)
  (beginning-of-visual-line)
  (forward-char 6)
  (setq posicion 1)
)

(defun focusPointInter ()
  (interactive)
  (forward-char 23)
  (setq posicion 2)
)


(defun focusPointEnd ()
  (interactive)
  (end-of-visual-line) ;;C-e
  (backward-char 7)
  (setq posicion 3)
)

(defun focusJump ()
  (interactive)
  (if (equal posicion 1)
    (focusPointInter)
  (if (equal posicion 2)
  (focusPointEnd)
    (if  (equal posicion 3)
    (focusPointStart)

(define-key global-map (kbd "SPC") #'focusJump)
))