Re: [BUG] Warning: The error was: (error "Invalid search bound (wrong side of point)") [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]

2024-02-17 Thread Ypo

Hi, Ihor

Nope, I don't usually see that error.

On 14/02/2024 15:22, Ihor Radchenko wrote:

Ypo  writes:


I got a warning, which asked to be reported. Not sure why it happened, I
think it was when I refreshed calfw calendar:

Thanks for reporting!
Do you see the same warning if you switch to Org development branch?


[BUG] Warning: The error was: (error "Invalid search bound (wrong side of point)") [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]

2024-02-13 Thread Ypo
I got a warning, which asked to be reported. Not sure why it happened, I 
think it was when I refreshed calfw calendar:


https://pastebin.com/1C88sLdt

Best


How to downgrade from the last orgmode version to a stable version

2024-02-11 Thread Ypo

Hi

I am using Org mode version 9.7-pre (release_N/A-N/A-afc529 @ 
./.emacs.d/elpa/org-9.7pre0.20240130.161905/)


But I receive several error messages and problems with several packages, 
for example after a swiper search, the headline doesn't unfold. Today, 
Vertico has stopped working while in an Emacs session.


If I try to delete the 9.7-pre version, I can't : "package-delete: 
Package ‘org-9.7pre0.20240130.161905’ is used by ‘ox-pandoc’ as 
dependency, not deleting"



What would be the correct way to go back to a stable org version?

Best


Help: How to change faces of words between parenthesis

2024-02-11 Thread Ypo

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)."


I would like that this part changes into a lighter color, so it doesn't 
distract me when reading:


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



Best regards


Re: [BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-03 Thread Ypo

Thanks, Ihor

I can't share my private org files. And I find myself unable to isolate 
the causes of the possible errors.


I think I will keep waiting till somebody shares an easy and robust way 
to get an .ics calendar from org files.


Best!

On 02/02/2024 22:25, Ihor Radchenko wrote:

Ypo  writes:


I am sharing a bug report from emacs -q. I don't know how to use a
different org-version that the built-in (or if I should).

Sorry for not being clear. Let me elaborate what I expect.

1. Create example Org file or a set of Org files, open them with
emacs -Q, and try to trigger the problem where you expect to see ics
file, but it does not appear

2. If you can do it, share the example Org files and each step you
performed after emacs -Q until you encountered the problem.

The idea is providing me with enough info to re-create the problem on my
computer, so that I can investigate in depth.


[BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-02 Thread Ypo
   ("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)
       ("w3m" :store org-w3m-store-link)
       ("doi" :follow org-link-doi-open :export 
org-link-doi-export)
       ("file+sys") ("file+emacs") ("shell" :follow 
org-link--open-shell)

       ("news" :follow
        #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6
          "\n\n(fn URL ARG)"]
        )
       ("mailto" :follow
        #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6
          "\n\n(fn URL ARG)"]
        )
       ("https" :follow
        #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6
          "\n\n(fn URL ARG)"]
        )
       ("http" :follow
        #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6
              "\n\n(fn URL ARG)"]
        )
       ("ftp" :follow
        #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6
          "\n\n(fn URL ARG)"]
        )
       ("help" :follow org-link--open-help :store 
org-link--store-help)

       ("file" :complete org-link-complete-file)
       ("elisp" :follow org-link--open-elisp))
 org-html-format-headline-function 
'org-html-format-headline-default-function

 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-icalendar-combined-agenda-file "~/2-Areas_R/NOTAS/org-mode-agenda.ics"
 org-icalendar-categories nil
 org-export-preserve-breaks t
 )

On 02/02/2024 17:53, Ihor Radchenko wrote:

Ypo  writes:


If I were able to fulfill a good process to export from agenda to
icalendar, maybe we could share an easy process, useful for a lot of
users that miss a good android calendar visualization. Do you think it
could be possible to export, in an async way, a calendar file every time
when a new timestamp, Schedule or Deadline are added to a buffer? What
would happen if an export process is already running and a new timestamp
is added? Would it be robust enough or prone to errors? I can see that
even if a footnote is not correct, the process seems to be interrupted.

You can just do it on timer or when the file changed.


Actual state: when I try to export to icalendar, the behavior is quite
confusing:

+ [c] Combine all agenda files: I don't get any ics file. I don't know
what is the problem.

+ [a] All agenda files: I get just an ics file. I thought I would get
one file for each agenda file.

It would help if you provided an MWE. 
Seehttps://orgmode.org/manual/Feedback.html#Feedback
It is extremely hard to diagnose things blindly.


Re: org-icalendar export problems

2024-02-01 Thread Ypo
I got org updated, following Ihor's instructions: Org mode version 
9.7-pre (release_N/A-N/A-afc529 @ ./org-9.7pre0.20240130.161905/)


If I were able to fulfill a good process to export from agenda to 
icalendar, maybe we could share an easy process, useful for a lot of 
users that miss a good android calendar visualization. Do you think it 
could be possible to export, in an async way, a calendar file every time 
when a new timestamp, Schedule or Deadline are added to a buffer? What 
would happen if an export process is already running and a new timestamp 
is added? Would it be robust enough or prone to errors? I can see that 
even if a footnote is not correct, the process seems to be interrupted.


Actual state: when I try to export to icalendar, the behavior is quite 
confusing:


+ [c] Combine all agenda files: I don't get any ics file. I don't know 
what is the problem.


+ [a] All agenda files: I get just an ics file. I thought I would get 
one file for each agenda file.


Best!

On 30/01/2024 5:13, Jack Kamm wrote:

ypuntot  writes:


Problem! Found 1 error

Errors
Lines not delimited by CRLF sequence near line # 1
Reference: RFC 5545 3.1. Content Lines

Which version of Org are you using? (M-x org-version)

Org 9.7 (unreleased) contains some fixes for how ox-icalendar handles
newlines. If you are using a previous version of Org, please try out the
latest main branch and see if it fixes the problem.

Re: How to update to the last orgmode version

2024-01-30 Thread Ypo

Hi Ihor

Can it be installed like any other elisp package?

I thought I could go using the web browser to the address showed in the 
manual:


https://git.savannah.gnu.org/git/emacs/org-mode.git

And from there to download the org-mode package, and the to load it, but 
I can't download it.


Is it necessary to build it, or to use git? This would be above my head.

Best


On 30/01/2024 21:11, Ihor Radchenko wrote:

ypuntot  writes:


I need to update orgmode to the version 9.7.
Could you please help me with some links or instructions?

https://orgmode.org/manual/Installation.html


Re: Literate programming with calc (help)

2023-09-10 Thread Ypo
I have discovered, taking a look at the Org Manual, that exists an 
embedded mode for Calc.


https://www.gnu.org/software/emacs/manual/html_mono/calc.html#Assignments-in-Embedded-Mode

Using "C-x * e" it solves this kind of formula with units:

a := 3 m / s

t := 7 s

a t =>




> From:     Ihor Radchenko
> Subject:     Re: LIterate programming with calc (help)
> Date:     Tue, 01 Nov 2022 07:22:18 +


"Fraga, Eric"  writes:

>/> I guess that the main problem is that calc is tightly integrated with/
>/> interactive commands. Maybe ob-calc could be extended to somehow/
>/> indicate the commands to be executed in addition to inputting stack/
>/> entries./
>/>/
>/> Not sure if there is much interest in such feature though./
>//
>/Thinking out loud, what would be better, but I have no idea how feasible/
>/it would be, would be to have ob-calc make use of the embedded calc/
>/functionality and syntax, so that you could write something like this:/
>//
>/#+begin_src calc/
>/a := 300 m/
>/b := 2 a =>/
>/#+end_src/
>//
>/which would output the result of any line with => on it./

I am CCing Tom Gillespie, the maintainer of ob-calc. Maybe he has
something to say.

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 










[BUG] Clocking with inlinetasks

2023-08-31 Thread Ypo
When clock-in, if there is an inline task above the point, the clock is 
set below the END of the inlinetask, instead of in the main headline.



Best regards


Re: [DISCUSSION] Re-design of inlinetasks

2023-08-31 Thread Ypo

Hi, Adams


In an org block:

- You can't use directly the org-mode keybinding.

- Visually, by default, it is different from the other headlines.

- When exporting, by default, it doesn't seem appropriate for reading.

- When inserting, by default, it is not as easy as inlinetasks are.


I will share a use example I proposed in gptel issues forum.  It seemed 
to me useful for inserting a chatgpt response with Properties, in the 
middle of the text:


https://github.com/karthink/gptel/issues/103#issuecomment-1685196575

*** OpenAI. (2023). /ChatGPT: I apologize for any confusion/ 
(Ago 20 version). In Conquest of Egypt

:PROPERTIES:
:GPTEL_MODEL: gpt-3.5-turbo
:GPTEL_TOPIC: Conquest of Egypt
:GPTEL_SYSTEM: I want you to act as a historian. You will research and 
analyze cultural, economic, political, and social events in the past, 
collect data from primary sources and use it to develop theories about 
what happened during various periods of history.

:END:
I apologize for any confusion, ...
*** END


Best regards


Re: Subscript entity in the name of files or some advise for alternatives

2023-07-26 Thread Ypo

Hi Ihor!

I wanted to avoid this: "Campayo_2009_BLOQUE1Leyendo3FotosRenglon-2.png"

to look like this:

https://i.ibb.co/CJm99pG/Captura.png


I have solved it by setting "Org Pretty Entities Include Sub 
Superscripts" to nil.


Side effect: I lost pretty superscripts, but it's not too serious ^^


El 26/07/2023 a las 14:22, Ihor Radchenko escribió:

Ypo  writes:


I tried to don't get the subscripts (_) affected by org-pretty-entities.

I wanted it, because I usually use (_) to divide words when naming
my_files, and that looks ugly in Orgmode.

May you please provide an illustration with example Org file, what you
see, and what you want to achieve?


Re: Subscript entity in the name of files or some advise for alternatives

2023-07-24 Thread Ypo

Thanks, Jens

Why did you try that variable instead of 
"org-pretty-entities-include-sub-superscripts"?


El 24/07/2023 a las 22:33, Jens Schmidt escribió:

On 2023-07-24  21:12, Ypo wrote:

I wanted it, because I usually use (_) to divide words when naming 
my_files, and that looks ugly in Orgmode.


I had that problem myself recently.  Do `org-use-sub-superscripts' and 
its companion `org-export-with-sub-superscripts' help in your case?


See also .

Subscript entity in the name of files or some advise for alternatives

2023-07-24 Thread Ypo

Hi

I tried to don't get the subscripts (_) affected by org-pretty-entities.

I wanted it, because I usually use (_) to divide words when naming 
my_files, and that looks ugly in Orgmode.



I have tried redefining the constant org-match-substring-regexp, but I 
think that broke several other things 😅


Is it possible to use org-pretty-entities without altering subscripts (_)?

Should I avoid using (_) in the naming of files?

Another option could be to use symbols instead of LaTeX syntax: writing 
Π instead of /Pi. This solution could be more universal, since external 
"org" interpreters like orgzly could show Π while maybe they will never 
show \Pi appropriately.



Bests


[FR] Respect `org-bibtex-headline-format-function' in `org-bibtex-create' (was: org-bibtex manual)

2023-07-21 Thread Ypo

Thanks, Ihor.

What does [FR] mean?

Bests




Ypo  writes:

>/No, I mean customizing the generated headline. Instead of just title, to /
>/be like:/
>
>/* Author (year) /Title/. Publisher/

It would indeed make sense.
*From*: Ihor Radchenko
*Subject*: 	[FR] Respect `org-bibtex-headline-format-function' in 
`org-bibtex-create' (was: org-bibtex manual)

*Date*: Fri, 21 Jul 2023 07:42:36 +



Re: org-bibtex manual

2023-07-20 Thread Ypo
No, I mean customizing the generated headline. Instead of just title, to 
be like:


* Author (year) /Title/. Publisher

Bests

El 20/07/2023 a las 21:00, Ihor Radchenko escribió:

Ypo  writes:


Then, is it not possible to customize the entry generated with
org-bibtex-create?

You mean fields?
Everything is defined in `org-bibtex-types', but it is not currently a 
defcustom.

I see no problem adding user types.


Re: org-bibtex manual

2023-07-20 Thread Ypo

Hi Ihor.

Then, is it not possible to customize the entry generated with 
org-bibtex-create?


Bests



>/#+begin_src emacs-lisp/
>/(defun my-org-bibtex-headline-format (entry)/
>/  "Custom function to generate the headline text for org-bibtex-write."/
>/  (let* ((title (cdr (assoc :title entry)))/
>/ (author (cdr (assoc :author entry/
>/    (concat "Mi encabezado personalizado: " title " - " author)))/
>
>/(setq org-bibtex-headline-format #'my-org-bibtex-headline-format)/
>/#+end_src/

This is correct, but this customization only works in
`org-bibtex-write', which works together with `org-bibtex-read-buffer' /
`org-bibtex-read-file'.

`org-bibtex-create' hard-codes heading to be the same with BiBTeX :title
field.

Yes, org-bibtex is not very polished.


Doubt about error messages

2023-07-17 Thread Ypo

Hi

Frequently I receive this kind of messages:

"

Warning (org-element-cache): org-element--cache: Org parser error in 
3-recursos.org::1868222. Resetting.

 The error was: (wrong-type-argument integer-or-marker-p nil)
 Backtrace:
nil
 Please report this to Org mode mailing list (M-x 
org-submit-bug-report). Disable showing Disable logging

"


Should I report it in some way? Or as it didn't happen with emacs-q and 
as I don't know how to reproduce it, I shouldn't bother?



Best regards


Re: org-bibtex manual

2023-07-16 Thread Ypo

Thanks, Ihor.

I would like to customize the name of the heading. I think it should be 
customized this function: "Org Bibtex Headline Format Function".


Is there a guide to do this?

I can see the default is:

#[257 "\300\236A\207"
  [:title]
  3 "\n\n(fn ENTRY)"]


But I don't know how to customize it.

ChatGPT says:

"Unless you are an advanced Emacs Lisp developer and have a specific 
need to work with byte-compiled code, you generally don't need to 
interact with or modify this representation directly. Instead, you can 
work with the function using its regular name and definition."



And ChatGPT offers me this alternative, which doesn't seem to work (BTW, 
I am not able to install asoc.el):


#+begin_src emacs-lisp
(defun my-org-bibtex-headline-format (entry)
  "Custom function to generate the headline text for org-bibtex-write."
  (let* ((title (cdr (assoc :title entry)))
 (author (cdr (assoc :author entry
    (concat "Mi encabezado personalizado: " title " - " author)))

(setq org-bibtex-headline-format #'my-org-bibtex-headline-format)
#+end_src


Best regards


org-bibtex manual

2023-07-15 Thread Ypo

Hi

I have been reading about org-bibtex, and I think the mail list were 
right when advised it to me 
(https://lists.gnu.org/archive/html/emacs-orgmode/2021-10/msg00621.html).


Now... I would like to start using it. I have seen it has a kind of 
org-capture template (M-x org-bibtex-create-in-current-entry).


If I wanted to add more properties:

- How should the different properties be named and filled to work correctly?

- Should the names of the properties be exactly like in Bibtex?

- Are there any existing org-capture templates with the properties each 
entry type could have? Or could you advise a manual of bibtex to create 
myself some complete templates?



Thanks!



Re: org-todo-state-tags-triggers not working with regexp?

2023-06-29 Thread Ypo

Solved, thanks! :-)

;;;_ borrar todas las etiquetas al cambiar el estado a HECHO
(defun borrar-etiquetas-tareas-hechas (plist)
  "Borra todas las etiquetas al cambiar una tarea a =HECHO=."
  (when (eq (plist-get plist :type) 'todo-state-change)
    (when (string= (plist-get plist :to) "HECHO")
  (org-set-tags-to nil

(add-hook 'org-trigger-hook 'borrar-etiquetas-tareas-hechas)

El 27/06/2023 a las 14:05, Ihor Radchenko escribió:

Ypo  writes:


I have tried gptel inside emacs (I'm sorry, but I need to tell it) and I
got this code:

#+begin_src emacs-lisp
(defun my-org-trigger-function (state)
    "Remove all tags when state changes to 'DONE'"
    (when (string= state "DONE")
...
(add-hook 'org-trigger-hook 'my-org-trigger-function)
#+end_src

Surprisingly 8-) it doesn't work. Any help?

org-trigger-hook is a variable defined in org.el.

Documentation
Hook for functions that are triggered by a state change.

Each function gets as its single argument a property list with at
least the following elements:

  (:type type-of-change :position pos-at-entry-start
   :from old-state :to new-state)

Depending on the type, more properties may be present.


Re: org-todo-state-tags-triggers not working with regexp?

2023-06-27 Thread Ypo

Hi, Ihor.

I have tried gptel inside emacs (I'm sorry, but I need to tell it) and I 
got this code:


#+begin_src emacs-lisp
(defun my-org-trigger-function (state)
  "Remove all tags when state changes to 'DONE'"
  (when (string= state "DONE")
    (org-toggle-tag nil 'remove)))

(add-hook 'org-trigger-hook 'my-org-trigger-function)
#+end_src

Surprisingly 8-) it doesn't work. Any help?

Best regards

El 11/06/2023 a las 13:41, Ihor Radchenko escribió:

Ypo  writes:


I would like to remove every tag when changing to done state.

This is not working:

   '(org-todo-state-tags-triggers '((done ("(.*)"

This works though:

   '(org-todo-state-tags-triggers '((done ("Atag"

Yes, regexps are not supported in `org-todo-state-tags-triggers'.
You can use `org-trigger-hook'.


Re: How to install org-protocol

2023-06-27 Thread Ypo

I think it's OK, since I was abble to do it ;D

Windows setup 

El 26/06/2023 a las 12:27, Max Nikulin escribió:

Do you have any suggestions concerning the configuration recipe on Worg? 

Re: How to install org-protocol

2023-06-25 Thread Ypo

Hi Ihor!

Sorry, I was referring to linkremark.

I tried with org-capture-ref, but I wasn't able to install asoc.el. 
Although I am using Firefox, so not my thing.


Thanks!


El 25/06/2023 a las 16:14, Ihor Radchenko escribió:

Ypo  writes:


Next thing I would like to do is to capture fragments of websites, and
to save them automatically with this format:
* Author. Data. /Title/. Website.
Link
Captured text
I think org-remark could do it ¿?

Do you meanhttps://github.com/nobiot/org-remark  ?
It has completely different purpose - annotation.

If you want to use Org capture protocol, you will be able to get URL,
title, and selected text - see
https://orgmode.org/manual/The-capture-protocol.html
But not author.

I have written a package that extracts more metadata:
https://github.com/yantar92/org-capture-ref, but it is currently written
for my own needs and works only with qutebrowsers and partially (for js
sites) with Emacs.

There is alsohttps://github.com/maxnikulin/linkremark, that has similar
aims, AFAIR. And some other Org capture extensions.


Re: How to install org-protocol

2023-06-25 Thread Ypo

Thanks, Ihor and Max!
It's working.
I was stuck first with emacs (trying to find org-protcol.el code 8). And 
then I was stuck with Windows.
Next thing I would like to do is to capture fragments of websites, and 
to save them automatically with this format:

* Author. Data. /Title/. Website.
Link
Captured text
I think org-remark could do it ¿?
Best regards
Date: Sat, 24 Jun 2023 10:21:47 + From: Ihor Radchenko 
 To: Ypo  Cc: Org-mode 
 Subject: Re: How to install org-protocol 
Message-ID: <87352h88jo.fsf@localhost> Content-Type: text/plain Ypo 
 writes:



I would like to give another try to org-protocol, but I can't find the
package to install it. Is it on org-contrib? A link, please?


It is built-in.

El 24/06/2023 a las 18:00, emacs-orgmode-requ...@gnu.org escribió:

Message: 6
Date: Sat, 24 Jun 2023 17:46:33 +0700
From: Max Nikulin
To:emacs-orgmode@gnu.org
Subject: Re: How to install org-protocol
Message-ID:
Content-Type: text/plain; charset=UTF-8; format=flowed

On 24/06/2023 16:06, Ypo wrote:

I would like to give another try to org-protocol, but I can't find the
package to install it. Is it on org-contrib? A link, please?

Have you stuck with emacs or with desktop handler configuration?

In emacs init file you should have

   (require 'org-protocol)

*after*  modification of `load-path' if you use non built-in Org version.
You need running server: either emacs should be started as a daemon or

   (server-start)

I have never tried to configure org-protocol on Windows, so I have no
idea if recipes are correct.

https://orgmode.org/worg/org-contrib/org-protocol.html
https://github.com/sprig/org-capture-extension/#under-windows

How to install org-protocol

2023-06-24 Thread Ypo

Hi

I would like to give another try to org-protocol, but I can't find the 
package to install it. Is it on org-contrib? A link, please?



Best regards


org-todo-state-tags-triggers not working with regexp?

2023-06-11 Thread Ypo

Hi

I would like to remove every tag when changing to done state.

This is not working:

 '(org-todo-state-tags-triggers '((done ("(.*)"

This works though:

 '(org-todo-state-tags-triggers '((done ("Atag"


Best regards


Org Speed commands for lists

2023-06-03 Thread Ypo

This is a suggestion: Could Speed commands be applied to lists?

Best regards


Re: Help using org-entities or arternatives.

2023-05-13 Thread Ypo
Thanks, Ruijie. I think it is not what I was asking for, but it's nice 
to read your code.


Best regards.

El 09/05/2023 a las 13:48, Ruijie Yu escribió:

Ypo  writes:


Hi

Is it possible to, each time I write "" to be subsituted by "[...]" ?

I can't do it using abbrev, and I don't know how to do it using org-entities.

I use it to yank quotes, for example, I write:

  "Like other editors, Emacs has commands to search for occurrences of a 
string. There are also commands that do the same thing, but
  search for patterns instead of fixed strings."

And I would like to get, automatically:

  "Like other editors, Emacs has commands to search for occurrences of a 
string. [...] There are also commands that do the same thing, but
  search for patterns instead of fixed strings."

Best regards

Not necessarily Org-specific, but here's my idea, untested:

```emacs-lisp
(defun my/yank-subst-ellipses ()
   (interactive)
   (let* ((start (point-marker))
  (_ (insert (current-kill 0)))
  (end (point-marker)))
 (save-match-data
   ;; Play around with this regexp
   (while (re-search-forward (rx "...") end t)
 ;; And this replacement text
 (replace-match "[...]")
```

Then, since Org sets C-y as `org-yank', make an advice with it.  I am
not confident in this portion at all, but here goes nothing ;)

```emacs-lisp
(require 'cl-lib)
(advice-add
  #'org-yank :around
  (lambda (org-yank &optional arg)
(cl-letf (((symbol-function 'yank)
   (symbol-function 'my/yank-subst/ellipses)))
  (funcall org-yank arg
```


Help using org-entities or arternatives.

2023-05-09 Thread Ypo

Hi

Is it possible to, each time I write "" to be subsituted by "[...]" ?

I can't do it using abbrev, and I don't know how to do it using 
org-entities.


I use it to yank quotes, for example, I write:

   "Like other editors, Emacs has commands to search for occurrences of
   a string. There are also commands that do the same thing, but
   search for patterns instead of fixed strings."

And I would like to get, automatically:

   "Like other editors, Emacs has commands to search for occurrences of
   a string. [...] There are also commands that do the same thing, but
   search for patterns instead of fixed strings."


Best regards


Re: Org Table Header bug?

2023-03-19 Thread Ypo

Hi Ihor.

The heading and first lines of the table:

|---+---+-|
| NPS (~\Oslash_int pulg.) | DN (~\Oslash_int mm) | PP/PE (\Oslash_ext mm) |
|---+---+-|
| 1/8"  | DN 6  | PE 10 / PP 10   |
| 1/4"  | DN 8  | PE 12 / PP 12   |
| 3/8"  | DN 10 | PE 16 / PP 16   |


The \Oslash appears as the Unicode character ⊘ normally.


The \Oslash is not viewed as the Unicode character ⊘ with 
"org-table-header-line-mode". And the first line of the table appears in 
the heading.


https://i.ibb.co/jht3HL0/Captura.png


The \Oslash appears as the Unicode character ⊘, if using the package 
org-table-sticky-header <https://melpa.org/#/org-table-sticky-header> 
wich has the same objective, I think:


"...this package uses the header line to show the table header when it 
is out of sight."


https://i.ibb.co/T8fD3BR/Captura.png


Best regards


El 13/03/2023 a las 12:37, Ihor Radchenko escribió:

Ypo  writes:


When enabled org-table-header-line-mode, the LaTeX symbols in the header
are not fontified.

It would help if you provided a reproducer.

Note that getting this right is a bit tricky. In particular, when table
columns are shrunk.

The function doing the work is `org-table-row-get-visible-string'.
I am wondering if there is a better way to retrieve visible string than
what is done in the function.


Org Table Header bug?

2023-03-12 Thread Ypo

Hi

When enabled org-table-header-line-mode, the LaTeX symbols in the header 
are not fontified.


I found it, because I was trying the package "Org Table Sticky Header", 
that seems to make the same work, but with this external package there 
is not that problem.


Best regards


How to avoid settings at the start of the file.

2023-02-19 Thread Ypo

Hi

Is there a way to not having these kind of settings in the head of 
org-buffers?


#+export_file_name: borrar
#+SETUPFILE: ~\export.setup
#+HTML_HEAD: href="./export/latex-css/style.css" />



Could it be possible to add them in the .init file? Or to have them 
inside a headline?


The upper part of a buffer is very important to me, and I don't like to 
see those lines there...


Best regards!


Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-12 Thread Ypo
Could it be reasonable to collect the hypothetical cases where relative 
timestamps would be used?

So, alternatives and solutions could be evaluated more easily.
For example:


| External Input  | User's 
input | Org output | 
Agenda output (local time) | Org time storing |


|-+--+++--|
| Meeting at 09:37:54, 28 February 2023, in Foz do Iguaçu | [2023-02-28 
ma. 09:37 @UTC-3]    | [2023-02-28 ma. 09:37 @UTC-3]  | 
[2023-02-28 ma. 13:37] | 20230228T12:37:54,68 |
| Same case as above  | [2023-02-28 
ma. 09:37 @timezone] | [2023-02-28 ma. 09:37 @UTC-3,timezone] | 
[2023-02-28 ma. 13:37] | 20230228T12:37:54,68 |
| Party at my home, tomorrow  | [2023-02-13 
lu. 14:15]   | [2023-02-13 lu. 14:15 @UTC+1,timezone] | 
[2023-02-13 lu. 14:15] | 20230213T13:15:54,68 |



- I didn't expect this: it is more difficult for me to find the 
timezone, and to write it in the correct format, than to find the UTC 
offset.


- Maybe org output should always show the time zone, since for calculations

- Should convert show every timestamp timezone, so we know local 
timezone is correct?


- Sorry for the table format, I don't know how to export it from orgmode 
to thunderbird's mail editor.







* Max Nikulin  [2023-02-11 07:47]:
>/On 10/02/2023 10:29, Jean Louis wrote:/
>/> 2030-02-09 12:00 -08 @UTC -- this time CANNOT be said to be "fixed/
>/> UTC"/
>//
>/I do not see any reason why obviously invalid timestamp draws so much/
>/attention./
>//
>/Resolution may be rather concise: behavior is *undefined* since field 
values/
>/are mutually inconsistent. Perhaps implementation may prefer to treat 
it as/
>/2030-02-09T12:00:00-0800 discarding UTC as time zone specifier. 
`org-lint'/

>/should issue a warning requesting a user action./

Thank you!

I have demonstrated that Etar application from F-Droid would disregard
what is invalid and basically only enter valid time. Same for Google
calendar, it would disregard invalid timestamp (even though not
represented as above), and it would enter only valid one. PostgreSQL
will "silently" ignore what does not belong to it.

One can search for "silent" here:
https://www.postgresql.org/docs/current/datatype-datetime.html

>/Could you explain what is wrong with the following (without timezone)?/
>//
>/2030-02-09 12:00 -0800/
>//
>/I consider it as an unambiguous equivalent of 2030-02-09T20:00:00Z 
that is a/

>/UTC timestamp./

That is not same case as Ihor, when he designated it as

2030-02-09 12:00 -0800 @UTC
because there are no offsets @UTC time zone.

In this different case you wish to say that it is:

time of 2030-02-09 12:00 -0800 whereby -0800 is UTC offset from floating time
2030-02-09 12:00, and one can derive UTC time.

That is totally alright as representation of time. That is how past
timestamps are represented in local time.

Why not -- you can use it for future.

I find it less useful for exchange purposes, almost useless, but you
can do. Because if you store time as UTC, you can always see local
time anywhere in the world. But if programmers wish to do that to Org,
okay fine.

It is different time type representation, that does not exist in ISO
8601, but why not, you can include it in Org.

You just be sure that you put a "tag" or such representation that
users will know what is it, even from plain text.

>/The format with explicit offset may be convenient for a person/
>/living in an area that *likely* will have -08:00 offset and who/
>/would like to watch some astronomical event such as lunar eclipse/
>/and who had a plan to connect to some telescope on the opposite side/
>/of the globe. Event time will not change if local time changed. Both/
>/variants 2030-02-09T12:00:00-0800 and 2030-02-09T20:00:00Z may be/
>/presented as "2030-02-09 12:00" to users./

And now you speak of presentation. But then why store it with
2030-02-09T12:00:00-0800 when you can store it as 2030-02-09T20:00:00Z
and have representation be same "2030-02-09 12:00" to users.

So that is only addition to programmer.

Remember that not even databases store the time like that. It is
either UTC time, or date, time, and some time zone stored separately.

>/If timezone offset is changed both variants will converted to/
>/"13:00" or "11:00" depending on sign of change./

Correct. I understand you want to say that representation of time for
that UTC time zone will be modified depnding of change, and that is
correct.

>/So the format with offset is human friendly because it gives a hint/
>/concerning *probable* value of local time still remaining *precise*/
>/in respect to UTC./

This re

Re: [POLL] Proposed syntax for timestamps with time zone info (was: [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda)

2023-02-04 Thread Ypo

Great link!
https://spin.atomicobject.com/2016/07/06/time-zones-offsets/

"Given a local time and an offset, you can know UTC time, but you do 
not know which time zone you’re in (because multiple timezones have 
the same offset)."


So, given a time zone you can know the offset (Google it, for example)..
Then, given the time zone and the local time, you can know UTC.
If orgmode gets the UTC there is not ambiguity.

But, that would mean that the offset related to the different time 
zones must be downloaded and updated from some site.
As you said before, that offset can change. For example, peninsular 
Spain has the same time as Berlin, but as this doesn't make much 
sense, it could change, so updates would be necessary.
I have been thinking about how I would use this feature. So use cases 
appeared, which arose some doubts about how to use this feature, and an 
opinion for the Poll surged:


If I wanted to assist to a "Mastering Emacs book club" meeting in 
America/Vancouver, while living in Spain: Doubt: Should I use local time 
of America/Vancouver to schedule the meeting?. Like: [2024-02-04 12:00 
@America/Vancouver] (I don't like space before the @, for the Poll).
1. Doubt: I suppose my agenda timestamp would be: [2024-02-04 do. 
21:00]. (Spain local time). Correct?
2. If I went on vacation to Brasília, my agenda timestamp should change 
to: [2024-02-04 do. 17:00]. (Brasília local time).
   Doubt: How must the local time zone be updated to get that timestamp 
changed?
3. Back to Spain, I see that, for political reasons, Vancouver's winter 
time-zone changed from UTC-8 to UTC-9.

   Doubt: How would my tz database be updated?
   Doubt: After updating the tz database, my agenda timestamp would 
change automatically to  [2024-02-04 do. 22:00]. Correct?
4. For the Poll: What would be the expected behavior if we used the UTC 
offset?  [2024-02-04 12:00 @-08,America/Vancouver]
    - We should know beforehand the DST of Vancouver, or there would be 
warnings. It seems more difficult for the user: maybe the "-08," should 
be optional?
    - Case 3: After updating the tz database we would get warnings too. 
To correct those warnings, should the UTC offset be changed manually in 
the timestamp?. If there were 35 meetings in Vancouver throughout the 
year, to change all the UTC offsets could be non trivial for a normal 
user: UTC of the summer and winter would differ.
  [2024-09-04 12:00 @-07,America/Vancouver] should be changed to 
[2024-09-04 12:00 @-08,America/Vancouver]
  [2024-02-04 12:00 @-08,America/Vancouver] should be changed to 
[2024-02-04 12:00 @-09,America/Vancouver]





Re: Help with a workflow to export plantuml diagrams

2023-01-21 Thread Ypo

Thanks, Ihor

I can't make it to work by now, but that could be a path to the correct 
workflow.


Best regards :-)


El 17/01/2023 a las 14:28, Ihor Radchenko escribió:

Ypo  writes:


Could be the headlines exported in a faster way?

Could be possible to avoid the duplication of information? (To create
the diagram directly from the headlines, without yanking a copy of them).

You can use noweb reference syntax.

#+name: collect-headings
#+begin_src emacs-lisp :results silent
;; Collect all the headings in current buffer.
(concat
  "* Top\n"
  (mapconcat
   #'identity
   (org-map-entries
'(concat "*"
 (buffer-substring-no-properties
  (line-beginning-position) (line-end-position
   "\n"))
#+end_src

#+begin_src plantuml :noweb yes :file my-diagram.png
@startwbs
<>
@endwbs
#+end_src


Help with a workflow to export plantuml diagrams

2023-01-07 Thread Ypo

Hi

I want to export a diagram, which has a syntax compatible with Orgmode.


I have these headlines:


* Business Process Modelling WBS
** Launch the project
*** Complete Stakeholder Research
*** Initial Implementation Plan
** Design phase
*** Model of AsIs Processes Completed
 Model of AsIs Processes Completed1
 Model of AsIs Processes Completed2
*** Measure AsIs performance metrics
*** Identify Quick Wins
** Complete innovate phase


And I want to export them into a WBS diagram, so I make this block:


#+begin_src plantuml :file my-diagram.png

@startwbs

 * Business Process Modelling WBS
 ** Launch the project
 *** Complete Stakeholder Research
 *** Initial Implementation Plan
 ** Design phase
 *** Model of AsIs Processes Completed
  Model of AsIs Processes Completed1
  Model of AsIs Processes Completed2
 *** Measure AsIs performance metrics
 *** Identify Quick Wins
 ** Complete innovate phase

@endwbs

#+end_src


A workflow could be:

- to use "org-cut-special" and to yank the headlines inside the plantuml 
block.


- After that, I would have to run a macro to insert a blank space before 
each headline, so orgmode doesn't recognize them as headlines.


- Each time I modified the original headlines, I would have to repeat 
that process.


Probably it would be faster to use "org-toggle-item" and work with 
lists, instead of headlines, but there must be a reason for the syntax 
compatibility with orgmode. There must be an intended workflow...


Could be the headlines exported in a faster way?

Could be possible to avoid the duplication of information? (To create 
the diagram directly from the headlines, without yanking a copy of them).



WBS language specification:

https://plantuml.com/wbs-diagram


Thanks


Re: OS advice

2023-01-07 Thread Ypo

Wow! Thanks Juan Manuel!

El 07/01/2023 a las 23:22, Juan Manuel Macías escribió:

Ypo writes:


Hi

Orgmode is sometimes desperately slow on my PC:

Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz, 3100 Mhz

(RAM)4,00 GB

I am running Windows 10, everything I use works OK, but Orgmode.

Do you think that if I install a Linux OS, Orgmode would run fast? Any
OS suggestion?

I've read somewhere that Emacs performance on windows tends to be slow,
but I can't assure you because the last windows I suffered was W98, and
at that time I didn't even use Emacs. According to the official GNU
Emacs website:

#+begin_quote

The reason for GNU Emacs's existence is to provide a powerful editor for
the GNU operating system. Versions of GNU, such as GNU/Linux, are the
primary platforms for Emacs development.

However, GNU Emacs includes support for some other systems that
volunteers choose to support.

[...]

#+end_quote

I don't know what specific performance problems you have with Emacs
under Windows, but you can post them on the Emacs-devel mailing list to
help improve Emacs performance on windows.

However, if you are not tied to windows for work reasons or for a
specific application, my recommendation is that you migrate to
GNU/Linux. But I also recommend that you try to avoid falling into the
clutches of distro hopping, at least to begin with :-). In general, any
of the popular distributions (Ubuntu, Fedora, etc.) is a good choice.
Even if you want the latest of the latest software, EndeavourOS is an
excellent derivative of Arch Linux (much better than Manjaro) with a
very simple graphical installer. Arch itself also has a graphical
installer, if you want to install it, but I would start with Endeavour.
In Linux you also have the possibility of installing light desktop
environments or window managers, which run well with the specifications
of your PC. Lxde and Lxqt are good options, they have openbox as a
window manager, which is robust and highly configurable. But if you
don't want to complicate your life, xfce is a good option. Or Plasma,
which despite being very attractive, I remember that it did not consume
too many resources. And later, if you want to come in the world of
tiling-style window managers, you have a vast territory to explore. I
was very comfortable with BSPWM for a long time, until I migrated to
EXWM (Emacs X Window Manager), which is what I've been using now for a
few years.

Best regards,

Juan Manuel

Re: OS advice

2023-01-07 Thread Ypo

Thanks you all.

I think it is a good idea to try a live-cd. Maybe gentoo¿?

I have been looking to some light OS and Triskel mini looks like quite 
attractive, I tried it many years ago. That will be my second option.


Thanks :-)

El 07/01/2023 a las 13:32, Ihor Radchenko escribió:

Ypo  writes:


Orgmode is sometimes desperately slow on my PC:

Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz, 3100 Mhz

(RAM)    4,00 GB


I am running Windows 10, everything I use works OK, but Orgmode.

Do you think that if I install a Linux OS, Orgmode would run fast? Any
OS suggestion?

AFAIK, 4Gb is barely enough for Windows 10. If I remember correctly, 4Gb
is the minimal hardware requirement for Windows 10, and it will use
almost the whole RAM in such scenario.

So, using things like Chromium or Emacs will likely exceed your RAM
capacity and put system into using SWAP.

You can downgrade to Windows 7, which just requires 2Gb, or you can use
Linux indeed. For example, my current Gentoo setup with Awesome WM +
Browser + Emacs + Syncthing + RSSHub + davmail running only takes 2.7Gb
RAM with bare system (no extra docker services, Emacs, and browser) only
taking 150Mb.


OS advice

2023-01-06 Thread Ypo

Hi

Orgmode is sometimes desperately slow on my PC:

Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz, 3100 Mhz

(RAM)    4,00 GB


I am running Windows 10, everything I use works OK, but Orgmode.

Do you think that if I install a Linux OS, Orgmode would run fast? Any 
OS suggestion?


Best regards


Is org-show-all obsolete?

2022-12-14 Thread Ypo

Has org-show-all changed in the version 9.6?

Now, org-show-all doesn't appear in the "vertico 
" 
completion candidates.


Is org-show-all obsolete? Is there an alternative?

Best regards


To convert and simplify units in tables (was:LIterate programming with calc (help))

2022-11-28 Thread Ypo

#+TBLFM: $s=uconvert($W*$l/$Z,kg / cm^2)::$cs=uconvert($s_lim/$s, )

where uconvert is defined as:

(defmath uconvert (v u)
  "Convert value V to compatible unit U."
  (math-convert-units v u))


But no luck, "cs" result is an ERROR. Is it feasible to get a value 
for "cs" with no units?


Ok, it is enough to add any unit to uconvert, for example: 
$cs=uconvert($s_lim/$s,m). That simplifies units in adimensional parameters.


Best regards ;D


To convert and simplify units in tables (was:LIterate programming with calc (help))

2022-11-27 Thread Ypo

Hi

I have found an alternative solution to this problem:

Is it possible to express in a calc block some basic operations with 
variables and non-predefined units?



For example, if you wanted to build a code block that calculates how 
much money costs


a land with an Area of 300x300 m^2 at a price of 1 $/m^2.


Would it be something like this?

#+begin_src calc
  a = 300 m
  b = 300 m
  Area = a*b
  cost = 1 ($/m^2)
  A*c

#+end_src



The alternative way I am trying is using an org-table. It is not 
literate programming, but it is a spreadsheet with units ;D


| $ | a = 300 m    |
| $ | b = 300 m    |
| _ | Area |
|   | 9 m^2    |
| $ | cost = 1 USD/m^2 |
| _ | Payment  |
|   | 9 USD    |
#+TBLFM: $Area=$a*$b::$Payment=$Area*$cost

(Below "Area" cell it is the result of a*b, and below "Payment" cell it 
is the result of Area*cost)



Now, in a more practical case, I have some problems with units:

| $ | E = 2141404.05 kg/cm^2  |
| $ | s_lim = 275  N/mm^2  |
| $ | s_lim = 2800  kg/cm^2    |
| $ | W = 1 kg |
| $ | l = 65  cm   |
| $ | I = 25166  cm^4  |
| $ | Z = 1680  cm^3   |
| _ | s    |
|   | 386.90476 kg cm / cm^3   |
| _ | cs   |
|   | 7.2369231 kg cm^3 / (cm^2 kg cm) |
#+TBLFM: $s=$W*$l/$Z::$cs=$s_lim/$s

Below "cs" cell it appears 7.2... and this should be an adimensional 
number (no units). Is it possible to simplify those units?


I have tried with:

| $ | E = 2141404.05  kg/cm^2 |
| $ | s_lim = 275  N/mm^2 |
| $ | s_lim = 2800  kg/cm^2   |
| $ | W = 1 kg    |
| $ | l = 65  cm  |
| $ | I = 25166  cm^4 |
| $ | Z = 1680  cm^3  |
| _ | s   |
|   | 386.90476 kg / cm^2 |
| _ | cs  |
|   | #ERROR  |
#+TBLFM: $s=uconvert($W*$l/$Z,kg / cm^2)::$cs=uconvert($s_lim/$s, )

where uconvert is defined as:

(defmath uconvert (v u)
  "Convert value V to compatible unit U."
  (math-convert-units v u))


But no luck, "cs" result is an ERROR. Is it feasible to get a value for 
"cs" with no units?



Best regards



Re: LIterate programming with calc (help)

2022-11-26 Thread Ypo
Just in case you find this package interesting. Except some problems 
with units conversion, it's nice:


https://github.com/sulami/literate-calc-mode.el


This is a literate calc file.

Lines without "=" are ignored.

All results starting with "=>" are an overlay generated by
literate-calc-mode. That means they are displayed in Emacs, but not
actually in the buffer/file contents.

We can calculate a value like so:

= 2 + 2 => 4

If there is any string on the left hand side, it becomes a bound
variable.

Pi = 3.14159 => Pi: 3.14159

We can use this variable below the definiton.

Tau = Pi * 2 => Tau: 6.28318

Results are calculated using Emacs' own calc, so you can use formulas
as well.

= round(Pi, 2) => 3.14

Later bindings shadow earlier ones:

Pi = 3 => Pi: 3

= Pi => 3

Variable names can have spaces as well:

Monthly Expenses = 500 => Monthly Expenses: 500

Monthly Income = 1000 => Monthly Income: 1000

Annual Savings = 12 * (Monthly Income - Monthly Expenses) => Annual Savings: 
6000

All values are recalculated on every update in a spreadsheet-like
fashion.

Calc also has a lot of advanced features, like arrays:

Numbers = [1 2 3] => Numbers: [1, 2, 3]

= 3 Numbers => [3, 6, 9]




"Fraga, Eric"  writes:

>/> I guess that the main problem is that calc is tightly integrated with/
>/> interactive commands. Maybe ob-calc could be extended to somehow/
>/> indicate the commands to be executed in addition to inputting stack/
>/> entries./
>/>/
>/> Not sure if there is much interest in such feature though./
>
>/Thinking out loud, what would be better, but I have no idea how feasible/
>/it would be, would be to have ob-calc make use of the embedded calc/
>/functionality and syntax, so that you could write something like this:/
>
>/#+begin_src calc/
>/a := 300 m/
>/b := 2 a =>/
>/#+end_src/
>
>/which would output the result of any line with => on it./

I am CCing Tom Gillespie, the maintainer of ob-calc. Maybe he has
something to say.


Re: Help with a (query) replacement

2022-11-16 Thread Ypo

Thanks, working!!

I can't see those options in the manual (15.10.4 Query Replace) and the 
help is a little bit obscure for me, a new rabbit hole to study ;D


Thanks!


El 12/11/2022 a las 16:31, alain.coch...@unistra.fr escribió:

Ypo writes on Sat 12 Nov 2022 15:42:
  > Hi
  >
  > I am copy-pasting e-books into org-mode to read and study them.
  >
  > Usually, words come hyphenated, like "ato- mized", that I wanted to
  > transform into "atomized".
  >
  > I am trying with query replace, but I am starting to think that it is
  > not the correct tool for this job.
  > I tried "query-replace [a-z]-" but I don't know how to exclude the
  > letter before the "-".

I don't really understand the thing with e-books but as for
transforming "ato- mized" (or "ato-mized") into "atomized", how about
something like

query-replace-regex

\([a-z]\)-[[:blank:]]*\([a-z]\)

\1\2



Re: Help with a (query) replacement

2022-11-12 Thread Ypo
ummm, so you copy-paste from nov.el into an org buffer and then format 
would be maintained... interesting.


Thanks

El 12/11/2022 a las 16:23, Juan Manuel Macías escribió:

Juan Manuel Macías writes:


I think it will be more practical for you to use pandoc:

With this command you can convert an epub format to org:

pandoc my-epub.epub -o my.epub.org

(https://pandoc.org)

You can also install calibre and convert your epubs to plain text from
there.

PS: And you can also open epubs in Emacs with the nov.el package
(https://github.com/wasamasa/nov.el) and copy whatever text you want
from there.

Re: Help with a (query) replacement

2022-11-12 Thread Ypo

Thanks, Juan Manuel.

I normally study using PDF books. Their typography is like "hardcoded", 
so a post-processing using Orgmode is needed, I think.


El 12/11/2022 a las 16:10, Juan Manuel Macías escribió:

Ypo writes:


Hi

I am copy-pasting e-books into org-mode to read and study them.

Usually, words come hyphenated, like "ato- mized", that I wanted to
transform into "atomized".

I am trying with query replace, but I am starting to think that it is
not the correct tool for this job.
I tried "query-replace [a-z]-" but I don't know how to exclude the
letter before the "-".

What would you advise?

I think it will be more practical for you to use pandoc:

With this command you can convert an epub format to org:

pandoc my-epub.epub -o my.epub.org

(https://pandoc.org)

You can also install calibre and convert your epubs to plain text from
there.

Best regards,

Juan Manuel

Help with a (query) replacement

2022-11-12 Thread Ypo

Hi

I am copy-pasting e-books into org-mode to read and study them.

Usually, words come hyphenated, like "ato- mized", that I wanted to 
transform into "atomized".


I am trying with query replace, but I am starting to think that it is 
not the correct tool for this job.
I tried "query-replace [a-z]-" but I don't know how to exclude the 
letter before the "-".


What would you advise?


Best regards


Re: Suggestion with footnotes when toggling headlines into plain lists

2022-11-12 Thread Ypo

elpa-devel did it!! (non installed git)

Thanks, working!


El 12/11/2022 a las 13:46, Ihor Radchenko escribió:

Ypo  writes:


Is it easy for a user to test if it works?

If you have git, you can clone Org repo (see
https://git.savannah.gnu.org/cgit/emacs/org-mode.git) and then run

   make repro

from inside the Org repo folder. It will open a clean Emacs instance
configured to use the Org version from the repository.

Alternatively, you can add devel package archives ELPA devel. See
https://protesilaos.com/codelog/2022-05-13-emacs-elpa-devel/


Re: Suggestion with footnotes when toggling headlines into plain lists

2022-11-11 Thread Ypo

Great!!

Is it easy for a user to test if it works?

Thanks :-D

El 11/11/2022 a las 6:22, Ihor Radchenko escribió:

Ihor Radchenko  writes:


~C-c -~ turns that into a list where footnotes definitions can't be
found. It gives, for example, problems when exporting or when more
footnotes are added:

* Main headline
- Headline 1
     [fn:1]

    [fn:1] 
- Headline 2

Confirmed.

Transforming footnote-definition into footnote-reference is not intended
and should be considered a bug.

Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=f83e45526b5ec4627d601673be3680e2dece1b33


Re: LIterate programming with calc (help)

2022-10-24 Thread Ypo

Not bad, thanks!!!

Why do you think it doesn't work something more human readable like this?

#+begin_src calc
   solve([
   a = 300 m,
   b = 300 m,
   Area = a*b,
   cost = 1 (USD/m^2),
   z = Area*cost

   ], [a, b, Area, cost, z])
#+end_src


Best regards


El 24/10/2022 a las 9:56, Fraga, Eric escribió:

On Sunday, 23 Oct 2022 at 14:15, Ypo wrote:

Is it possible to express in a calc block some basic operations with
variables and non-predefined units?
Why A*c won't show an arithmetic result, but ~: A c ~?

I've never managed to get calc blocks define variables.  The equations
you have typed in are "equations" in the mathematical sense, not
assignment statements.


Is it possible to work with the "$" unit?

$ means something specific in calc (cannot remember what).  I use "USD"
instead, for instance, and it works fine.

The following single line calc block does do what you want:

#+begin_src calc
   solve([a = 300 m, b = 300 m, Area = a*b, cost = 1 (USD/m^2), z = Area*cost], 
[a, b, Area, cost, z])
#+end_src

#+results:
: [a = 300 m, b = 300 m, Area = 9 m^2, cost = USD / m^2, z = 9 USD]


LIterate programming with calc (help)

2022-10-23 Thread Ypo
Is it possible to express in a calc block some basic operations with 
variables and non-predefined units?



For example, if you wanted to build a code block that calculates how 
much money costs:


a land with an Area of 300x300 m^2 at a price of 1 $/m^2.


Would it be something like this?

#+begin_src calc
  a = 300 m
  b = 300 m
  Area = a*b
  cost = 1 ($/m^2)
  A*c

#+end_src


Is it possible to work with the "$" unit?

Why A*c won't show an arithmetic result, but ~: A c ~?

Wanted result is:


#+RESULTS:
: 90 000 $


Best regards


[off-topic] E-readers and Org-Mode

2022-10-23 Thread Ypo

Probably an offtopic for your offtopic, but:


I use my phone to read e-books:

- AMOLED screen (black color doesn't emit light).

- low level of brightness (so I can read in the night without "losing" 
melatonin). Usually e-book reading app gives you this option.


- the PDF reading app must have reflowing of the text, so you can choose 
the size and font you like.


- no blue colors (ie yellow "face" with a black background). Not sure 
about its effect, but everywhere I read about blue filters. 8-)




Orgzly I use to capture ideas; and other tasks related with 
auto-organization (GTD). Of course, the .org files are sync with my 
computer.


For reading org-mode documents on mobile, I haven't found the perfect app.





Re: Best android app

2022-10-23 Thread Ypo

Hi

I don't know how to send patches.

I have found the place where I want to add some lines:

https://git.sr.ht/~bzg/worg/tree/master/item/org-faq.org#L4502


I have cloned the "repository" hoping it works like in github, but I see 
no option to edit.



If I click on "prepare a patchset" I can just see past commits. I 
suppose first I should've done the commit, but how?:



Best regards


El 23/10/2022 a las 6:39, Ihor Radchenko escribió:

ypuntot  writes:


Could these be added there?

https://github.com/DanielDe/org-web
https://easyorgmode.com/
https://github.com/amake/orgro
https://logseq.com/

Except forhttps://easyorgmode.com/, feel free to send a patch against
https://orgmode.org/worg/org-faq.html#org0a6fc30  in
https://git.sr.ht/~bzg/worg


Re: Best android app

2022-10-15 Thread Ypo

And I am reading that it is not for Android; just Linux, Windows and Mac.

Definitively, shouldn't go there.

El 16/10/2022 a las 1:01, Juan Manuel Macías escribió:

ypuntot writes:

https://easyorgmode.com/  

Proprietary license. This should not be recommended here
(https://easyorgmode.com/terms).




Re: idea for capture anywhere in x

2022-10-12 Thread Ypo

Thanks, Ihor.

But I was referring to 2 possible workflows (not sure if org-protocol 
would be the answer).


The first workflow would consist in emphasizing the web page permanently:


1. Open in ~eww~ the web page.

2. Emphasize with org-mode: highlight the text of the web page.

3. In the future, when opening again the web page, the highlights should 
appear.



I don't know what would be the best way to do it. The only way I know 
similar to that, is using "org-web-tools-insert-web-page-as-entry".


Best regards



El 12/10/2022 a las 11:34, Ihor Radchenko escribió:

Ypo  writes:


What if:
1. It were easy and immediate to open in ~eww~ any web page that we are
reading in "x".

Check out org-protocol.el commentary.


Re: idea for capture anywhere in x

2022-10-09 Thread Ypo

What if:
1. It were easy and immediate to open in ~eww~ any web page that we are 
reading in "x".

2. Once on eww we could:
 a. Emphasize (markup, "highlight") the text and save the 
modifications for the future. Then we could continue reading the 
emphasized web page.

 b. Create and send to an org headline the desired regions of text.

I remember when I was happy reading e-books on my brand new Nokia N80. 
Just plain text, just enough.


Eww is far superior to my old Nokia, so it could be great to work and 
process webpages for taking notes.


Solved: Break lines in Query replace. Help.

2022-10-08 Thread Ypo

Working!

Thanks, Tomas ^^

By the way, I can't see ~^J~ in my document. Is there a way to see it? 
Using ~whitespace-mode~ doesn't work for that.


Best regards

El 08/10/2022 a las 15:03, to...@tuxteam.de escribió:

On Sat, Oct 08, 2022 at 01:19:28PM +0200, Ypo wrote:

I want to make a "query replace", where

" - " should be substituted by

"breakline -"


How do I insert in a query replace a breakline?

"\\ - " seems to work only for LaTeX export.

"^J - " writes down ^J literally, and doesn't work as a break line.

It's C-Q C-J (aka ^Q^J). The CTRL-Q "quotes" the next char (handy also
for other control characters -- see also 7.1 "Inserting Text" in the
fine manual).

Cheers

Break lines in Query replace. Help.

2022-10-08 Thread Ypo

I want to make a "query replace", where

" - " should be substituted by

"breakline - "


How do I insert in a query replace a breakline?

"\\ - " seems to work only for LaTeX export.

"^J - " writes down ^J literally, and doesn't work as a break line.


Best regards



Org contacts documentation

2022-10-08 Thread Ypo

Hi Renato!


I had the same feeling. For suggestions or bugs I suppose a mail to this 
list with a copy to numbchild@gmail*.*com 
 
would do it.


All in all:

The documentation starts by /org-capture/, but forget about it:

The basic function that org-contracts does, is searching and show you 
the results.


Where does it search?

It searches in any headline that has a specific Property like: email or 
address or... You can customize these properties that define what 
headline is a contact (customize-group org-contacts).


And that's it!

Now, you can generate contacts by hand, or faster using org-capture, as 
documentation says.



Here it's org-contacts better explained by Ihor:

https://lists.gnu.org/archive/html/emacs-orgmode/2022-09/msg00162.html


Best regards


Re: [BUG] org-timer-start doesn't seem to take the timer string at point [9.5.5 (release_9.5.5 @ z:/emacs-i686/share/emacs/28.2/lisp/org/)]

2022-10-05 Thread Ypo

Sorry for my delayed answer. But I don't see it either :/

"The prompt will default to a timer string at
+  point (if any),"

I can't see it well related to the C-u prefix. For example why the "(if 
any)"? It should be unnecessary, since it is the previous explained 
general case.


Best regards


El 03/10/2022 a las 4:57, Ihor Radchenko escribió:

Ypo  writes:


Oh! Thanks

I didn't understand. Maybe this would be more understandable?:


   When called with a ‘C-u’ prefix, prompt the user for a starting
  offset or, if there is a timer string at point, this is taken as the
  default, ...

Or:


   When called with a ‘C-u’ prefix, there are 2 options: prompt the user for a 
starting
  offset.  Or, if there is a timer string at point, this is taken as the
  default, ...

Your versions still feel a bit confusing.
What about the attached patch?




[BUG] org-timer-start doesn't seem to take the timer string at point [9.5.5 (release_9.5.5 @ z:/emacs-i686/share/emacs/28.2/lisp/org/)]

2022-10-02 Thread Ypo

In the manual, it says:


C-c C-x 0 (|org-timer-start|)

... If there is a timer string at point, this is taken as the
default, providing a convenient way to restart taking notes after
a break in the process...
https://orgmode.org/manual/Timers.html



I am trying it, but the timer starts at 0:00:00




Emacs  : GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
 of 2022-09-13
Package: Org mode version 9.5.5 (release_9.5.5 @ 
z:/emacs-i686/share/emacs/28.2/lisp/org/)


current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-export-before-parsing-hook '(org-attach-expand-links)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
          org-cycle-show-empty-lines
          org-optimize-window-after-visibility-change)
 org-mode-hook '(#[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)
 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
         org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate
              org-babel-speed-command-activate)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
          org-babel-header-arg-expand)
 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow :complete
            org-attach-complete-link)
           ("id" :follow org-id-open)
           ("eww" :follow org-eww-open :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)
           ("w3m" :store org-w3m-store-link)
           ("doi" :follow org-link-doi-open :export
            org-link-doi-export)
           ("file+sys") ("file+emacs")
           ("shell" :follow org-link--open-shell)
           ("news" :follow
            #[514 "\301\300\302Q\"\207"
              ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]
            )
           ("mailto" :follow
            #[514 "\301\300\302Q\"\207"
              ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]
            )
           ("https" :follow
            #[514 "\301\300\302Q\"\207"
              ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]
            )
           ("http" :follow
            #[514 "\301\300\302Q\"\207"
              ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]
            )
           ("ftp" :follow
            #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"]
              6 "\n\n(fn URL ARG)"]
            )
           ("help" :follow org-link--open-help :store
            org-link--store-help)
           ("file" :complete org-link-complete-file)
           ("elisp" :follow org-link--open-elisp))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 )







Re: [BUG] org-timer-start doesn't seem to take the timer string at point [9.5.5 (release_9.5.5 @ z:/emacs-i686/share/emacs/28.2/lisp/org/)]

2022-10-02 Thread Ypo

Oh! Thanks

I didn't understand. Maybe this would be more understandable?:


  When called with a ‘C-u’ prefix, prompt the user for a starting
 offset or, if there is a timer string at point, this is taken as the
 default, ...

Or:


  When called with a ‘C-u’ prefix, there are 2 options: prompt the user for a 
starting
 offset.  Or, if there is a timer string at point, this is taken as the
 default, ...



El 02/10/2022 a las 15:37, Ihor Radchenko escribió:

Ypo  writes:


In the manual, it says:


C-c C-x 0 (|org-timer-start|)

 ... If there is a timer string at point, this is taken as the
 default, providing a convenient way to restart taking notes after
 a break in the process...
 https://orgmode.org/manual/Timers.html


I am trying it, but the timer starts at 0:00:00

You missed the previous sentence in the manual.

 When called with a ‘C-u’ prefix, prompt the user for a starting
 offset.  If there is a timer string at point, this is taken as the
 default, ...

The value at point is only taken into account with prefix argument.


[BUG] Width property in columnview dynamic blocks [9.5.5]

2022-09-23 Thread Ypo

In columnview dynamic blocks, the Width property doesn't seem to work

In this example the first column width is the same if I write ~%5ITEM~
than ~%ITEM~

* PROYECTO EMACS
:PROPERTIES:
:COLUMNS:  %5ITEM(PROJECT)
:END:

#+BEGIN: columnview
#+END:




Emacs  : GNU Emacs 28.2 (build 2, x86_64-w64-mingw32)
 of 2022-09-13
Package: Org mode version 9.5.5 (release_9.5.5 @ 
z:/emacs-i686/share/emacs/28.2/lisp/org/)


current state:
==
(setq
 org-link-elisp-confirm-function 'yes-or-no-p
 org-bibtex-headline-format-function #[257 "\300%1\236A\207" [:title] 3 
"\n\n(fn ENTRY)"]

 org-export-before-parsing-hook '(org-attach-expand-links)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees 
org-cycle-hide-drawers org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change)
 org-mode-hook '(#[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)

 org-confirm-shell-link-function 'yes-or-no-p
 outline-isearch-open-invisible-function 'outline-isearch-open-invisible
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

 org-confirm-elisp-link-function 'yes-or-no-p
 org-speed-command-hook '(org-speed-command-activate 
org-babel-speed-command-activate)
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)

 org-link-shell-confirm-function 'yes-or-no-p
 org-babel-pre-tangle-hook '(save-buffer)
 org-agenda-loop-over-headlines-in-active-region nil
 org-occur-hook '(org-first-headline-recenter)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-link-parameters '(("attachment" :follow org-attach-follow 
:complete org-attach-complete-link) ("id" :follow org-id-open) ("eww" 
:follow org-eww-open :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)
       ("w3m" :store org-w3m-store-link) ("doi" :follow 
org-link-doi-open :export org-link-doi-export) ("file+sys") 
("file+emacs") ("shell" :follow org-link--open-shell) ("news" :follow 
#[514 "\301\300\302%4Q%2\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL 
ARG)"])
       ("mailto" :follow #[514 "\301\300\302%4Q%2\"\207" 
["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("https" :follow #[514 
"\301\300\302%4Q%2\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL 
ARG)"]) ("http" :follow #[514 "\301\300\302%4Q%2\"\207" ["http" 
browse-url ":"] 6 "\n\n(fn URL ARG)"])
       ("ftp" :follow #[514 "\301\300\302%4Q%2\"\207" ["ftp" 
browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("help" :follow 
org-link--open-help :store org-link--store-help) ("file" :complete 
org-link-complete-file) ("elisp" :follow org-link--open-elisp))

 org-metaup-hook '(org-babel-load-in-session-maybe)
 )


Help mastering indentation

2022-09-04 Thread Ypo

Hi!

I am studying in org mode, I love it, I prefer it over some university 
books which have poor typography.



But when it comes to displaying each paragraph, I perceive it like very 
difficult: filling, unfilling, wrapping, adaptive wrapping, indent... 
and it seems that emacs and org-mode have their own functions.



Is there a way to mastering paragraphs displaying?


What I would like to achieve is to display unfilled paragraphs in 
org-mode, with the first line indented, and hyphenation at the end of 
the lines. Could this be done just using the functions in emacs?


Best regards


[#C] Story behind priorities in org-mode?

2022-08-29 Thread Ypo
Reading this web, 
https://christopherfin.com/emacs/programmer_priorities.html made me 
think about the syntax of priorities in org-mode.


What is the story behind [#A], etc?


Re: Could a .bib file be edited and organized in an "org-mode" way and still work as a .bib file?

2022-08-23 Thread Ypo
I asked some months ago about the possibility of using an ORG file at 
the same time as bibliography and as a notebook.


https://lists.gnu.org/archive/html/emacs-orgmode/2021-10/msg00619.html


It seems someone is making it possible :-D

https://gist.github.com/andras-simonyi/eda0daa0b677838022fd7c438b6eadfa

https://www.reddit.com/r/emacs/comments/wqjare/comment/iku77h0/?utm_source=share&utm_medium=web2x&context=3






Re: desktop-restore-eager doesn't seem to affect desktop-lazy-idle-delay

2022-08-20 Thread Ypo

Oh, right, sorry.

El 20/08/2022 a las 13:52, Ihor Radchenko escribió:

Ypo  writes:


- Expected behavior:

(desktop-restore-eager t) should “override” (desktop-lazy-idle-delay),
making this variable equivalent to (desktop-lazy-idle-delay nil).

Did you mean to send this to Emacs debbugs? This is Org mailing list.


desktop-restore-eager doesn't seem to affect desktop-lazy-idle-delay

2022-08-20 Thread Ypo

Not sure if a bug:

- My desktop is creating buffers lazily, with idle delay = 200 seconds. 
Variables:


(desktop-lazy-idle-delay 200)

(desktop-restore-eager t)


- Expected behavior:

(desktop-restore-eager t) should “override” (desktop-lazy-idle-delay), 
making this variable equivalent to (desktop-lazy-idle-delay nil).


Re: Dates in headlines

2022-08-16 Thread Ypo

I found it again:

"If the headline contains a timestamp, it is removed from the link, 
which results in a wrong link—you should avoid putting a timestamp in 
the headline."


https://orgmode.org/manual/Handling-Links.html#FOOT28





this iirc has been obsolete for many years and ime and on ml never was
an issue.  i tried to find out why it was mentioned but did not find
anything.  it might have been an ambiguity in the manual to do with
active tses like in your example?  e.g. the agenda will remove the
active ts at least in certain cases, but that is a deliberate feature.

i successfully rely on inactive as below.  they are sorted by the ts.
a capture template inserts them.

much better than date trees for my case.  always show, sorted at
bottom, no hierarchy, nothing out of sync, can scan and bisect to find
an entry or get a sense of number, can change a ts and sort again,
looks the same in the agenda, etc.


* LOG [2021-07-01 Thu] vulcans mediating with klingons
* LOG [2021-06-28 Mon 15:44] brawl.  scottie of course :(.
* LOG [2021-06-28 Mon 15:44] hauled away AS garbage?
* LOG [2021-06-28 Mon 15:44] klingons said garbage scow


On 6/28/22, Ypo  wrote:
>/I think I've read somewhere that it is a "bad practice" to use dates in/
>/headlines, is it correct? I haven't found it in the manual./
>
>/Like:/
>
>/ <2022-06-29 mi. 10:30> Meeting/
>
>/Best regards/
>
*From*: Samuel Wales
*Subject*:  Re: Dates in headlines
*Date*: Tue, 28 Jun 2022 16:23:02 -0700



Re: Suggestion: default path for attachments

2022-08-14 Thread Ypo

Love it. Thanks!

El 14/08/2022 a las 9:36, Ihor Radchenko escribió:

Ihor Radchenko  writes:


See org-global-properties-fixed

Or rather org-global-properties, which is an actual user customization.


Suggestion: default path for attachments

2022-08-14 Thread Ypo

Could it be possible to customize a default folder for attachments?


- I am using inheritance (org-attach-use-inhetirance).

- But in the headlines in the first level, the :DIR: property needs to 
be set by hand, always.


- I would like to have a default attachment folder which would be 
"inherited" by all headlines.



Not sure if that could be a good idea for "org attach group easy 
customization" menu.


Or if at least I could "hack" it.


Best regards


Re: org-latex preview on Windows

2022-08-07 Thread Ypo

Hi Jeremie

In my emacs it works great. Even org-fragtog that allows you to edit in 
an interactive manner.


- Just in case it could be helpfult, these are the lines in my init file 
that I can find related to LaTeX:


(custom-set-variables

 '(org-preview-latex-image-directory "~/borrar/ltximg/")

 '(preview-TeX-style-dir "~/.emacs.d/elpa/auctex-13.0.11/latex" t))


- I installed LaTeX following these instructions:

https://ikaruga2.wordpress.com/2011/06/14/latex-emacs-and-orgmode-in-windows/


- I have edited the Windows System Variable "Path" and added to it:

C:\Program Files\MiKTeX\miktex\bin\x64\


I hope that helps




El 07/08/2022 a las 18:00, emacs-orgmode-requ...@gnu.org escribió:

Date: Sat, 06 Aug 2022 18:11:46 +0200
From: Jeremie Juste
To:emacs-orgmode@gnu.org
Subject: org-latex preview on Windows
Message-ID:<87h72pwdvh@gmail.com>
Content-Type: text/plain

Hello everyone,

I have had difficulties using  org-latex-preview to run properly on Windows.
The main issue seems to be that the user name on windows gets abbreviated
with ~. As far as I understand this generate problems as the temporary
folder cannot be found.

see for instance these posts
https://emacs.stackexchange.com/a/70119

and an old post from Vincente Vera
https://list.orgmode.org/CAMfbzvDPLS1eqXJ=7tzh1035z3vq4q4-yjmqsvbcgxzp8kd...@mail.gmail.com/

Vincente, suggests altering the temporary environment variable
(setenv "TEMP" "C:\Temp"). I have tried this option and place it in my
.init file but the Temporary file in org-mode uses does not change.


As a work around I modified the function org-compile-file in lisp/org/
org-macs.el
by adding altering the source variable as such

  (let* ((source (replace-regexp-in-string "JEREMI~1" "JeremieJuste"
source))

This is obviously not an ideal solution but I cannot find any other
solution immediately. Have someone else come across the same issue on
Windows? Do you have any suggestions?

Best regards,
Jeremie
Org mode version 9.5.4
GNU Emacs 28.1

Suggestion with footnotes when toggling headlines into plain lists

2022-08-06 Thread Ypo
When turning headlines into plain lists ~(org-ctrl-c-minus)~, I think 
footnotes should be moved to the bottom of the main headline.


Example; Original headlines:

* Main headline
** Headline 1
 [fn:1]

[fn:1] 
* Headline 2


~C-c -~ turns that into a list where footnotes definitions can't be 
found. It gives, for example, problems when exporting or when more 
footnotes are added:


* Main headline
- Headline 1
   [fn:1]

  [fn:1] 
- Headline 2


The desired outcome, could be something like this:

* Main headline
- Headline 1
   [fn:1]
- Headline 2
[fn:1] 




Re: Could an "org-anniversary" be a PROPERTY?

2022-07-17 Thread Ypo

It works! Thanks, Ihor.

How could I've known? Should I've known?



El 18/07/2022 a las 1:49, Ihor Radchenko escribió:

Ypo  writes:


I am starting to use org-contacts and wanted to unify my existing
"Birthdays" list, with the new formatted contacts I am creating.

Do the anniversaries have to be out of PROPERTIES?

Example: This is not "parsed into agenda":

:PROPERTIES:
:BDAY: %%(org-anniversary 1980 02 19)
:END:

Try

:BDAY: <%%(org-anniversary 1980 02 19)>

(diary sexp-style timestamp)

Best,
Ihor


Could an "org-anniversary" be a PROPERTY?

2022-07-17 Thread Ypo
I am starting to use org-contacts and wanted to unify my existing 
"Birthdays" list, with the new formatted contacts I am creating.


Do the anniversaries have to be out of PROPERTIES?

Example: This is not "parsed into agenda":

:PROPERTIES:
:BDAY: %%(org-anniversary 1980 02 19)
:END:

BTW: Thanks for your advices with org-capture. I found too a very useful 
introductory video from Protesilaos (I wasn't able to understand the 
documentation till I watched this video): https://youtu.be/qCdScs4YO8k


Imposible to set :weight Light for a font

2022-07-03 Thread Ypo

Hi

Another noob X file:

I can't set ":weight Light" for a font.


If I set it using the "Menu, Options, Set Default font, Cascadia Mono - 
style Light"; the text in the buffer changes correctly;


https://i.postimg.cc/htZ4rL2w/1.jpg

but in the init.el the :family changes into "Cascadia Mono Light".

https://i.postimg.cc/VL3Dbp8H/2.jpg

When restarting, it seems that family "Cascadia Mono Light" doesn't 
exist, so the default font family changes by itself into "Frank Ruhl 
Hofshi".


In the customization buffer family is "Frank Ruhl Hofshi",

https://i.postimg.cc/y8Kg3yDz/3.jpg

but in the init.el family is "Cascadia Mono Light".

https://i.postimg.cc/XqFqpr3J/4.jpg



If I set in the customization buffer (:family Cascadia Mono :weight 
light) the default font in the buffers doesn't acquire the :weight light.


In the init.el it appears :family "Cascadia Mono" :weight light.

In the customization buffer weight goes back to "normal".

https://i.postimg.cc/QxmsSQ6D/5.jpg


Could it be related with light and Light capitalization?

Could it be some kind of curse for using a non free font?


Re: Dates in headlines

2022-06-29 Thread Ypo

Thanks, Jean and Samuel, I will keep using them without remorse then :-)

Best regards!



El 28/06/2022 a las 23:13, Jean Louis escribió:
> On 2022-06-28 12:06, Ypo wrote:
>> I think I've read somewhere that it is a "bad practice" to use dates
>> in headlines, is it correct? I haven't found it in the manual.
>>
>> Like:
>>
>>  <2022-06-29 mi. 10:30> Meeting
>>
>> Best regards
>
> In many of my notes I use dates in titles of the section. Note 
creation is not always equal to date to which not relates. When it is 
useful, use it.


El 29/06/2022 a las 1:23, Samuel Wales escribió:

this iirc has been obsolete for many years and ime and on ml never was
an issue.  i tried to find out why it was mentioned but did not find
anything.  it might have been an ambiguity in the manual to do with
active tses like in your example?  e.g. the agenda will remove the
active ts at least in certain cases, but that is a deliberate feature.

i successfully rely on inactive as below.  they are sorted by the ts.
a capture template inserts them.

much better than date trees for my case.  always show, sorted at
bottom, no hierarchy, nothing out of sync, can scan and bisect to find
an entry or get a sense of number, can change a ts and sort again,
looks the same in the agenda, etc.


* LOG [2021-07-01 Thu] vulcans mediating with klingons
* LOG [2021-06-28 Mon 15:44] brawl.  scottie of course :(.
* LOG [2021-06-28 Mon 15:44] hauled away AS garbage?
* LOG [2021-06-28 Mon 15:44] klingons said garbage scow


On 6/28/22, Ypo  wrote:

I think I've read somewhere that it is a "bad practice" to use dates in
headlines, is it correct? I haven't found it in the manual.

Like:

 <2022-06-29 mi. 10:30> Meeting

Best regards


Dates in headlines

2022-06-28 Thread Ypo
I think I've read somewhere that it is a "bad practice" to use dates in 
headlines, is it correct? I haven't found it in the manual.


Like:

 <2022-06-29 mi. 10:30> Meeting

Best regards


Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-26 Thread Ypo

Thanks, Bruno

I will save your advice for future debugging :-)


Maybe you could use the keys that are already defined by org, to move
between list items ?


 ‘S-’
 ‘S-’
  Jump to the previous/next item in the current list, but only if
  ‘org-support-shift-select’ is off(6).  If not, you can still use
  paragraph jumping commands like ‘C-’ and ‘C-’ to quite
  similar effect.


That requires me to change hands position, I must think about it.

Best regards :-)

El 26/06/2022 a las 21:13, Bruno Barbier escribió:

Ypo  writes:


Thanks, Bruno

I've debugged it manually because (keymap-lookup) doesn't seem to exist
in my emacs, if that's possible.

Sorry, my bad. 'keymap-lookup' will only exist in 29.  I should have
used 'lookup-key':

  (lookup-key global-map (kbd "C-u"))
  

The problem comes from:

(define-key org-mode-map (kbd "C-u C-n") #'org-next-item)

If I eval that line, "C-u C-SPC" stops working on org-mode.

Same problem in runemacs -q. Is it a bug?

That line is the problem. It's hiding the real "C-u"
(universal-argument) in org-mode buffers. Once you've lost the standard
meaning of "C-u", you can't use C-u C-SPC and all other functions.

Maybe you could use the keys that are already defined by org, to move
between list items ?


 ‘S-’
 ‘S-’
  Jump to the previous/next item in the current list, but only if
  ‘org-support-shift-select’ is off(6).  If not, you can still use
  paragraph jumping commands like ‘C-’ and ‘C-’ to quite
  similar effect.

Bruno




El 25/06/2022 a las 9:47, Bruno Barbier escribió:

Hi Ypo,

Ypo   writes:


Hi, Bruno

Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
  (error "C-u has been redefined"))


I'm not sure in what way it didn't work and I didn't try bug-hunter yet.


FWIW, just in case it might help you, when I have such a problem, I just
define a function, something like:

 (defun my-check-bug ()
   "Throw an error when C-u is not the universal argument in org-mode."
   (with-temp-buffer
 (org-mode)
 (unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
   (error "C-u has been redefined"


Then I add:

 (my-check-bug)
 
everywhere in my init files and I start emacs with --debug-init.


Good luck,

Bruno



Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-26 Thread Ypo

Thanks, Bruno

I've debugged it manually because (keymap-lookup) doesn't seem to exist 
in my emacs, if that's possible.


The problem comes from:

(define-key org-mode-map (kbd "C-u C-n") #'org-next-item)

If I eval that line, "C-u C-SPC" stops working on org-mode.

Same problem in runemacs -q. Is it a bug?


El 25/06/2022 a las 9:47, Bruno Barbier escribió:

Hi Ypo,

Ypo  writes:


Hi, Bruno

Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
 (error "C-u has been redefined"))


I'm not sure in what way it didn't work and I didn't try bug-hunter yet.


FWIW, just in case it might help you, when I have such a problem, I just
define a function, something like:

(defun my-check-bug ()
  "Throw an error when C-u is not the universal argument in org-mode."
  (with-temp-buffer
(org-mode)
(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
  (error "C-u has been redefined"


Then I add:

(my-check-bug)

everywhere in my init files and I start emacs with --debug-init.


Good luck,

Bruno



Re: Tribute to org-anki

2022-06-24 Thread Ypo

Better video quality, I hope:

https://youtu.be/JyXaGiaCeOA

El 25/06/2022 a las 3:40, Ypo escribió:


I am studying a matter and I wanted to make some tests.

I've found that org-anki <https://github.com/eyeinsky/org-anki> allows 
to use org-mode notes to generate anki flashcards, so I could play 
with them on the mobile.


I've done a video as tribute to org-anki, quite poor, but in 7 minutes 
I was able to generate 40 flashcards. I am sure it could be done in 
half the time, but here is where I am by now:


reddit post:

https://www.reddit.com/r/orgmode/comments/vk3u44/orgmode_notes_to_anki_thanks_to_organki/


Youtube video:

https://youtu.be/kTYQKuq5KPM




Tribute to org-anki

2022-06-24 Thread Ypo

I am studying a matter and I wanted to make some tests.

I've found that org-anki  allows 
to use org-mode notes to generate anki flashcards, so I could play with 
them on the mobile.


I've done a video as tribute to org-anki, quite poor, but in 7 minutes I 
was able to generate 40 flashcards. I am sure it could be done in half 
the time, but here is where I am by now:


reddit post:

https://www.reddit.com/r/orgmode/comments/vk3u44/orgmode_notes_to_anki_thanks_to_organki/


Youtube video:

https://youtu.be/kTYQKuq5KPM




Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-24 Thread Ypo

Hi Ihor.

elisp-bug-hunter sadly seems to have some bug, so I can't use it 
interactively anymore.


https://github.com/Malabarba/elisp-bug-hunter/issues/29

You are right, about the .org files though.

Thanks

El 25/06/2022 a las 2:53, Ihor Radchenko escribió:

Ypo  writes:


Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
 (error "C-u has been redefined"))

You can also bisect interactively instead of using assertion.
Note that your assertion is not expected to catch anything considering
that the problem is only present inside .org files.

Best,
Ihor

Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-24 Thread Ypo

Thanks, Greg.

Yes, I wanted to jump to the mark with C-u C-SPC.

Thanks

El 24/06/2022 a las 18:06, Greg Minshall escribió:

Ypo,

fwiw, [C-h k C-SPC] has a paragraph that says

With prefix argument (e.g., C-u C-SPC), jump to the mark, and set the mark from
position popped off the local mark ring (this does not affect the global
mark ring).  Use C-x C-@ to jump to a mark popped off the global
mark ring (see ‘pop-global-mark’).


i don't know if that helps at all.

cheers, Greg

Re: C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-24 Thread Ypo

Hi, Bruno

Yes, I tried your assertion for bug-hunter, but it didn't work.

(unless (eq 'universal-argument (keymap-lookup global-map "C-u"))
   (error "C-u has been redefined"))

And you are right: In Emacs with -Q, C-u C-SPC works, but describe-key 
C-u C-SPC doesn't work.


Probably, in the near future, I will have to dissect my .init file by hand.

Thanks!


El 24/06/2022 a las 19:31, Bruno Barbier escribió:


Ypo  writes:


C-h k C-u C-SPC returns:

C-u C-SPC is undefined

In my emacs (28 and 29), with or without "-Q":

 C-h k C-u
=>
(universal-argument)

My emacs doesn't let me query:

C-h k C-u C-SPC


What about your question about debugging in the other thread ? Did you
try what I suggested there ?

    Subject: Re: Elisp assertion for debugging
To: Ypo, Org-mode
Date: Sun, 19 Jun 2022 21:11:55 +0200



Bruno



C-SPC works; C-u C-SPC doesn't. How could be?

2022-06-24 Thread Ypo

Hi

I have a weird problem that only happens in org-mode. I know very 
little, but I can't think how could this could be possible:


C-SPC works, but

C-u C-SPC doesn't work.

In emacs -q it works as it should, though.


C-h k C-SPC returns:

C-SPC runs the command set-mark-command (found in global-map),
which is an interactive native compiled Lisp function in
‘simple.el’.

It is bound to C-@, C-SPC.

(set-mark-command ARG)

...



C-h k C-u C-SPC returns:

C-u C-SPC is undefined




Elisp assertion for debugging

2022-06-19 Thread Ypo

I am trying to debug my init file: C-u prefix is not working.

I am using the elisp-bug-hunter package that has saved me many times in 
the past. But it doesn't work fine this time though, so it seems I need 
an “assertion elisp” to debug my init file.


What elisp expression would return nil when C-u prefix works and non-nil 
when C-u prefix doesn't work?


I have tried

(eq (key-binding "C-u C-SPC") 'nil)

but it is probably a nonsense.

Best regards


Re: Keybinding doubt about ARG

2022-06-19 Thread Ypo

Working, thanks Bruno!

I needed it, because what I was using is not working well:

(global-set-key (kbd "M-n") (kbd "C-u 1 C-v"))

From some time ago, it doesn't work in .org buffers, although it works 
in elisp buffers.


In .org buffers I receive this message:

After 0 kbd macro iterations: command-execute: Keyboard macro terminated 
by a command ringing the bell


Best regards

El 19/06/2022 a las 18:49, Bruno Barbier escribió:

Ypo  writes:


Is it possible to use ARG when defining keybindings?

For the command (scroll-up-command &optional ARG) I want to define this
keybind:


(define-key global-map (kbd "M-n") 'scroll-up-command 1)


But:

eval-region: Wrong number of arguments: define-key, 4

I don't think that 'define-key' allows to specify extra arguments.

But, you can easily define your own command.

 (defun my-scroll-up-of-1 ()
   (interactive)
   (scroll-up-command 1))

 (define-key global-map (kbd "M-n") 'my-scroll-up-of-1)


Keybinding doubt about ARG

2022-06-19 Thread Ypo

Is it possible to use ARG when defining keybindings?

For the command (scroll-up-command &optional ARG) I want to define this 
keybind:



(define-key global-map (kbd "M-n") 'scroll-up-command 1)


But:

eval-region: Wrong number of arguments: define-key, 4


How to report typos in the documentation?

2022-05-29 Thread Ypo

If we find a typo, how should it be reported?

For example, in org footnote section:

   …This can be nil, to place footnotes locally at the end of the
   current outline node.  **If** can also be the name of a special
   outline heading under which footnotes should be put.


Re: # Comments export

2022-05-29 Thread Ypo

Thanks for your effort, Ihor

But that code is so difficult for me, that I can barely understand it.

El 29/05/2022 a las 3:19, Ihor Radchenko escribió:

Ypo  writes:


I wanted to export my # comments so I could share my notes with more people, 
using HTML export. I would export all of them.

But, as it seems not possible, I think I will use footnotes. I liked # comments more, 
because their face can be customized and because they are nearer to the commented text 
(although footnotes can be moved manually wherever user wants to), # comments are like 
more "natural".

It is actually possible, but you will need to write an
org-export-before-parsing-hook that will convert all the comments into
exportable elements.

Not tested, but the hook might be something like

(defun org-export-replace-comments (_)
"Replace all the comments with note blocks."
   (org-element-cache-map
(lambda (comment)
  (setf (buffer-substring (org-element-property :begin comment) 
(org-element-property :end comment))
   (format "#+begin_note\n%s\n#+end_node\n" (org-element-property 
:value comment
:granularity 'element
:restrict-elements '(comment)))

Best,
Ihor

Re: # Comments export

2022-05-28 Thread Ypo
Hi, Timothy

I wanted to export my # comments so I could share my notes with more people, 
using HTML export. I would export all of them.

But, as it seems not possible, I think I will use footnotes. I liked # comments 
more, because their face can be customized and because they are nearer to the 
commented text (although footnotes can be moved manually wherever user wants 
to), # comments are like more "natural".

Best regards

29 may 2022 1:15:52 Samuel Wales :

> to op: do you mean to sometimes export comments and sometimes not?
> 
> 
> On 5/28/22, Timothy  wrote:
>> Hi Ypo,
>> 
>> Well, `#+begin_comment' is for content you /don’t/ want exported, but if you
>> want to
>> add a note to be included in exports, try `#+begin_note'.
>> 
>> All the best,
>> Timothy
>> 
> 
> 
> -- 
> The Kafka Pandemic
> 
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com



Re: # Comments export

2022-05-28 Thread Ypo

Thanks, Timothy

Do you mean blocks like #+BEGIN_COMMENT ?

Does that kind of blocks already exist?


https://i.ibb.co/xHJDgCR/Captura.jpg


Ypo

El 28/05/2022 a las 17:44, Timothy escribió:


Hi Ypo,

As I understand it, the whole point of comments is that they’re not 
exported. Perhaps you’re looking for note blocks instead?


All the best,
*Timothy*

*From*: Ypo <mailto:"Ypo"; >
*Subject*: # Comments export
*To*: Org-mode <mailto:"Org-mode"; >
*Date*: Sat, 28 May 2022 22:58:28 +0800

Is it possible to export the (# comments)? I haven't seen that option 
in org export general customization.


I am making some (# comments) to texts, and I would like to export 
them when I export the subtree to HTML.



Best regards,

Ypo


# Comments export

2022-05-28 Thread Ypo
Is it possible to export the (# comments)? I haven't seen that option in 
org export general customization.


I am making some (# comments) to texts, and I would like to export them 
when I export the subtree to HTML.



Best regards,

Ypo


Fwd: Help with my first elisp

2022-05-24 Thread Ypo



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 can 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)
))



Re: Help with my first elisp

2022-05-22 Thread Ypo

Thanks, Greg

 * Now I am able to run my script every time I am in logos-focus mode :D
 * But my keys don't get to be "normal" after I get out of logos-focus
   mode.

This is how my code is evolving (the "conditional part" is not working yet):

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

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

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

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

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

(defun salto ()
  (interactive)
  (if posicion 1
    (posicion2)
  (if posicion 2
  (posicion3)
    (if posicion 3
    (posicion1)

;; (define-key global-map (kbd "SPC") #'salto)
(local-set-key "j" 'posicion1)
(local-set-key "k" 'posicion2)
(local-set-key "l" 'posicion3)
))


El 22/05/2022 a las 15:27, Greg Minshall escribió:

Ypo,


Additional problem: I don't know how to recover keys 1, 2 and 3 to
their normal functioning, right now I can't type 1, 2 or 3 on my
Emacs. xD

you have, e.g.,


(define-key global-map (kbd "1") #'posicion1)
(define-key global-map (kbd "2") #'posicion2)
(define-key global-map (kbd "3") #'posicion3)

but, that is in the global map.  for a given mode, i sometimes do
something like that:


(add-hook 'mh-show-mode-hook #'(lambda ()
  (local-set-key "q" 'mh-show-execute-commands)))

or, closer to what you have, sometimes like


 (define-key mh-letter-mode-map
  (kbd "C-c s")
  'ggm-mh-sentaddrs-completion)

i am no elisp expert, and so those are just random things i've found
that work.  but, hopefully this may give you a hint of a direction to
follow.

cheers, Greg

Help with my first elisp

2022-05-22 Thread Ypo

Hi


After thinking about learning elisp for years, today I've tried my first 
script. First I made some macros that worked as I intended, and then 
using this tutorial of Protesilaos I was able to transform those macros 
into elisp code.


https://protesilaos.com/codelog/2022-01-31-learning-emacs/
(thanks a lot)


My situation: I am using Protesilaos' package logos, and I would like to 
add to it something (a hook?): to mark the position where my eyesight 
must go. Example:


https://www.tiktok.com/@yporg/video/7100510074342280454?is_from_webapp=1&sender_device=pc&web_id=7100507416085399046


My problems:

 * I don't know how to make my code work always and only when in
   logos-mode.
 * I get those jumps pressing 1, 2 and 3. I would like to use just 1
   key (for example SPACEBAR) not 3 keys to run the function.


My code:


(defun posicion1 ()
  (interactive)
  (next-line 1)
  (beginning-of-visual-line)
  (forward-char 6)
)


(defun posicion2 ()
  (interactive)
  (forward-char 23)
)


(defun posicion3 ()
  (interactive)
  (end-of-visual-line) ;;C-e
  (backward-char 7)
)

(define-key global-map (kbd "1") #'posicion1)
(define-key global-map (kbd "2") #'posicion2)
(define-key global-map (kbd "3") #'posicion3)


Additional problem: I don't know how to recover keys 1, 2 and 3 to their 
normal functioning, right now I can't type 1, 2 or 3 on my Emacs. xD



I think it could be interesting to use just SPC, instead of 1, 2 and 3. 
Maybe it could be done using conditionals, like in this not-working example:


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


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


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


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




(defun salto ()
  (interactive)
  (if posicion 1
    (posicion2))
  (if posicion 2
    (posicion3))
  (if posicion 3
    (posicion1))
)

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



Any help, advice, warning, or menace are welcome.

Best regards :-)


Re: I can't set dabbrev to respect the writen case

2022-05-17 Thread Ypo

Hi, acdw

I am trying your package, but I see no list of expansion candidates. 
When I eval hippie-completing-read, it just inserts one candidate.


Thanks for your work,
Ypo


On 2022-05-16 (Monday) at 12:25, Ypo  wrote:

>/Thanks, Samuel/
>
>/I've uninstalled fancy-dabbrev, and it seems to work when I complete /
>/using M-/. But, now I don't have candidates to choose the completion. /
>/Any advice with this?/
>

I also wrote the package `hippie-completing-read'[1] to give a nicer UI (in my
opinion) to the hippie-expand command.

[1]:https://github.com/duckwork/hippie-completing-read

--
~ acdw
acdw.net | breadpunk.club/~breadw




Re: I can't set dabbrev to respect the writen case

2022-05-16 Thread Ypo

Thanks a lot, Tim. I am saving those options to try them.

Ypo

El 17/05/2022 a las 2:53, Tim Cross escribió:

Ypo  writes:


Thanks, Samuel

I've uninstalled fancy-dabbrev, and it seems to work when I complete using M-/. 
But, now I don't have candidates to choose the
completion. Any advice with this?

Best regards,
Ypo


You might want to have a look at the corfu and cape packages.

https://github.com/minad/corfu
https://github.com/minad/cape

The corfu packages is basically a completions UI package built on-top of
built-in Emacs completion functionality while cape is a set of
completions at point functions which has support for dabbrv (and
others).

Alternatively, if your a copmany mode user, I believe there are company
dabbrv modes you can install. Company is probably more mature in the
sense it has been around for some time. However, I like the underlying
principals of corfu (i.e. leverage of existing Emacs functionality
rather than re-inventing it).

I did find with corfu and cape that it took a bit of experimentation and
use to get things 'just right'. However, once you have it working and
are use to it, I find it works well (I'm using Emacs 28 and 29(.

  1   2   >