Re: [O] Backward incompatible outline-invisible-p change in emacs master for Org

2017-06-14 Thread Paul Rankin
On Thu, 15 Jun 2017, at 03:18 AM, Kaushal Modi wrote:
> On Wed, Jun 14, 2017 at 1:02 PM Bastien Guerry  wrote:
> 
> > The question is: why this patch in the first place?  Paul authored it
> > and I committed it, so I should know--but I don't.  Maybe Paul know or
> > you know better?
> >
> 
> I later found the reason for that commit here:
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24073
> 
> Here is the emacs -Q recipe that Paul posted on that debbugs report:
> 
> 1. emacs -Q
> 2. insert ";;; heading"
> 3. M-: (outline-on-heading-p)
> => t
> 4. C-a
> 5. M-: (put-text-property (point) (1+ (point)) 'invisible 'foo)
> 6. M-; (outline-on-heading-p)
> => nil
> 
> Expected results:
> 
> (outline-on-heading-p)
> => t
> 
> Actual results:
> 
> (outline-on-heading-p)
> => nil
> 
> This shows the relation between outline-on-heading-p and
> outline-invisible-p:
> 
> (defun outline-on-heading-p ( invisible-ok)
>   "Return t if point is on a (visible) heading line.
> If INVISIBLE-OK is non-nil, an invisible heading line is ok too."
>   (save-excursion
> (beginning-of-line)
> (and (bolp) (or invisible-ok (not (outline-invisible-p)))
> (looking-at outline-regexp
> 
> Basically the expectation is that a outline heading be not marked as
> "invisible" by any 'foo invisible property. Outline headings should be
> marked invisible by only 'outline invisible property.
> 
> Also as the function is prefixed with "outline-", that kind of makes sense.
> 
> On the other hand, in org, we need a function that returns non-nil for
> *any* invisible property. So that commit breaks org's expectation.
> 
> This looks fine,
> 
> 
> Thanks.
> 
> 
> > but I'd rather revert the faulty Emacs commit if
> > it is not necessary.
> >
> > Until Paul enlighten us, I'll have a deeper look.
> >
> 
> After reviewing debbugs 24073, the commit looks correct for emacs master
> and outline package. WDYT?

Glad the mystery looks like it's solved.

Btw I looped in the orgmode list back here 
http://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00029.html

Thanks.

--
www.paulwrankin.com



Re: [O] bug#24073: 25.1-rc2

2016-09-02 Thread Paul Rankin
Eli Zaretskii <e...@gnu.org> on Wed, 31 Aug 2016 17:25 +0300:
> > From: Paul Rankin <he...@paulwrankin.com>
> > Date: Wed, 31 Aug 2016 12:56:13 +1000
> > Cc: 24...@debbugs.gnu.org
> > 
> > >> The fix seems trivial to me so I'm wondering if there is anything 
> > >> holding it 
> > >> up from being included in 25?
> > > 
> > > Yes, the fact that Emacs 25 is for all practical purposes already
> > > released.
> > 
> > Okay. 25.2?
> 
> I don't see why not, provided that Org developers give us their
> blessing.  Please bring this to their attention on the Org list, or
> ask them to speak up here.  I don't want us to make any changes that
> could adversely affect Org without consulting them first.

Dear Org Mode maintainers,

Looping you in on a proposed bug fix for `outline-invisible-p'.

Briefly, the problem is the function returns non-nil for any invisible
text property when it should only do so for the outline property. As a
defsubst, it is difficult to patch for other affected programs.

Diff pasted:

--- /usr/local/Cellar/emacs/25.1-rc2/share/emacs/25.1/lisp/outline.el.gz
+++ #
@@ -388,9 +388,9 @@
  nil 'move))
 
 (defsubst outline-invisible-p ( pos)
-  "Non-nil if the character after POS is invisible.
+  "Non-nil if the character after POS has outline invisible property.
 If POS is nil, use `point' instead."
-  (get-char-property (or pos (point)) 'invisible))
+  (eq (get-char-property (or pos (point)) 'invisible) 'outline))
 
 (defun outline-back-to-heading ( invisible-ok)
   "Move to previous heading line, or beg of this line if it's a heading.

Diff finished.  Sat Sep  3 14:35:22 2016



Re: [O] Bug: org-set-tags duplicates tags in org-tag-persistent-alist

2015-05-14 Thread Paul Rankin

 On 15 May 2015, at 12:32 am, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 I cannot reproduce it in development version. You may want to switch to it.

I'm on the Org ELPA version, which appears to get updated a few times a month. 
How far apart are they?

If the alleged bug has been fixed in the development branch, is it worth then 
finding and merging with stable?


[O] Bug: org-set-tags duplicates tags in org-tag-persistent-alist

2015-05-11 Thread Paul Rankin
When setting org-tag-alist or org-tag-persistent-alist, calling org-set-tags or 
org-agenda-set-tags will populate select with both alist tags and any tags from 
tagged subheadings.

To reproduce:

$ cat tmp.org
* TODO task:tag1:
$ emacs -Q

(setq org-tag-persistent-alist
  '((tag1 . ?1)
(tag2 . ?2)))

M-x eval-last sexp
M-x find-file RET tmp.org
M-x org-set-tags

Inherited:
Current:tag1

  [1] tag1   [2] tag2   [t] tag1

tag1 is duplicated.

This also occurs if tmp.org is added to agenda and org-agenda-set-tags is 
called, however this bug *compounds* with each additional agenda file 
containing tagged subheadings, e.g. if org-agenda-files contains five org 
files, each with subheadings tagged :work: then org-agenda-set-tags will 
populate with six :work: selections (org-tag-persistent-alist plus each 
additional file).

This bug appears to have been first reported back in 2012 but not investigated:
https://lists.gnu.org/archive/html/emacs-orgmode/2012-12/msg00470.html

GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, NS apple-appkit-1347.57) of 
2015-04-21 on Pauls-MacBook-Pro.local
Org-mode version 8.2.10 (8.2.10-40-gc763fa-elpa @ 
/Users/Paul/.emacs.d/elpa/org-20150504/)




Re: [O] org for screenwriting

2014-11-19 Thread Paul Rankin
Rustom Mody rustompmody at gmail.com writes:

 
 HiI vaguely remember something about orgmode for screenwriting.Something like 
http://fountain.io/ for org available?Rusi-- 
http://www.the-magus.inhttp://blog.languager.org

Fountain mode now integrates outline mode and org-like visibility cycling.

Available via MELPA and MELPA-stable.




Re: [O] Getting org-mobile-sync to work.

2014-10-18 Thread Paul Rankin
Sharon Kimble boudic...@skimble.plus.com writes:

 I'm trying to get mobileorg set up and working

You may not have seen this:
http://mph.puddingbowl.org/2010/02/org-mode-in-your-pocket-is-a-gnu-shaped-devil/

-- 
Paul W. Rankin
http://www.paulwrankin.com




Re: [O] Other editors supporting Org-Mode

2014-10-09 Thread Paul Rankin
Manuel Schneckenreither manuel.schneckenreit...@student.uibk.ac.at
writes:

 I couldn't find anything on the web about it. Therefore, I like to ask
 you if anyone knows a program (another editor) which supports Org mode.

Apologies, I posted this to your email instead of to the group:

You might want to give Trello a look (http://trello.com). It's
web-based, so there is little chance that your technically challenged
friends will break it.

There is a bi-directional sync package for Org Mode called `org-trello'.
It works okay, but obviously lacks many of the features of Org; it's
mostly aimed at task management with teams.