emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ASCII export: Fixed a bug.
@ 2011-02-13 10:54 Valentin Wüstholz
  2011-02-13 11:44 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Valentin Wüstholz @ 2011-02-13 10:54 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

Hi,

I have attached a small patch for a bug that I reported a while ago.
See http://thread.gmane.org/gmane.emacs.orgmode/36097.

Best regards,

Valentin

[-- Attachment #2: org-ascii.el.diff --]
[-- Type: application/octet-stream, Size: 731 bytes --]

diff --git a/lisp/org-ascii.el b/lisp/org-ascii.el
index 01106c3..f9094a1 100644
--- a/lisp/org-ascii.el
+++ b/lisp/org-ascii.el
@@ -652,9 +652,8 @@ publishing directory."
       (if (or (not (equal (char-before) ?\n))
 	      (not (equal (char-before (1- (point))) ?\n)))
 	  (insert "\n"))
-      (setq char (or (nth (max (- umax level) 0)
-			  (reverse org-export-ascii-underline))
-		     (last org-export-ascii-underline)))	    
+      (setq char (or (nth (- level 1) org-export-ascii-underline)
+		     (car (last org-export-ascii-underline))))
       (unless org-export-with-tags
 	(if (string-match (org-re "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$") title)
 	    (setq title (replace-match "" t t title))))

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [PATCH] ASCII export: Fixed a bug.
  2011-02-13 10:54 [PATCH] ASCII export: Fixed a bug Valentin Wüstholz
@ 2011-02-13 11:44 ` Bastien
  2011-02-13 12:15   ` Valentin Wüstholz
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-13 11:44 UTC (permalink / raw)
  To: Valentin Wüstholz; +Cc: emacs-orgmode

Hi Valentin,

Valentin Wüstholz <wuestholz@gmail.com> writes:

> I have attached a small patch for a bug that I reported a while ago.
> See http://thread.gmane.org/gmane.emacs.orgmode/36097.

Thanks for this patch.  I've just applied a simplified version of it,
which takes care of the bug.  

Best,

-- 
 Bastien

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

* Re: [PATCH] ASCII export: Fixed a bug.
  2011-02-13 11:44 ` Bastien
@ 2011-02-13 12:15   ` Valentin Wüstholz
  2011-02-15  4:31     ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Valentin Wüstholz @ 2011-02-13 12:15 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hi Basten,

thanks. Is there a reason for keeping the 'reverse' operation? The
documentation for org-export-ascii-underline states that the
characters are ordered by level (1, 2, ...). Why should they be
accessed in reverse order then?

Best regards,

Valentin


On Sun, Feb 13, 2011 at 12:44 PM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Hi Valentin,
>
> Valentin Wüstholz <wuestholz@gmail.com> writes:
>
>> I have attached a small patch for a bug that I reported a while ago.
>> See http://thread.gmane.org/gmane.emacs.orgmode/36097.
>
> Thanks for this patch.  I've just applied a simplified version of it,
> which takes care of the bug.
>
> Best,
>
> --
>  Bastien
>

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

* Re: [PATCH] ASCII export: Fixed a bug.
  2011-02-13 12:15   ` Valentin Wüstholz
@ 2011-02-15  4:31     ` Bastien
  2011-02-15  6:58       ` Valentin Wüstholz
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-15  4:31 UTC (permalink / raw)
  To: Valentin Wüstholz; +Cc: emacs-orgmode

Hi Valentin,

Valentin Wüstholz <wuestholz@gmail.com> writes:

> thanks. Is there a reason for keeping the 'reverse' operation? The
> documentation for org-export-ascii-underline states that the
> characters are ordered by level (1, 2, ...). Why should they be
> accessed in reverse order then?

The docstring didn't match the default value for the defcustom: now it
does.  I also simplified `org-ascii-level-start' so that it use the
right level char.

Thanks for insisting on this,

-- 
 Bastien

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

* Re: [PATCH] ASCII export: Fixed a bug.
  2011-02-15  4:31     ` Bastien
@ 2011-02-15  6:58       ` Valentin Wüstholz
  2011-02-15  8:59         ` Valentin Wüstholz
  0 siblings, 1 reply; 7+ messages in thread
From: Valentin Wüstholz @ 2011-02-15  6:58 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Tue, Feb 15, 2011 at 5:31 AM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Hi Valentin,
>
> Valentin Wüstholz <wuestholz@gmail.com> writes:
>
>> thanks. Is there a reason for keeping the 'reverse' operation? The
>> documentation for org-export-ascii-underline states that the
>> characters are ordered by level (1, 2, ...). Why should they be
>> accessed in reverse order then?
>
> The docstring didn't match the default value for the defcustom: now it
> does.  I also simplified `org-ascii-level-start' so that it use the
> right level char.

Sounds good!

Thanks,

Valentin

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

* Re: [PATCH] ASCII export: Fixed a bug.
  2011-02-15  6:58       ` Valentin Wüstholz
@ 2011-02-15  8:59         ` Valentin Wüstholz
  2011-02-15  9:47           ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Valentin Wüstholz @ 2011-02-15  8:59 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hi Bastien,

I just noticed that the call to 'car' is missing:

------------------------------ lisp/org-ascii.el ------------------------------
index 3cc95e6..dd6f69b 100644
@@ -656 +656 @@ publishing directory."
-      		     (last org-export-ascii-underline)))
+      		     (car (last org-export-ascii-underline))))


Best regards,

Valentin


On Tue, Feb 15, 2011 at 7:58 AM, Valentin Wüstholz <wuestholz@gmail.com> wrote:
> On Tue, Feb 15, 2011 at 5:31 AM, Bastien <bastien.guerry@wikimedia.fr> wrote:
>> Hi Valentin,
>>
>> Valentin Wüstholz <wuestholz@gmail.com> writes:
>>
>>> thanks. Is there a reason for keeping the 'reverse' operation? The
>>> documentation for org-export-ascii-underline states that the
>>> characters are ordered by level (1, 2, ...). Why should they be
>>> accessed in reverse order then?
>>
>> The docstring didn't match the default value for the defcustom: now it
>> does.  I also simplified `org-ascii-level-start' so that it use the
>> right level char.
>
> Sounds good!
>
> Thanks,
>
> Valentin
>

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

* Re: [PATCH] ASCII export: Fixed a bug.
  2011-02-15  8:59         ` Valentin Wüstholz
@ 2011-02-15  9:47           ` Bastien
  0 siblings, 0 replies; 7+ messages in thread
From: Bastien @ 2011-02-15  9:47 UTC (permalink / raw)
  To: Valentin Wüstholz; +Cc: emacs-orgmode

Hi Valentin,

Valentin Wüstholz <wuestholz@gmail.com> writes:

> I just noticed that the call to 'car' is missing:
>
> ------------------------------ lisp/org-ascii.el ------------------------------
> index 3cc95e6..dd6f69b 100644
> @@ -656 +656 @@ publishing directory."
> -      		     (last org-export-ascii-underline)))

> +      		     (car (last org-export-ascii-underline))))

Argh, right, fixed again.

Thanks!

-- 
 Bastien

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

end of thread, other threads:[~2011-02-15  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-13 10:54 [PATCH] ASCII export: Fixed a bug Valentin Wüstholz
2011-02-13 11:44 ` Bastien
2011-02-13 12:15   ` Valentin Wüstholz
2011-02-15  4:31     ` Bastien
2011-02-15  6:58       ` Valentin Wüstholz
2011-02-15  8:59         ` Valentin Wüstholz
2011-02-15  9:47           ` Bastien

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).