Re: Newbie Questions on Spreadsheets

2022-05-19 Thread Quiliro Ordóñez
El 2022-05-19 18:14, Jun Inoue escribió:
> Hi Quiliro!  This $ is actually not a money amount, but it has special
> meaning within org-mode spreadsheets.  Have a look at this page:
> https://orgmode.org/manual/Advanced-features.html

Nice!  Thanks.
 
‘$’Fields in this row can define parameters for formulas. For
example, if a field in a ‘$’ row contains ‘max=50’, then formulas in
this table can refer to the value 50 using ‘$max’. Parameters work
exactly like constants, only that they can be defined on a per-table
basis.




Re: Trouble producing nicely aligned org tables from emacs-jupyter code blocks using latest org version

2022-05-19 Thread Mark Barton
Richard,

You might want to check to see if pulsar is a good replacement for beacon. I 
had been using beacon for a while and switched recently. I don’t use 
Jupiter-python blocks any more because of some compatibility issues I 
experienced because I chose to compile Emacs from the master branch. I found 
the python blocks met my needs. He is the link to the pulsar package if you are 
interested. I found it much easier to config what actions cause the line to 
pulse to find point.
https://github.com/protesilaos/pulsar 

Mark

> On May 19, 2022, at 11:16 AM, Richard H. Stanton  
> wrote:
> 
> After a lot of bisecting my init.el to create the simplest possible example 
> that shows the problem, I found that removing the package beacon makes 
> everything work OK, both in sync and async mode.
> 
> 
> 
>> On May 19, 2022, at 6:37 AM, Ihor Radchenko  wrote:
>> 
>> Richard Stanton  writes:
>> 
>>> A bit more experimenting shows that asynchronous execution is actually a 
>>> part of my original problem. By default, I have jupyter-python blocks 
>>> running asynchronously. In that case, the tables don’t format quite right, 
>>> as I noted. But if I add the header ":async nil", the table comes out fine. 
>>> Table formatting is OK in python blocks with or without asynchronous 
>>> execution. 
>> 
>> Can you also see the problem without using jupyter-python?
>> A detailed recipe starting from emacs -Q would help (see
>> https://orgmode.org/manual/Feedback.html)
>> 
>> Best,
>> Ihor
> 
> 



Re: Newbie Questions on Spreadsheets

2022-05-19 Thread Jun Inoue
On Thu, May 19, 2022 at 10:47 PM Quiliro Ordóñez  wrote:

> El 2022-05-18 21:13, Jun Inoue escribió:
>
> > 1. How do you apply a column formula?
> >
> > The info manual mentions C-u C-c *, but this doesn't always work.  For
> > example, I have
> >
> > | $ |  |   |
> > |   | 2.80 |   |
> > |   | 5.53 |   |
> > #+TBLFM: $3=$2
> >
> > and typing C-u C-c * inside the table changes nothing.  If I remove
> > the $ cell the C-u C-c * does update the whole table, so could it be a
> > bug in the handling of $?
>
> I changed the `$' for `dollars' and it worked for me.  I am a newbie
> too.
>
>
Hi Quiliro!  This $ is actually not a money amount, but it has special
meaning within org-mode spreadsheets.  Have a look at this page:
https://orgmode.org/manual/Advanced-features.html

-- 
Jun Inoue


Re: Trouble producing nicely aligned org tables from emacs-jupyter code blocks using latest org version

2022-05-19 Thread Richard H. Stanton
Here’s a simple init.el that shows the problem (most of it is just boilerplate 
code to use straight.el to manage packages, and you may need to edit the python 
executable path).

---

;;; straight
(defvar bootstrap-version)
(let ((bootstrap-file
   (expand-file-name "straight/repos/straight.el/bootstrap.el" 
user-emacs-directory))
  (bootstrap-version 5))
  (unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
 
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el;
 'silent 'inhibit-cookies)
  (goto-char (point-max))
  (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

;;  Replace use-package with straight-use-package
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
(setq use-package-verbose t)
(straight-use-package 'use-package-ensure-system-package)


;;; Which org-mode to use?

; (straight-use-package '(org :type git :repo 
"https://code.orgmode.org/bzg/org-mode.git;))
(straight-use-package '(org :type built-in))

;;; Find python executable
(setq exec-path (append '("/Users/stanton/anaconda3/bin") exec-path))

(use-package org
  :after (jupyter)
  :straight t
  :config
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((python . t)
 (jupyter . t

(use-package jupyter)

;; Make cursor more visible when you move a long distance
(use-package beacon :config (beacon-mode 1))

——

Now execute the following source block and you’ll see the misaligned table.

#+begin_src jupyter-python :async yes :session py
[['aaa', 'a'], None, ['b', 'b']]
#+end_src

Commenting out the last line of init.el, thus not loading the beacon package, 
gets things to work OK. But so does changing which version of org mode is 
loaded by commenting out one of the lines and uncommenting the other, so this 
is not only about the beacon package.

Best,

Richard





> On May 19, 2022, at 11:16 AM, Richard H. Stanton  
> wrote:
> 
> After a lot of bisecting my init.el to create the simplest possible example 
> that shows the problem, I found that removing the package beacon makes 
> everything work OK, both in sync and async mode.
> 
> 
> 
>> On May 19, 2022, at 6:37 AM, Ihor Radchenko  wrote:
>> 
>> Richard Stanton  writes:
>> 
>>> A bit more experimenting shows that asynchronous execution is actually a 
>>> part of my original problem. By default, I have jupyter-python blocks 
>>> running asynchronously. In that case, the tables don’t format quite right, 
>>> as I noted. But if I add the header ":async nil", the table comes out fine. 
>>> Table formatting is OK in python blocks with or without asynchronous 
>>> execution. 
>> 
>> Can you also see the problem without using jupyter-python?
>> A detailed recipe starting from emacs -Q would help (see
>> https://orgmode.org/manual/Feedback.html)
>> 
>> Best,
>> Ihor
> 




Re: Default attributes for images in beamer export

2022-05-19 Thread Eric S Fraga
On Thursday, 19 May 2022 at 17:17, ed...@openmail.cc wrote:
> #+BIND: org-latex-image-default-width 0.5\textwidth

Try

#+BIND: org-latex-image-default-width "0.5\\textwidth"

and make sure org-export-allow-bind-keywords is set to t.  

-- 
: Eric S Fraga, with org release_9.5.3-507-g4f0f24 in Emacs 29.0.50



Re: Trouble producing nicely aligned org tables from emacs-jupyter code blocks using latest org version

2022-05-19 Thread Richard H. Stanton
After a lot of bisecting my init.el to create the simplest possible example 
that shows the problem, I found that removing the package beacon makes 
everything work OK, both in sync and async mode.



> On May 19, 2022, at 6:37 AM, Ihor Radchenko  wrote:
> 
> Richard Stanton  writes:
> 
>> A bit more experimenting shows that asynchronous execution is actually a 
>> part of my original problem. By default, I have jupyter-python blocks 
>> running asynchronously. In that case, the tables don’t format quite right, 
>> as I noted. But if I add the header ":async nil", the table comes out fine. 
>> Table formatting is OK in python blocks with or without asynchronous 
>> execution. 
> 
> Can you also see the problem without using jupyter-python?
> A detailed recipe starting from emacs -Q would help (see
> https://orgmode.org/manual/Feedback.html)
> 
> Best,
> Ihor




Re: [tip] Export and open a PDF in Android via Termux

2022-05-19 Thread Juan Manuel Macías
Eric S Fraga writes:

> Same with me.  I have to have a smartphone as our institution made the
> decision to remove all landlines and have all staff use MS Teams as our
> work "phone".  I use termux to give me access to Emacs + org so that I
> at least get some real use out of the "smart"phone.

Smartphones are the opium of the 21st century... And worst of all, they
will become the new identity cards. For example, until recently I could
do transactions with my bank through its website. But now it is
mandatory to have a smartphone and download an application, of course
proprietary.

Anyway, termux and Emacs, without a physical keyboard, is torture. I
usually connect a compact mechanical keyboard that I have for my laptop.

By the way, I've noticed how easy it is to write Elisp functions that
call Termux commands from Emacs. I recently wrote this to send SMS (you
can enter the phone number directly or choose a contact saved in BBDB
data base, if you use BBDB). To see the list of contacts it works better
if you use also some completion framework like ivy or helm:

(defun send-sms ()
  (interactive)
  (save-window-excursion (bbdb ".+"))
  (let* ((tlf (if (yes-or-no-p "Enter a contact: ")
  (let ((record (bbdb-get-records "Contact: ")))
(aref
 (car (aref (car record) 5)) 1))
(read-from-minibuffer "Phone number: ")))
 (sms (read-from-minibuffer "Texto del SMS: "))
 (cmd (format "termux-sms-send -n %s %s" tlf sms)))
(call-process-shell-command cmd)))

Best regards,

Juan Manuel



Default attributes for images in beamer export

2022-05-19 Thread edgar

Hello,

I am trying to set the default height (or width) of all pictures for  
my Beamer  slides (ox-beamer) for a single file. How can I do it?


I am currently trying this:


#+begin_src org

#+BIND: org-latex-image-default-width 0.5\textwidth
#+property: :latex-image-default-width 0.6\regheight

* Test

** Slide:B_block:
:PROPERTIES:
:BEAMER_env: block
:END:

#+name: testing
#+caption: this figure
[[file:../some.png]]

#+begin_src emacs-lisp
  (org-version)
#+end_src

#+RESULTS:
: 9.5.2

#+begin_src emacs-lisp
  (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,  
cairo version 1.17.6)

:  of 2022-04-20

#+end_src

and I get this
#+begin_src latex
% Created 2022-05-19 Thu 19:12
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usetheme{default}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.1 (Org mode 9.5.2)},
 pdflang={English}}
\begin{document}

\begin{frame}{Outline}
\tableofcontents
\end{frame}


\begin{frame}[label={sec:orgaf83f29},fragile]{Test}
 \begin{block}{Slide}
\begin{figure}[htbp]
\centering
\includegraphics{../some.png}
\caption{\label{fig:orga0f8614}this figure}
\end{figure}

\begin{verbatim}
(org-version)
\end{verbatim}

\begin{verbatim}
(emacs-version)
\end{verbatim}
\end{block}
\end{frame}
\end{document}
#+end_src


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [BUG] HTML export of buffer with fringe indicators

2022-05-19 Thread Daniel Fleischer
Ihor Radchenko [2022-05-19 Thu 21:43] wrote:

> What if you try to run M-: (htmlize-buffer) 
> on your file?

It works, creating an HTML buffer that can be opened and looks good. 

-- 

Daniel Fleischer



Re: Bug in 9.5.3 org--file-default-apps

2022-05-19 Thread Max Nikulin

On 19/05/2022 20:39, Ihor Radchenko wrote:

Max Nikulin writes:

On 18/05/2022 18:36, Ihor Radchenko wrote:


The behaviour is dependent on the OS-level mailcap defaults. What does
(mailcap-mime-info nil) return for you?


view-mode

   ^


run-mailcap --norun ~/path/to/script


Note that mailcap.el does _not_ use run-mailcap or anything external. It
is written purely in elisp.

So, can you please report the output of M-: (mailcap-mime-info nil)?


view-mode




Re: Newbie Questions on Spreadsheets

2022-05-19 Thread Quiliro Ordóñez
El 2022-05-18 21:13, Jun Inoue escribió:

> 1. How do you apply a column formula?
> 
> The info manual mentions C-u C-c *, but this doesn't always work.  For
> example, I have
> 
> | $ |  |   |
> |   | 2.80 |   |
> |   | 5.53 |   |
> #+TBLFM: $3=$2
> 
> and typing C-u C-c * inside the table changes nothing.  If I remove
> the $ cell the C-u C-c * does update the whole table, so could it be a
> bug in the handling of $?

I changed the `$' for `dollars' and it worked for me.  I am a newbie
too.



Re: [BUG] HTML export of buffer with fringe indicators

2022-05-19 Thread Ihor Radchenko
Daniel Fleischer  writes:

> Ihor Radchenko [2022-05-18 Wed 20:54] wrote:
>
>> Can you set debug-on-error to t and share the full backtrace?
>
> Attached.
> ...
>   htmlize-buffer-1()

What if you try to run M-: (htmlize-buffer) 
on your file?

Best,
Ihor



Re: Bug in 9.5.3 org--file-default-apps

2022-05-19 Thread Ihor Radchenko
Max Nikulin  writes:

> On 18/05/2022 18:36, Ihor Radchenko wrote:
>> Max Nikulin writes:
>> 
>>> Sounds reasonable. However I just have tried a [[file:~/path/to/script]]
>>> link running Org main HEAD and the file is opened in emacs (26.3) other
>>> window.
>> 
>> The behaviour is dependent on the OS-level mailcap defaults. What does
>> (mailcap-mime-info nil) return for you?
>
> view-mode
>
> run-mailcap --norun ~/path/to/script

Note that mailcap.el does _not_ use run-mailcap or anything external. It
is written purely in elisp.

So, can you please report the output of M-: (mailcap-mime-info nil)?

Best,
Ihor



Re: Trouble producing nicely aligned org tables from emacs-jupyter code blocks using latest org version

2022-05-19 Thread Ihor Radchenko
Richard Stanton  writes:

> A bit more experimenting shows that asynchronous execution is actually a part 
> of my original problem. By default, I have jupyter-python blocks running 
> asynchronously. In that case, the tables don’t format quite right, as I 
> noted. But if I add the header ":async nil", the table comes out fine. Table 
> formatting is OK in python blocks with or without asynchronous execution. 

Can you also see the problem without using jupyter-python?
A detailed recipe starting from emacs -Q would help (see
https://orgmode.org/manual/Feedback.html)

Best,
Ihor



Org-cite rocks!

2022-05-19 Thread Christian Moe
Hi,

This is just to say that I've finally got around to testing org-cite
with citeproc.el and it's awesome. A big thanks to Bruce, András,
Nicolas and everyone else who's been patiently chipping away at this for
years.

Yours,
Christian



Re: Org Yaap: Termux notifications for Org

2022-05-19 Thread Christian Stuermer

Hello Tyler,

thank you for sharing, I will try it out!

I'm currently trying to shift more and more from specialized apps on 
every OS to Emacs, but it's a slow process. So I'm happy for every help 
I can get. My next projects will be switching to Gnus as mailclient, 
elfeed + Emms (+ perhaps Tasker as GUI on Android) for podcasts,...


If anyone knows a good place to discuss Emacs in Termux online, please 
let me know. This combination of interests seems to be so rare, my 
questions about it feel like noise in both the Emacs and Termux subreddits.


Best,
Christian



Re: [please check] Add RET to go from overlay to edit buffer

2022-05-19 Thread Marco Wahl
Hi Ihor!

Ihor Radchenko  writes:

> Marco Wahl  writes:
>
>> Just pushed the little feature "RET to go from overlay to edit buffer".
>
> Two comments:
> 1. It would make sense to mention the new key binding in NEWS
> 2. org-edit-src-goto  binding is slightly confusing given the
>behaviour of C-c ' on a src-block being edited. C-c ' achieves the
>same, but queries a question to discard/not discard the edits.

Gaa!  I missed the functionality of C-c ' when the overlay is in place.
And by customizing org-src-ask-before-returning-to-edit-buffer the
confusing (at least for me) question goes away.

I think C-c ' is the natural binding.  No need for another one AFAICT.

I'll revert the changes.  Sorry for the fuss.


Thank you.
-- 
Marco



Re: [tip] Export and open a PDF in Android via Termux

2022-05-19 Thread Eric S Fraga
On Tuesday, 17 May 2022 at 17:56, Juan Manuel Macías wrote:
> but lately I have been forced to go back to these devices for work
> reasons, so I thought of Termux as the foreigner who is in a strange

Same with me.  I have to have a smartphone as our institution made the
decision to remove all landlines and have all staff use MS Teams as our
work "phone".  I use termux to give me access to Emacs + org so that I
at least get some real use out of the "smart"phone.

-- 
: Eric S Fraga, with org release_9.5.3-504-gcdbb1c in Emacs 29.0.50