[O] Bug: org-refile with active region does not update LOGBOOKs of all entries [9.2.1 (9.2.1-23-g126a37-elpaplus @ /home/eush/.emacs.d/elpa/org-plus-contrib-20190218/)]

2019-02-22 Thread Eugene Sharygin
Hi,

I have `org-log-refile` in my configuration set to `time`, which makes
`org-refile` add a time stamp to the LOGBOOK drawer at the target
location.

However, when `org-refile` is called with active region containing
multiple entries, only LOGBOOK of the first entry is updated.

For example,

* NEW foo
* NEW bar

after refiling as one active region, looks at the target location like
this:

* NEW foo
:LOGBOOK:
- Refiled on [2019-02-23 Sat 03:41]
:END:
* NEW bar

Expected result:

* NEW foo
:LOGBOOK:
- Refiled on [2019-02-23 Sat 03:41]
:END:
* NEW bar
:LOGBOOK:
- Refiled on [2019-02-23 Sat 03:41]
:END:

-- Eugene

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05
Package: Org mode version 9.2.1 (9.2.1-23-g126a37-elpaplus @ 
/home/eush/.emacs.d/elpa/org-plus-contrib-20190218/)



Re: [O] [PATCH] ob-emacs-lisp: Set `lexical-binding' in source editing buffers

2019-02-22 Thread Sebastian Miele
On Tue, Feb 12, 2019 at 9:41 AM Nicolas Goaziou  wrote:
>
> [...]
>
> Thank you! Some comments follow.
>
> > -`eval', which see.")
> > +`eval', which see. And it is used as the value for
> > +`lexical-binding' in buffers created by `org-edit-src-code'.")
>
> You need to add two spaces after full stops.
>
> > +(defun org-babel-emacs-lisp-lexical (lexical)
> > +  "Convert :lexical source block argument LEXICAL into the form
> > +appropriate for `lexical-binding' and the LEXICAL argument to
> > +`eval'."
>
> The first sentence in a docstring needs to fit on a single line.
>
> Could you add a test or two for that feature? Could you also add an
> ORG-NEWS entry?

I did all the changes you suggested. I will send the new patch after I
managed to setup and get acquainted with mail in Emacs (mu4e).



[O] shift dates in timestamp range

2019-02-22 Thread Yasushi SHOJI
Hi,

Is there a way to change both start and end date in timestamp range?
Given that the following timestamp range with `|` as the current cursor

CLOCK: [2019-02-2|2 Fri 12:00]--[2019-02-22 Fri 21:00] =>  9:00

I'd like to `S-Right` and get

CLOCK: [2019-02-2|3 Sat 12:00]--[2019-02-23 Sat 21:00] =>  9:00

I thought I saw the function somewhere but couldn't find it.

TIA,
-- 
  yashi



Re: [O] Org can't export inline image link to PDF

2019-02-22 Thread Vladimir Lomov
Hello,
** stardiviner [2019-02-22 17:16:41 +0800]:

> 
> Nicolas Goaziou  writes:
> 
>> Hello,
>>
>> stardiviner  writes:
>>
>>> Here is the screenshot in attachment, you can see the characters 23.bb
>>> left side of the inline image.
>>>
>>> The original Org inline image format is:
>>>
>>> ```org
>>> #+ATTR_ORG: :width 200
>>> #+ATTR_LATEX: :width 2.0in
>>> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
>>> [[file:data/images/me_picture%2023.jpg]]
>>
>> Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the
>> LaTeX code generated by Org?
>>
>> Maybe LaTeX experts could chime in.
> 
> I checked the =Resume.tex= file. The raw latex is this:
> 
> #+begin_src latex
> \begin{center}
> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
> \end{center}
> #+end_src
> 
> No "23.bb", I search over the whole TeX file, nothing found. But the
> compiled PDF file still have "23.bb".

May be you find what '.bb' file is if you look into the 'graphics'
package documentation (assuming that you use TeX Live run 'texdoc
graphicx', in my local copy on page 13 there is example of .bb file,
search the document for .ps.bb).

As for spaces in file name, if you cannot avoid them use 'grffile'
package with 'graphicx' package.

>>
>> Regards,
> 
> 
> --
> [ stardiviner ]
>I try to make every word tell the meaning what I want to express.
> 
>Blog: https://stardiviner.github.io/
>IRC(freenode): stardiviner, Matrix: stardiviner
>GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
> 

P.S. The question how the .bb file comes on scene completely related how
LaTeX works with graphic file. Look into documentation or ask question
on TeX.SO or on texhax mailing list.

---
WBR, Vladimir Lomov

-- 
Will this never-ending series of PLEASURABLE EVENTS never cease?


signature.asc
Description: PGP signature


Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Samuel Wales
ok, i can't follow this so thanks for the comments.  i'll trust that
you know what you are doing.

however, fyi, long ago, i discovered various bugs in this newline
area, most of which were trackable to outline mode's decision to
define an entry as ending before its final newline.

most users and many writers of code are likely to mark a region by
going to bol, not eol.  they don't likely think the region should end
before the final newline, in most cases.

but org calls some outline function or two that grabs or narrows to or
marks a region that is shorter by 1 char than imo it should be.

i reported one bug, which joined two lines [including headers], that
had remained unfixed for many years.

this is probably because noticing certain types of data corruption /at
the time of corruption/ can sometimes be tricky.  thus, linking it to
user behavior or org code changes can be tricky and the bug report
would be like "um, i have no mwe but...".

in this particular case, when you did find joined lines, it was likely
to be long after the corruption.  [low s/n.]

the problem was that when you sorted headers in a narrowed region, it
joined lines.  the region was off by one because the outline function
is [imo] off by one.

it would not surprise me if long-term users checked their files now
for joined lines, such as headers, they'd find old corruption.


On 2/22/19, Leo Vivier  wrote:
> Hello,
>
> Samuel Wales  writes:
>
>> i have not been able to follow this conversation, but is it possible
>> that /all/ of this complexity is due to outline-mode's dubious choice
>> of not considering the final newline in an entry to be part of an
>> entry?
>
> I don't know much about outline-mode, but I doubt it would be the case.
> In my email sent on Thu, 21 Feb 2019 16:41:43 +0100, I've investigated
> the problem, and one of my conclusions was the following:
>
> [START]
> Going back to our example, if narrowing to a 1-line subtree included
> that last newline, we could delete it inside our narrowed buffer.  If
> that newline was also the beginning of a new subtree, the subtree
> would not be functional anymore, since we'd end up with something like
> this: `*Subtree 1* Subtree 2'.
> -[END]-
>
> So, if we kept the newline, we'd put the user at risk of breaking the
> following subtree.  An option could be to protect that newline by
> modifying our deletion commands, but after having done that in a
> previous implementation, it'd bring its fair share of complexity.
>
> From my point of view, I do not see it as 'complex', but rather as a
> different way from doing what we'd been doing so far.  Most of the
> functions are only *slightly* modified to preserve the ambiguous
> newline.
>
> HTH.
>
> Best,
> --
> Leo Vivier
> English Studies & General Linguistics
> Master Student, English Department
> Université Rennes 2
>


-- 
The Kafka Pandemic: 

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.



Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Leo Vivier
Hello,

Samuel Wales  writes:

> i have not been able to follow this conversation, but is it possible
> that /all/ of this complexity is due to outline-mode's dubious choice
> of not considering the final newline in an entry to be part of an
> entry?

I don't know much about outline-mode, but I doubt it would be the case.
In my email sent on Thu, 21 Feb 2019 16:41:43 +0100, I've investigated
the problem, and one of my conclusions was the following:

[START]
Going back to our example, if narrowing to a 1-line subtree included
that last newline, we could delete it inside our narrowed buffer.  If
that newline was also the beginning of a new subtree, the subtree
would not be functional anymore, since we'd end up with something like
this: `*Subtree 1* Subtree 2'.
-[END]-

So, if we kept the newline, we'd put the user at risk of breaking the
following subtree.  An option could be to protect that newline by
modifying our deletion commands, but after having done that in a
previous implementation, it'd bring its fair share of complexity.

>From my point of view, I do not see it as 'complex', but rather as a
different way from doing what we'd been doing so far.  Most of the
functions are only *slightly* modified to preserve the ambiguous
newline.

HTH.

Best,
-- 
Leo Vivier
English Studies & General Linguistics
Master Student, English Department
Université Rennes 2



Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Samuel Wales
i have not been able to follow this conversation, but is it possible
that /all/ of this complexity is due to outline-mode's dubious choice
of not considering the final newline in an entry to be part of an
entry?

-- 
The Kafka Pandemic: 

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.



Re: [O] URL storage and search - Bookmark+ vs Org Mode

2019-02-22 Thread Samuel Wales
there are firefox extensions that will export all tabs to custom
format.  thus you could set org links.  i do not know whether there
are any that can import custom format.

however, before webextensions, there was a firefox extension that had
both features.  thus there might already be a webextension that can
import and export org links to the clipboard.

not quite as awesome as a hypothetical org-capture with selection of
tabs and import, but i found it useful.


On 2/22/19, Roland Everaert  wrote:
> I have discovered récently, the extension "Export Tabs URLs". I suppose I
> could build a function to read the data from the produced file and convert
> all the entry to org. The only hard part is to check for duplicates, I
> suppose.
>
>
> On Thu, Feb 21, 2019 at 5:05 AM Samuel Wales  wrote:
>
>> org agenda search can find urls, as can isearch, all, occur, etc.
>>
>> org-capture extension can save to org from gui browser.
>>
>> copy all urls extension used to save all tabs from firefox in org link
>> format.  idk what teh best replacement is for webextension.
>>
>> in principle, it should be possible to create a gui browser extension
>> in which you can open all selected headers' urls in the gui browser.
>> and also mark tabs in gui browser save to org headers with a tag.
>> thus, you could have a topic dedicated to researching food processors
>> [or whatever topic], and load up a set of tabs, then edit those tabs
>> in firefox, then save back to org.  optionally deleting the ones with
>> that tag that are not being saved.  however, it's just an idea.
>>
>>
>> On 2/20/19, stardiviner  wrote:
>> >
>> > I use Org Mode to store all bookmarks. I save it as "Bookmarks.org",
>> > then use helm-org-rifle to quick locate the category headline, if
>> > failed
>> > find wanted bookmarks, then use Isearch to search text. You can create
>> > a
>> > helper command to quickly auto open bookmarks org file, and auto toggle
>> > quick locating and search. All in one command. Using Org, you can add
>> > extra info anything you want to take note about bookmarks, not just URL
>> > and title.
>> >
>> > Roland Everaert  writes:
>> >
>> >> Hello,
>> >>
>> >> I am still debating with myself which one is the most appropriate to
>> store
>> >> and
>> >> search for URLs.
>> >>
>> >> The bookmark(+) feature is interesting because it provides a dedicate
>> >> interface for bookmarking any kind of resources including URLs, but I
>> >> find the interface to search for bookmarks and to jump between
>> >> different
>> >> bookmark file strange if not inefficient.
>> >>
>> >> On the other hand, Org-mode don't provide any dedicated interface
>> >> for storing and searching URLs, but switching from Org Mode file to
>> >> the
>> >> next one and searching for data is much more intuitive.
>> >>
>> >> Hence, what is the experience of the community with both tools and how
>> >> you store your internet bookmarks, both to store a particular article
>> >> or
>> >> the
>> >> home page of a website?
>> >>
>> >>
>> >> Thanks for your time,
>> >>
>> >> Roland Everaert.
>> >
>> >
>> > --
>> > [ stardiviner ]
>> >I try to make every word tell the meaning what I want to
>> > express.
>> >
>> >Blog: https://stardiviner.github.io/
>> >IRC(freenode): stardiviner, Matrix: stardiviner
>> >GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>> >
>> >
>>
>>
>> --
>> The Kafka Pandemic: 
>>
>> What is misopathy?
>>
>> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>>
>> The disease DOES progress. MANY people have died from it. And ANYBODY
>> can get it at any time.
>>
>>
>


-- 
The Kafka Pandemic: 

What is misopathy?
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.



Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Leo Vivier
Hello again,

Leo Vivier  writes:

> You'll find those three patches at the bottom alongside another with all
> the patches until now squashed together (except the patch for
> `org-remove-timestamp-with-keyword' which wasn't related).

I ended up sending the wrong patch, i.e. the one for
`org-remove-timestamp-with-keyword'.  You'll find the squashed patch
below.

Sorry for that.

Best,
-- 
Leo Vivier
English Studies & General Linguistics
Master Student, English Department
Université Rennes 2
>From c00c911f06ba059b61d8246f25e679f06a8f8491 Mon Sep 17 00:00:00 2001
From: Leo Vivier 
Date: Thu, 21 Feb 2019 00:16:27 +0100
Subject: [PATCH] Fix narrowed 1-line subtrees (squashed)

* lisp/org.el (org-add-planning-info): Ensure insertion in current
  restriction.
  (org-remove-timestamp-with-keyword): Respect ambiguous newline when
  narrowed to 1-line-subtree.
  (org-remove-empty-drawer-at): Respect ambiguous newline when
  narrowed to 1-line subtree.
  (org-entry-delete): Respect ambiguous newline when narrowed to
  1-line subtree.
  (org-log-beginning): Ensure insertion in current restriction.
  (org-store-log-note): Ensure insertion in current restriction.

* lisp/org-clock.el (org-clock-find-position): Ensure clock-drawer
  insertion in current restriction.
  (org-clock-in): Ensure insertion in current
  restriction.

This patch addresses multiple issues occuring when running commands on
a 1-line subtree when the buffer is narrowed to it.  A 1-line subtree
is a subtree only containing a heading and a newline at the end.

Typical problem:
---
* Tree 1
:PROPERTIES:
:TEST: t
:END:
* Tree 2
---
With point on `Tree 1', run the following:
(progn
  (org-narrow-to-subtree)
  (org-delete-property "TEST")
  (org-back-to-heading)
  (end-of-line)
  (delete-char 1)
  (widen))

Result:
---
* Tree 1* Tree 2
---

Observation:
The newline between the two headings has been removed despite the fact
that it wasn't in the buffer restriction.

The problem is due to two things:
- The way that narrowing works in Emacs, notably how restrictions are
  restored after `save-restriction'.
- The ambiguous newline between the end of a 1-line subtree and a
  following subtree.

The solution is to stop the problematic commands from interacting with
the ambiguous newline in order to preserve the narrowed region's
`point-max'.  This is done by inserting or removing newlines from
the top of a heading rather than its bottom.

Visually, instead of deleting the following bracketed region...
---
* Tree 1
{:PROPERTIES:
:TEST: t
:END:
}* Tree 2
---

We delete the following one:
---
* Tree 1{
:PROPERTIES:
:TEST: t
:END:}
* Tree 2
---

org-log-beginning: Fix drawer creation

* lisp/org.el

This commit ensures that the log-drawer for state-changes and notes is
created within the current restriction.

org-store-log-note: Fix drawer-less logging

* lisp/org.el (org-log-beginning):
---
 lisp/org-clock.el | 14 --
 lisp/org.el   | 27 +++
 2 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index b20158df6..5c9b0a1cf 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1292,6 +1292,7 @@ the default behavior."
 		(org-todo org-clock-in-switch-to-state)))
 	 (setq org-clock-heading (org-clock--mode-line-heading))
 	 (org-clock-find-position org-clock-in-resume)
+	 (forward-char -1)
 	 (cond
 	  ((and org-clock-in-resume
 		(looking-at
@@ -1315,8 +1316,8 @@ the default behavior."
 	   (sit-for 2)
 	   (throw 'abort nil))
 	  (t
-	   (insert-before-markers "\n")
-	   (backward-char 1)
+	   (insert "\n")
+	   (org-indent-line)
 	   (org-indent-line)
 	   (when (and (save-excursion
 			(end-of-line 0)
@@ -1508,12 +1509,13 @@ line and position cursor in that line."
 	  (when (and org-clock-into-drawer
 		 (or (not (wholenump org-clock-into-drawer))
 			 (< org-clock-into-drawer 2)))
-	(let ((beg (point)))
-	  (insert ":" drawer ":\n:END:\n")
+	(let ((beg (1- (point
+	  (forward-char -1)
+	  (insert "\n:" drawer ":\n:END:")
 	  (org-indent-region beg (point))
 	  (org-flag-region
-	   (line-end-position -1) (1- (point)) t 'org-hide-drawer)
-	  (forward-line -1
+	   (line-end-position 0) (point) t 'org-hide-drawer)
+	  (beginning-of-line
 	 ;; When a clock drawer needs to be created because of the
 	 ;; number of clock items or simply if it is missing, collect
 	 ;; all clocks in 

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Leo Vivier
Hello,

I've found and fixed three new functions which didn’t behave properly
when the buffer was restricted to a subtree:
* lisp/org.el (org-log-beginning): Fix drawer creation.
* lisp/org.el (org-store-log-note): Fix drawer-less logging.
* lisp/org-capture.el (org-clock-in): Fix drawer-less clocking.

You'll find those three patches at the bottom alongside another with all
the patches until now squashed together (except the patch for
`org-remove-timestamp-with-keyword' which wasn't related).

HTH.

Best,
-- 
Leo Vivier
English Studies & General Linguistics
Master Student, English Department
Université Rennes 2
>From 745e106406a5f5b296bbd9dbda9f9dbd965a2e30 Mon Sep 17 00:00:00 2001
From: Leo Vivier 
Date: Fri, 22 Feb 2019 18:03:24 +0100
Subject: [PATCH 1/3] org-log-beginning: Fix drawer creation

* lisp/org.el (org-log-beginning): Ensure insertion in current
  restriction.

This commit ensures that the log-drawer for state-changes and notes is
created within the current restriction.
---
 lisp/org.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 4c3c3cd78..f22f8b807 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13118,12 +13118,13 @@ narrowing."
 	   ;; No drawer found.  Create one, if permitted.
 	   (when create
 	 (unless (bolp) (insert "\n"))
-	 (let ((beg (point)))
-	   (insert ":" drawer ":\n:END:\n")
+	 (let ((beg (1- (point
+	   (forward-char -1)
+	   (insert "\n:" drawer ":\n:END:")
 	   (org-indent-region beg (point))
 	   (org-flag-region
-		(line-end-position -1) (1- (point)) t 'org-hide-drawer))
-	 (end-of-line -1)
+		(line-end-position 0) (point) t 'org-hide-drawer))
+	 (end-of-line 0)
   (t
(org-end-of-meta-data org-log-state-notes-insert-after-drawers)
(skip-chars-forward " \t\n")
-- 
2.20.1

>From c94c86fdac09a97267c29f7e3d4dcf5c3398 Mon Sep 17 00:00:00 2001
From: Leo Vivier 
Date: Fri, 22 Feb 2019 18:17:35 +0100
Subject: [PATCH 2/3] org-store-log-note: Fix drawer-less logging

* lisp/org.el (org-log-beginning): Ensure insertion in current
  restriction.

This commit ensures that drawer-less state-changes and notes are
created within the current restriction.
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index f22f8b807..27cd2bbd7 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13263,7 +13263,7 @@ EXTRA is additional text that will be inserted into the notes buffer."
 	 ;; Note associated to a clock is to be located right after
 	 ;; the clock.  Do not move point.
 	 (unless (eq org-log-note-purpose 'clock-out)
-	   (goto-char (org-log-beginning t)))
+	   (goto-char (1- (org-log-beginning t
 	 ;; Make sure point is at the beginning of an empty line.
 	 (cond ((not (bolp)) (let ((inhibit-read-only t)) (insert "\n")))
 	   ((looking-at "[ \t]*\\S-") (save-excursion (insert "\n"
-- 
2.20.1

>From 2fc86ae438725e5f0656c8966eaa4935e0203ee4 Mon Sep 17 00:00:00 2001
From: Leo Vivier 
Date: Fri, 22 Feb 2019 18:23:40 +0100
Subject: [PATCH 3/3] org-clock-in: Fix drawer-less clocking

* lisp/org-clock.el (org-clock-in): Ensure insertion in current
  restriction.

This commit ensures that drawer-less clock-lines are created within
the current restriction.
---
 lisp/org-clock.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 5624af32a..5c9b0a1cf 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -1292,6 +1292,7 @@ the default behavior."
 		(org-todo org-clock-in-switch-to-state)))
 	 (setq org-clock-heading (org-clock--mode-line-heading))
 	 (org-clock-find-position org-clock-in-resume)
+	 (forward-char -1)
 	 (cond
 	  ((and org-clock-in-resume
 		(looking-at
@@ -1315,8 +1316,8 @@ the default behavior."
 	   (sit-for 2)
 	   (throw 'abort nil))
 	  (t
-	   (insert-before-markers "\n")
-	   (backward-char 1)
+	   (insert "\n")
+	   (org-indent-line)
 	   (org-indent-line)
 	   (when (and (save-excursion
 			(end-of-line 0)
-- 
2.20.1

>From bb5a7feee1684cf47f1e8a29805c442c8ae64c37 Mon Sep 17 00:00:00 2001
From: Leo Vivier 
Date: Thu, 21 Feb 2019 12:44:26 +0100
Subject: [PATCH] Fix spaces with `org-remove-timestamp-with-keyword'
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/org.el (org-remove-timestamp-with-keyword): Fix space deletion
  between timestamps

When an entry had a CLOSED, a DEADLINE and a SCHEDULED timestamps,
removing the middle one caused the space between the 1st and 3rd to be
removed as well.  Checking whether we’re at the end of the line before
deleting the space fixes it.
---
 lisp/org.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org.el b/lisp/org.el
index ef6e40ca9..b8e378e73 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12944,6 +12944,7 @@ nil."
   (while (re-search-backward re beg t)
 	(replace-match "")
 	(if (and 

Re: [O] [patch] Don't show trailing colon in agenda custom command desc

2019-02-22 Thread Carlos Pita
> Applied, with some refactoring. Please double check I didn't fumble it.

I looked at the code and tested it a bit and seems to be ok. Thanks!



Re: [O] [patch] Don't show trailing colon in agenda custom command desc

2019-02-22 Thread Nicolas Goaziou
Hello,

Carlos Pita  writes:

> here is a simple patch to avoid showing ugly trailing colons in custom
> agenda commands when no matcher was specified (for example, in the
> case of alltodo).
>
> Best regards
> --
> Carlos
>
> From 4125d3ff9e4f26c3346b847288cad3e69a38da23 Mon Sep 17 00:00:00 2001
> From: memeplex 
> Date: Fri, 22 Feb 2019 00:32:58 -0300
> Subject: [PATCH] org-agenda: don't show trailing color if no matcher
>
> * lisp/org-agenda.el (org-agenda-get-restriction-and-command):
>   when no matcher was specified there is no point in showing
>   a trailing colon (and space).

Applied, with some refactoring. Please double check I didn't fumble it.

Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [patch] Improve fast todo selection alignment

2019-02-22 Thread Nicolas Goaziou
Hello,

Carlos Pita  writes:

> This avoids lines with just a closing "}", which look rather ugly.
> Quite similar to my previous patch for fast tag selection.
>
> Regards
> --
> Carlos
>
> From 239e0d036da94b2a950db3ad1f7e82c5ca6d8daa Mon Sep 17 00:00:00 2001
> From: memeplex 
> Date: Thu, 21 Feb 2019 01:09:29 -0300
> Subject: [PATCH] Fix fast todo selection menu alignment
>
> * lisp/org.el (org-fast-todo-selection): Avoid lines with just a
>   closing delimiter.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Agenda todo states autocompletion: suggestion for improvement

2019-02-22 Thread Nicolas Goaziou
Hello,

Carlos Pita  writes:

> Here is a patch inverting (1) and (2) above.
>
> From 9c97eebb6c26332415fb03c65e872d304576fe07 Mon Sep 17 00:00:00 2001
> From: memeplex 
> Date: Thu, 21 Feb 2019 16:09:58 -0300
> Subject: [PATCH] org-agenda: improve todo states completion
>
> * lisp/org-agenda.el (org-todo-list): prepare agenda buffers before
>   prompting for state.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-export links to html

2019-02-22 Thread Daniel Herzig
Perfect, thank you!

Daniel


Nicolas Goaziou  writes:

> Hello,
>
> Daniel Herzig  writes:
>
>> I'm facing an interesting issue here (emacs 25.1 & orgmode 8.2.10) when
>> exporting an org-file to html.
>>
>> In my file there is a link to the original org-file itself (the one I'm
>> working on), written as 'file:/x/y/file.org'. When exporting to .pdf,
>> .odt, or text,
>> it correctly expands to 'file:///x/y/file.org', but when I export it to
>> .html, the link expands as 'file:///x/y/file.html'.
>>
>> Does anyone have a hint, how to avoid this behaviour?
>
> See `org-html-link-org-files-as-html'.
>
> Regards,



Re: [O] org-export links to html

2019-02-22 Thread Nicolas Goaziou
Hello,

Daniel Herzig  writes:

> I'm facing an interesting issue here (emacs 25.1 & orgmode 8.2.10) when
> exporting an org-file to html.
>
> In my file there is a link to the original org-file itself (the one I'm
> working on), written as 'file:/x/y/file.org'. When exporting to .pdf,
> .odt, or text,
> it correctly expands to 'file:///x/y/file.org', but when I export it to
> .html, the link expands as 'file:///x/y/file.html'.
>
> Does anyone have a hint, how to avoid this behaviour?

See `org-html-link-org-files-as-html'.

Regards,

-- 
Nicolas Goaziou



[O] org-export links to html

2019-02-22 Thread Daniel Herzig
Hi!

I'm facing an interesting issue here (emacs 25.1 & orgmode 8.2.10) when
exporting an org-file to html.

In my file there is a link to the original org-file itself (the one I'm
working on), written as 'file:/x/y/file.org'. When exporting to .pdf,
.odt, or text,
it correctly expands to 'file:///x/y/file.org', but when I export it to
.html, the link expands as 'file:///x/y/file.html'.

Does anyone have a hint, how to avoid this behaviour?

Thanks,
Daniel




[O] org-log-post-message: is it properly reset?

2019-02-22 Thread Michaël Cadilhac
Hi there;

>From time to time, I have some spurious "Entry repeats" messages when
editing tasks that have no repetition.  I've tracked that down to
org-log-post-message being message'd in org-store-log-note, and I
can't really see anywhere where the variable is reset.  Should it be
reset after it's used in org-store-log-note?

Additionally, why is it defvar'd twice?

Cheers;
M.



[O] Supporting Exchange calendars in org-mac-iCal.el

2019-02-22 Thread Norman Walsh
Hi folks,

I don’t know if anyone else is using org-mac-iCal[*], but I find it
useful. (I find it convenient to have calendar appointments in my
agenda view.)

In the course of setting it up, I discovered that it didn’t support
Exchange calendars. And it had a regexp that didn’t match versions of
MacOS post 10.8.

I’ve fixed both of those issues, at least to the extent that they seem
to work for me. I sent email to the named author, Christopher
Suckling, but didn’t get a reply. (Hello Christopher, if you’re out
there!)

If anyone is interested, I can see about finding a place to put my
patch.

Be seeing you,
  norm

[*] https://orgmode.org/worg/org-contrib/org-mac-iCal.html

-- 
Norman Walsh  | I often marvel that while each man
http://nwalsh.com/| loves himself more than anyone else, he
  | sets less value on his own estimate
  | than on the opinions of others.--Marcus
  | Aurelius


signature.asc
Description: PGP signature


Re: [O] Bug: Links with images as description are not displayed inline in Emacs [9.2.1 (9.2.1-23-g126a37-elpa @ c:/msys64/mingw64/share/emacs/26.1/site-lisp/elpa/org-9.2.2/)]

2019-02-22 Thread Nicolas Goaziou
Hello,

"Dietrich Foethke"  writes:

> suppose I create an org file and I would like to insert a link to a
> foreign website called "http://www.mypage.org; with an image as
> description. For the image I use the local image "images/example.jpg".
> The corresponding line in org would read:
>
> [[http://www.mypage.org][file:images/example.jpg]]
>
> Now I want to display all images inline in my org buffer and type  C-x C-v>. The image example.jpg will not be displayed inline. Instead I
> do only see the line
>
> file:images/example.jpg
>
> If I swap the link and the description like this
>
> [[file:images/example.jpg][http://www.mypage.org]]
>
> the image is displayed inline. 

Fixed. Thank you.

Regards,
-- 
Nicolas Goaziou



[O] [SOLVED] Re: How to set Org to export to PDF with image background or color?

2019-02-22 Thread stardiviner


I found solution with LaTeX packages "background" and "graphics".

Here is an example:

   #+begin_src latex :mkdirp yes :tangle 
"data/code/background_test_graphics.tex"
   \documentclass{article}

   \usepackage{graphicx}
   \graphicspath{ {./images/} }

   \usepackage{background}
   \usepackage{lipsum}

   \begin{document}

   \SetBgContents{\includegraphics[width=.3\linewidth]{last-sun}}
   \SetBgPosition{current page.north}

   \pagestyle{empty}

   \title{Test LaTeX export to PDF with background}
   \lipsum[1-10]

   % \newpage\SetBgContents{} % clear background settings.

   \lipsum[1-30]
   \end{document}
   #+end_src


stardiviner  writes:

> I'm writing a simple resume with Org Mode, and exporting to PDF. I want
> to add an image or color as background for every page of resume PDF
> file. Does anyone knows how to do that?
>
> Or have some template for this?
>
> Thanks in advance. Thanks.


-- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  



Re: [O] URL storage and search - Bookmark+ vs Org Mode

2019-02-22 Thread Roland Everaert
I have discovered récently, the extension "Export Tabs URLs". I suppose I
could build a function to read the data from the produced file and convert
all the entry to org. The only hard part is to check for duplicates, I
suppose.


On Thu, Feb 21, 2019 at 5:05 AM Samuel Wales  wrote:

> org agenda search can find urls, as can isearch, all, occur, etc.
>
> org-capture extension can save to org from gui browser.
>
> copy all urls extension used to save all tabs from firefox in org link
> format.  idk what teh best replacement is for webextension.
>
> in principle, it should be possible to create a gui browser extension
> in which you can open all selected headers' urls in the gui browser.
> and also mark tabs in gui browser save to org headers with a tag.
> thus, you could have a topic dedicated to researching food processors
> [or whatever topic], and load up a set of tabs, then edit those tabs
> in firefox, then save back to org.  optionally deleting the ones with
> that tag that are not being saved.  however, it's just an idea.
>
>
> On 2/20/19, stardiviner  wrote:
> >
> > I use Org Mode to store all bookmarks. I save it as "Bookmarks.org",
> > then use helm-org-rifle to quick locate the category headline, if failed
> > find wanted bookmarks, then use Isearch to search text. You can create a
> > helper command to quickly auto open bookmarks org file, and auto toggle
> > quick locating and search. All in one command. Using Org, you can add
> > extra info anything you want to take note about bookmarks, not just URL
> > and title.
> >
> > Roland Everaert  writes:
> >
> >> Hello,
> >>
> >> I am still debating with myself which one is the most appropriate to
> store
> >> and
> >> search for URLs.
> >>
> >> The bookmark(+) feature is interesting because it provides a dedicate
> >> interface for bookmarking any kind of resources including URLs, but I
> >> find the interface to search for bookmarks and to jump between different
> >> bookmark file strange if not inefficient.
> >>
> >> On the other hand, Org-mode don't provide any dedicated interface
> >> for storing and searching URLs, but switching from Org Mode file to the
> >> next one and searching for data is much more intuitive.
> >>
> >> Hence, what is the experience of the community with both tools and how
> >> you store your internet bookmarks, both to store a particular article or
> >> the
> >> home page of a website?
> >>
> >>
> >> Thanks for your time,
> >>
> >> Roland Everaert.
> >
> >
> > --
> > [ stardiviner ]
> >I try to make every word tell the meaning what I want to express.
> >
> >Blog: https://stardiviner.github.io/
> >IRC(freenode): stardiviner, Matrix: stardiviner
> >GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
> >
> >
>
>
> --
> The Kafka Pandemic: 
>
> What is misopathy?
>
> https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
>
> The disease DOES progress. MANY people have died from it. And ANYBODY
> can get it at any time.
>
>


Re: [O] Org can't export inline image link to PDF

2019-02-22 Thread stardiviner


Nicolas Goaziou  writes:

> Hello,
>
> stardiviner  writes:
>
>> Here is the screenshot in attachment, you can see the characters 23.bb
>> left side of the inline image.
>>
>> The original Org inline image format is:
>>
>> ```org
>> #+ATTR_ORG: :width 200
>> #+ATTR_LATEX: :width 2.0in
>> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我
>> [[file:data/images/me_picture%2023.jpg]]
>
> Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the
> LaTeX code generated by Org?
>
> Maybe LaTeX experts could chime in.

I checked the =Resume.tex= file. The raw latex is this:

#+begin_src latex
\begin{center}
\includegraphics[width=2.0in]{data/images/me_picture 23.jpg}
\end{center}
#+end_src

No "23.bb", I search over the whole TeX file, nothing found. But the
compiled PDF file still have "23.bb".

>
> Regards,


--
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3