emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-list-demote-modify-bullet and alphabetic/numerical bullets
@ 2012-04-17 13:55 Brian van den Broek
  2012-04-18 11:03 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Brian van den Broek @ 2012-04-17 13:55 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
set org-list-demote-modify-bullet to cycle on demoting between bullets
of the form  -/+ and 1./A.

(setq org-list-demote-modify-bullet
       '(("+" . "-") ("-" . "+") ))
accomplishes the -/+ cycling just fine.

(setq org-list-demote-modify-bullet
       '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
has, however, no effect on numerical nor alphabetic bullets, nor do either of

(setq org-list-demote-modify-bullet
       '(("+" . "-") ("-" . "+") ("1." . "-") ))

and

(setq org-list-demote-modify-bullet
       '(("+" . "-") ("-" . "+") ("1" . "-") ))

affect numerical bullets, so I doubt that it is that alphabetical
bullets are the problem.

Is there a way to do what I am trying to effect?

Thanks and best,

Brian vdB

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-list-demote-modify-bullet and alphabetic/numerical bullets
  2012-04-17 13:55 org-list-demote-modify-bullet and alphabetic/numerical bullets Brian van den Broek
@ 2012-04-18 11:03 ` Nicolas Goaziou
  2012-04-18 22:57   ` Brian van den Broek
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-04-18 11:03 UTC (permalink / raw)
  To: Brian van den Broek; +Cc: emacs-orgmode

Hello,

Brian van den Broek <brian.van.den.broek@gmail.com> writes:

> I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
> set org-list-demote-modify-bullet to cycle on demoting between bullets
> of the form  -/+ and 1./A.
>
> (setq org-list-demote-modify-bullet
>        '(("+" . "-") ("-" . "+") ))
> accomplishes the -/+ cycling just fine.
>
> (setq org-list-demote-modify-bullet
>        '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
> has, however, no effect on numerical nor alphabetic bullets, nor do either of
>
> (setq org-list-demote-modify-bullet
>        '(("+" . "-") ("-" . "+") ("1." . "-") ))
>
> and
>
> (setq org-list-demote-modify-bullet
>        '(("+" . "-") ("-" . "+") ("1" . "-") ))
>
> affect numerical bullets, so I doubt that it is that alphabetical
> bullets are the problem.
>
> Is there a way to do what I am trying to effect?

This should be fixed in master now.  Could you confirm this?

Thanks for reporting the problem.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-list-demote-modify-bullet and alphabetic/numerical bullets
  2012-04-18 11:03 ` Nicolas Goaziou
@ 2012-04-18 22:57   ` Brian van den Broek
  2012-04-18 23:01     ` Brian van den Broek
  0 siblings, 1 reply; 4+ messages in thread
From: Brian van den Broek @ 2012-04-18 22:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 18 April 2012 13:03, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Brian van den Broek <brian.van.den.broek@gmail.com> writes:
>
>> I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
>> set org-list-demote-modify-bullet to cycle on demoting between bullets
>> of the form  -/+ and 1./A.
>>
>> (setq org-list-demote-modify-bullet
>>        '(("+" . "-") ("-" . "+") ))
>> accomplishes the -/+ cycling just fine.
>>
>> (setq org-list-demote-modify-bullet
>>        '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
>> has, however, no effect on numerical nor alphabetic bullets, nor do either of

<snip>

> This should be fixed in master now.  Could you confirm this?
>
> Thanks for reporting the problem.
>
>
> Regards,
>
> --
> Nicolas Goaziou


Thanks for your attention to this, Nicholas.

The situation is improved, though not entirely fixed. However, the
problem may well be on my end. I tried a few settings and wasn't able
to get quite the expected behaviour; I may simply not understand the
required syntax for org-list-demote-modify-bullet.

I should also mention that I am a coward and thus don't live on the
bleeding edge. After cloning the git repo and setting up a temporary
.emacs pointing for org mode to the master branch,
M-x org-version reports:
Org-mode version 7.8.09 (release_7.8.09.236.gdbc6f)
This seems to me to confirm I have the HEAD of master as of an hour or
so ago, but it is best if more competent eyes verify this.

My minimal .emacs:
; /home/brian/code/foreign/org-mode is where my git clone lives
(setq load-path (cons "/home/brian/code/foreign/org-mode/lisp" load-path))
(setq load-path (cons "/home/brian/code/foreign/org-mode/contrib/lisp"
load-path))

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)

(setq org-directory "/home/brian/docs/org")

(setq org-default-notes-file "~/docs/org/inbox.org")

(setq org-alphabetical-lists t)

; In the comments below, "n" and "A" stand for
; arbitrary number and alpha characters in bullets
(setq org-list-demote-modify-bullet
;       '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." "1.") )
;   Works demoting n. --> A.; fails A. --> n. with
;   Wrong type argument: stringp, ("1.")

       '(("+" . "-") ("-" . "+") ("1." . "A.") ("A" "1") )
;   Works for n. --> A. However, A. --> A.

;       '(("+" . "-") ("-" . "+") ("1" . "A") ("A" "1") )
;   n. --> n. rather than to A.
)

I used a simple org file containing only:

- foo
  + bar
    - baz


1. spam
   A. ham
   B. eggs


for my tests. With the version of org-list-demote-modify-bullet active
above, demoting "B. eggs" yields "A. eggs" one level indented whereas
what is desired is "1. eggs". As noted in the comments, the earlier
commented version yields a Wrong type argument error and the item "B.
eggs" remains in place, unchanged.

Thanks for the (at least) partial progress. Is the rest my error? If
so, what setting ought I to use?

Best,

Brian vdB

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-list-demote-modify-bullet and alphabetic/numerical bullets
  2012-04-18 22:57   ` Brian van den Broek
@ 2012-04-18 23:01     ` Brian van den Broek
  0 siblings, 0 replies; 4+ messages in thread
From: Brian van den Broek @ 2012-04-18 23:01 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 19 April 2012 00:57, Brian van den Broek
<brian.van.den.broek@gmail.com> wrote:
> On 18 April 2012 13:03, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
>> Hello,
>>
>> Brian van den Broek <brian.van.den.broek@gmail.com> writes:
>>
>>> I have (setq org-alphabetical-lists t) in my .emacs. I am trying to
>>> set org-list-demote-modify-bullet to cycle on demoting between bullets
>>> of the form  -/+ and 1./A.
>>>
>>> (setq org-list-demote-modify-bullet
>>>        '(("+" . "-") ("-" . "+") ))
>>> accomplishes the -/+ cycling just fine.
>>>
>>> (setq org-list-demote-modify-bullet
>>>        '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.")))
>>> has, however, no effect on numerical nor alphabetic bullets, nor do either of
>
> <snip>
>
>> This should be fixed in master now.  Could you confirm this?
>>
>> Thanks for reporting the problem.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>
>
> Thanks for your attention to this, Nicholas.
>
> The situation is improved, though not entirely fixed. However, the
> problem may well be on my end. I tried a few settings and wasn't able
> to get quite the expected behaviour; I may simply not understand the
> required syntax for org-list-demote-modify-bullet.


Gah! It *was* operator error. I must have read it through 10 times
before sending. Just as the gmail "Undo" window closed, I saw it.

I was missing the '.' seperating the bullets. I had

       '(("+" . "-") ("-" . "+") ("1." . "A.") ("A."  "1.") )

when I needed

       '(("+" . "-") ("-" . "+") ("1." . "A.") ("A." . "1.") )

Sorry for the noise and thanks for the fix!

Sheepishly,

Brian vdB

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-18 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-17 13:55 org-list-demote-modify-bullet and alphabetic/numerical bullets Brian van den Broek
2012-04-18 11:03 ` Nicolas Goaziou
2012-04-18 22:57   ` Brian van den Broek
2012-04-18 23:01     ` Brian van den Broek

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).