[O] orgtbl in latex files: array with \hline

2018-05-29 Thread Uwe Brauer



Hi

I would like to generate the following array environment with orgtbl.

\begin{equation*}
% BEGIN RECEIVE ORGTBL laplace
\begin{array}{|c|c|}
 f(x) & \mathcal{L} \left\{ f(x) \right\} =F(s) \\ \hline
\end{array}
% END RECEIVE ORGTBL laplace
\begin{comment}
#+ORGTBL: SEND laplace orgtbl-to-latex :latex-default-table-mode math 
:environment array
| f(x)| \mathcal{L} \left\{ f(x) \right\} =F(s) 
   |
\end{comment}
\end{equation*}


How can I achieve {|c|c|} and \hline when translating the table to
latex?

Thanks

Uwe Brauer 




[O] Orgmode logo on the orgmode.org page outdated?

2018-05-29 Thread Bartłomiej Kruczyk
Hi, I've noticed that the Orgmode logo on the orgmode.org front page is not
the same as the beautiful logo we have in page's icon thumbnail. I think
the newer logo is absolutely fabulous, can we also have it in the page's
content?

Best regards
Bartłomiej Kruczyk


[O] org master: make fails

2018-05-29 Thread Julius Dittmar
Hi,

on two of my computers, both openSUSE-based with org-mode current master
and current texlive installed, make fails.

The last messages are:

make -C doc info
make[1]: Entering directory `/XXX/git/org-mode-CURRENT/doc'
emacs  -Q -batch --eval '(setq vc-handled-backends nil
org-startup-folded nil)' \
  --eval '(add-to-list '"'"'load-path "../lisp")' \
  --eval '(load "../mk/org-fixup.el")' \
  --eval '(org-make-manuals)'
Loading /XXX/git/org-mode-CURRENT/mk/org-fixup.el (source)...
Wrong number of arguments: #[(string &optional separators omit-nulls)

... followed by a long mainly empty and unreadable quoted string,
followed by ...

" [separators omit-nulls split-string-default-separators list notfirst
start t 0 nil string-match ...] 5 1648329], 4
make[1]: *** [org.texi] Fehler 255
make[1]: Leaving directory `/XXX/git/org-mode-CURRENT/doc'
make: *** [info] Fehler 2

As on the third of my computers (with an old debian and texlive 2017)
make works, I guess that's a local problem, not one of org-mode.
Nonetheless: Do you have any hints on what might be missing there, or
how I could proceed tracking down the problem?

Thanks in advance,
Julius



Re: [O] point moves and zoom level reverts when refreshing agenda

2018-05-29 Thread Marco Wahl
Hi Samuel,

> recent maint, have not tried in -Q.

Me neither.  ;)

> summary: point moves and zoom level reverts when refreshing agenda
>
> 1]
>
> i find that,
>
> when i do an agenda agenda [daily/weekly] and i have point on a task,
>
> and i go do something in the task and nearby nodes, and a bunch of
> other things, and return to the agenda,
>
> and refresh agenda view [and also just in case any of the markers god
> out of date and could cause corruption if i operated on a task from
> the agenda],
>
> that point moves from the task.  i wonder if it makes sense to try to
> keep point on the task that it was on?

I also find the point movement erratic sometimes in the agenda.  IIUC
the line number gets stored for the agenda and after agenda-redo point
is set to that line number again.

I also thought a bit about a better behavior.  One could implement a
heuristic which trys to place point at a line which looks "very much"
like the line which contained point before the redo.  But I'm not sure
how crazy that is.

> 2] i also find that refreshing resets the zoom level created using
> text-scale-increase.  i wonder if this can also be preserved.  to me,
> refreshing refers to updating the contents of the agenda view, not
> things like text scale.

This is a wanted feature AFAICT.  I think the following patch is a
reliable way to achieve the preservation of text-scale for agenda-redo.


Ciao,
 Marco

>From 7952540977a5281310edf190c81b8d811218d6ed Mon Sep 17 00:00:00 2001
From: Marco Wahl 
Date: Tue, 29 May 2018 17:59:46 +0200
Subject: [PATCH] org-agenda: Keep text-scale at agenda-redo

* lisp/org-agenda.el (org-agenda-redo):  Save and restore `text-scale-mode-amount'.
---
 lisp/org-agenda.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 24b752498..8eab8fe43 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7318,7 +7318,9 @@ in the agenda."
 		   (cons (or cpa (car last-args)) (cdr last-args)))
 		  ((stringp last-args)
 		   last-args
-	 (series-redo-cmd (get-text-property p 'org-series-redo-cmd)))
+	 (series-redo-cmd (get-text-property p 'org-series-redo-cmd))
+	 (before-text-scale-mode-amount
+	  (when (boundp' text-scale-mode-amount) text-scale-mode-amount)))
 (put 'org-agenda-tag-filter :preset-filter nil)
 (put 'org-agenda-category-filter :preset-filter nil)
 (put 'org-agenda-regexp-filter :preset-filter nil)
@@ -7350,6 +7352,7 @@ in the agenda."
   (when re  (org-agenda-filter-apply re 'regexp)))
 (and top-hl-filter (org-agenda-filter-top-headline-apply top-hl-filter))
 (and cols (called-interactively-p 'any) (org-agenda-columns))
+(and before-text-scale-mode-amount (text-scale-set before-text-scale-mode-amount))
 (org-goto-line line)
 (recenter window-line)))
 
-- 
2.17.0



Re: [O] Adding single cell movement to org-table

2018-05-29 Thread Chris Kauffman
All-

Attached are the updated patches for single cell movement in org tables.

Notes:
- Implemented all of Nicolas Goaziou's suggestions on this with some
caveats described below

- Part of the logic of the code requires boundary checking. I used the
(org-table-analyze) to set variables org-table-current-ncol and
org-table-dlines which are the limits of the table. This eliminated an
internal helper function in the original version.

- I made several of the functions internal with the naming convention
`org-table--name' as per Nicolas' suggestion

- Checks for in-table and table alignment are in the top-level functions
`org-table-move-single-cell-up' etc.; I kept alignment in as otherwise the
table looks awful as cells move around

- Modified org.el to bind these to Shift-up and the like as per Carsten's
suggestion

- Tests defined in testing/lisp/org-test-table.el and I've done a fair
amount of interactive testing to ensure the behavior looks correct.

- Not sure if the patches will work exactly correctly due to the large gap
in time between my initial work and completion; let me know if things don't
look correct.

- Attempted to get close to a correctly formatted commit messages but do
make any necessary formatting changes for compliance.

Cheers,
Chris Kauffman

On Fri, May 4, 2018 at 7:18 PM, stardiviner  wrote:

> That's really great. Thanks.
>
> --
> [ stardiviner ] don't need to convince with trends.
>Blog: https://secure-web.cisco.com/1hJRqsuxlpwmP971H8dAeGulRNSKNY
> 87qhElIE0kGFNVU8wi5u2jTzEhayLSBa8GhYPZPyxSM3aWcEqi0yTtMPyedB
> ey2od2ROikNbAYTnTptEFLNGp6HovNx1ukbSykVmN4jthKPhqhL-
> zPqBtiblX6c8EibrNqBfI2YR_DfuTSNew8YeBmyRu0Mr_
> et5PfrTaMoyrIurSC1ogXRXRMh8ds6CXnNjU7bhWZeOcjRQfyLbssZQ-
> zuRp5pSm2JMyC0h7QmqikJC6pNGBrSYPaxd37aLkMNyqhF6LyEpq2LrpWkms4s56sq9R4_
> MUrvT16dpqMPPcp1pfA1DAaPt0DBOlZIDWuieyVZSmscuGyWN6hhiYyTc0EY-_
> iwmxe0UCfRK4t0adbHcAj0cYCdGjgliGOk9jHInQTGngBOSNT_htY/https%
> 3A%2F%2Fstardiviner.github.io%2F
>IRC(freenode): stardiviner
>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>
>
>
From 6f50526fa642ea74716dd4668e2b36b0ff9c6134 Mon Sep 17 00:00:00 2001
From: Chris Kauffman 
Date: Sun, 23 Jul 2017 00:13:11 -0400
Subject: [PATCH 1/8] org-table: Adding single cell movement functions and
 tests.

* org-mode/lisp/org-table.el: New functions for single table cell
  movement such as (org-table-move-single-cell-down)
* testing/lisp/test-org-table.el: Added tests for single table cell
  movement such as (test-org-table/move-single-cell-down)
---
 lisp/org-table.el  |  71 ++
 testing/lisp/test-org-table.el | 385 +
 2 files changed, 456 insertions(+)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index 37e40de1e..2b80bfc3a 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1436,6 +1436,77 @@ non-nil, the one above is used."
 			 (t (setq min mean)
 	   (if above min max))
 
+;;;###autoload
+(defun org-table-max-line-col ()
+  "Return the maximum line and column of the current table as a
+list of two numbers"
+  (when (not (org-at-table-p))
+(user-error "Not in an org-table"))
+  (let ((table-end (org-table-end)))
+(save-mark-and-excursion
+ (goto-char table-end)
+ (org-table-previous-field)
+ (list (org-table-current-line) (org-table-current-column)
+
+;;;###autoload
+(defun org-table-swap-cells (row1 col1 row2 col2)
+  "Swap two cells indicated by the coordinates provided"
+  (let ((content1 (org-table-get row1 col1))
+	(content2 (org-table-get row2 col2)))
+(org-table-put row1 col1 content2)
+(org-table-put row2 col2 content1)
+(org-table-align)))
+
+;;;###autoload
+(defun org-table-move-single-cell (direction)
+  "Move the current cell in a cardinal direction according to the
+parameter symbol: 'up 'down 'left 'right. Swaps contents of
+adjacent cell with current one."
+  (unless (org-at-table-p)
+(error "No table at point"))
+  (let ((drow 0) (dcol 0))
+(cond ((equal direction 'up)(setq drow -1))
+	  ((equal direction 'down)  (setq drow +1))
+	  ((equal direction 'left)  (setq dcol -1))
+	  ((equal direction 'right) (setq dcol +1))
+	  (t (error "Not a valid direction, must be one of 'up 'down 'left 'right")))
+(let* ((row1 (org-table-current-line))
+	   (col1 (org-table-current-column))
+	   (row2 (+ row1 drow))
+	   (col2 (+ col1 dcol))
+	   (max-row-col (org-table-max-line-col))
+	   (max-row (car max-row-col))
+	   (max-col (cadr max-row-col)))
+  (when (or (< col1 1) (< col2 1) (> col2 max-col) (< row2 1) (> row2 max-row))
+	(user-error "Cannot move cell further"))
+  (org-table-swap-cells row1 col1 row2 col2)
+  (org-table-goto-line row2)
+  (org-table-goto-column col2
+
+;;;###autoload
+(defun org-table-move-single-cell-up ()
+  "Move a single cell up in a table; swap with anything in target cell"
+  (interactive)
+  (org-table-move-single-cell 'up))
+
+;;;###autoload
+(defun org-table-move-single-cell-down ()
+  "Move