all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Abbrevs and Org Tables
@ 2008-04-20  9:44 Chris Randle
  2008-04-20 14:09 ` Jose Robins
  2008-04-22  3:32 ` Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Randle @ 2008-04-20  9:44 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I define an Emacs abbrev of, say, "hnbc" to exapand to "how now brown
cow", and then type "hnbc[space]" inside an org table cell. After it has
expanded it pushes the trailing cell divider away, even though the cell
width was adequate. Tabbing out of the cell doesn't re-fit the cell
divider - it stays "stuck" where it was after the expansion.

It's slightly odd, because if I type lots of leading spaces before the
abbrev and then tab, org happily moves the expanded text back to the
beginning of the cell, but still doesn't move the trailing divider.

C-c C-c fixes it, and also moving the cursor over to the trailing cell
divider and backspace one char and tab.

Any other workarounds or suggestions?

-- 
Chris Randle

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

* Re: Abbrevs and Org Tables
  2008-04-20  9:44 Abbrevs and Org Tables Chris Randle
@ 2008-04-20 14:09 ` Jose Robins
  2008-04-21 13:15   ` Carsten Dominik
  2008-04-22  3:32 ` Carsten Dominik
  1 sibling, 1 reply; 5+ messages in thread
From: Jose Robins @ 2008-04-20 14:09 UTC (permalink / raw)
  To: Chris Randle; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1844 bytes --]

On a related note, I have some emphasis formatting/cell width problems 
within tables.
I have some custom emphasis alist along with hiding the emphasis markers 
defined so...

'(org-emphasis-alist (quote (("*" bold "<b>" "</b>") ("/" italic "<i>" 
"</i>") ("_" underline "<u>" "</u>") ("=" org-code "<code>" "</code>" 
verbatim) ("~" org-verbatim "" "" verbatim) ("+" (:strike-through t) 
"<del>" "</del>") ("&" font-lock-keyword-face "" "") ("#" j-green-face 
"" "") ("^" j-highlight-face "" ""))))

 '(org-hide-emphasis-markers t)

where j-green-face or essentially the default face with the color green etc.

When I do an emphasis inside a table, the emphasis special characters 
would disappear and the correct formatting would appear on the word, 
however the right cell vertical divider character would get pulled in by 
1 character. <tab> does not resize the table cell properly. I need to 
manually insert a space to move the divider to the right and then 
everything would work as expected.  Just a minor annoyance..

Not sure if I explained the issue correctly...

Jose

Chris Randle wrote:
> Hi
>
> I define an Emacs abbrev of, say, "hnbc" to exapand to "how now brown
> cow", and then type "hnbc[space]" inside an org table cell. After it has
> expanded it pushes the trailing cell divider away, even though the cell
> width was adequate. Tabbing out of the cell doesn't re-fit the cell
> divider - it stays "stuck" where it was after the expansion.
>
> It's slightly odd, because if I type lots of leading spaces before the
> abbrev and then tab, org happily moves the expanded text back to the
> beginning of the cell, but still doesn't move the trailing divider.
>
> C-c C-c fixes it, and also moving the cursor over to the trailing cell
> divider and backspace one char and tab.
>
> Any other workarounds or suggestions?
>
>   

[-- Attachment #1.2: Type: text/html, Size: 2340 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

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

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

* Re: Abbrevs and Org Tables
  2008-04-20 14:09 ` Jose Robins
@ 2008-04-21 13:15   ` Carsten Dominik
  2008-04-21 14:09     ` Jose Robins
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-04-21 13:15 UTC (permalink / raw)
  To: Jose Robins; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 2278 bytes --]


On Apr 20, 2008, at 4:09 PM, Jose Robins wrote:

> On a related note, I have some emphasis formatting/cell width  
> problems within tables.
> I have some custom emphasis alist along with hiding the emphasis  
> markers defined so...
>
> '(org-emphasis-alist (quote (("*" bold "<b>" "</b>") ("/" italic  
> "<i>" "</i>") ("_" underline "<u>" "</u>") ("=" org-code "<code>" "</ 
> code>" verbatim) ("~" org-verbatim "" "" verbatim) ("+" (:strike- 
> through t) "<del>" "</del>") ("&" font-lock-keyword-face "" "") ("#"  
> j-green-face "" "") ("^" j-highlight-face "" ""))))
>
>  '(org-hide-emphasis-markers t)
>
> where j-green-face or essentially the default face with the color  
> green etc.
>
> When I do an emphasis inside a table, the emphasis special  
> characters would disappear and the correct formatting would appear  
> on the word, however the right cell vertical divider character would  
> get pulled in by 1 character. <tab> does not resize the table cell  
> properly. I need to manually insert a space to move the divider to  
> the right and then everything would work as expected.  Just a minor  
> annoyance..
>
> Not sure if I explained the issue correctly...

Hi Jose,

does C-c C-c fix the alignment, or not?

- Carsten

>
>
> Jose
>
> Chris Randle wrote:
>>
>> Hi
>>
>> I define an Emacs abbrev of, say, "hnbc" to exapand to "how now brown
>> cow", and then type "hnbc[space]" inside an org table cell. After  
>> it has
>> expanded it pushes the trailing cell divider away, even though the  
>> cell
>> width was adequate. Tabbing out of the cell doesn't re-fit the cell
>> divider - it stays "stuck" where it was after the expansion.
>>
>> It's slightly odd, because if I type lots of leading spaces before  
>> the
>> abbrev and then tab, org happily moves the expanded text back to the
>> beginning of the cell, but still doesn't move the trailing divider.
>>
>> C-c C-c fixes it, and also moving the cursor over to the trailing  
>> cell
>> divider and backspace one char and tab.
>>
>> Any other workarounds or suggestions?
>>
>>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[-- Attachment #1.2: Type: text/html, Size: 3018 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

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

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

* Re: Abbrevs and Org Tables
  2008-04-21 13:15   ` Carsten Dominik
@ 2008-04-21 14:09     ` Jose Robins
  0 siblings, 0 replies; 5+ messages in thread
From: Jose Robins @ 2008-04-21 14:09 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3593 bytes --]



Carsten Dominik wrote:
>
> On Apr 20, 2008, at 4:09 PM, Jose Robins wrote:
>
>> On a related note, I have some emphasis formatting/cell width 
>> problems within tables.
>> I have some custom emphasis alist along with hiding the emphasis 
>> markers defined so...
>>
>> '(org-emphasis-alist (quote (("*" bold "<b>" "</b>") ("/" italic 
>> "<i>" "</i>") ("_" underline "<u>" "</u>") ("=" org-code "<code>" 
>> "</code>" verbatim) ("~" org-verbatim "" "" verbatim) ("+" 
>> (:strike-through t) "<del>" "</del>") ("&" font-lock-keyword-face "" 
>> "") ("#" j-green-face "" "") ("^" j-highlight-face "" ""))))
>>
>>  '(org-hide-emphasis-markers t)
>>
>> where j-green-face or essentially the default face with the color 
>> green etc.
>>
>> When I do an emphasis inside a table, the emphasis special characters 
>> would disappear and the correct formatting would appear on the word, 
>> however the right cell vertical divider character would get pulled in 
>> by 1 character. <tab> does not resize the table cell properly. I need 
>> to manually insert a space to move the divider to the right and then 
>> everything would work as expected.  Just a minor annoyance..
>>
>> Not sure if I explained the issue correctly...
>
> Hi Jose,
>
> does C-c C-c fix the alignment, or not?
>
> - Carsten
Hi Carsten,
Actually, C-c C-c does work while <tab> does not work reliably. I was 
just trying out different emphasis markers. Bold was what was giving me 
problem today (* regexp) - <TAB> didn't work while C-c C-c worked. My 
customized ones seemed to work fine today. However I do distinctly 
remember them not working properly earlier.  Let me know if C-c C-c is 
the "recommended" method for reformatting tables...

I've also found my custom emphasis markers not working reliably on 
headlines. Sometimes, they will revert back to not being emphasized 
depending on the following headline's contents. Not sure if using 
emphasis markers on headlines is discouraged or not. If you like, I can 
document this better and send you more details on the type of actions 
that cause the formatting to break.

I've always been known to indulge in "corner" cases and using things on 
the bleeding edge, so things like this always happen to me :)

Thanks,
Jose

>
>>
>>
>> Jose
>>
>> Chris Randle wrote:
>>>
>>> Hi
>>>
>>> I define an Emacs abbrev of, say, "hnbc" to exapand to "how now brown
>>> cow", and then type "hnbc[space]" inside an org table cell. After it 
>>> has
>>> expanded it pushes the trailing cell divider away, even though the cell
>>> width was adequate. Tabbing out of the cell doesn't re-fit the cell
>>> divider - it stays "stuck" where it was after the expansion.
>>>
>>> It's slightly odd, because if I type lots of leading spaces before the
>>> abbrev and then tab, org happily moves the expanded text back to the
>>> beginning of the cell, but still doesn't move the trailing divider.
>>>
>>> C-c C-c fixes it, and also moving the cursor over to the trailing cell
>>> divider and backspace one char and tab.
>>>
>>> Any other workarounds or suggestions?
>>>
>>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>   

[-- Attachment #1.2: Type: text/html, Size: 4858 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

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

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

* Re: Abbrevs and Org Tables
  2008-04-20  9:44 Abbrevs and Org Tables Chris Randle
  2008-04-20 14:09 ` Jose Robins
@ 2008-04-22  3:32 ` Carsten Dominik
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2008-04-22  3:32 UTC (permalink / raw)
  To: Chris Randle, Jose Robins; +Cc: emacs-orgmode


On Apr 20, 2008, at 11:44 AM, Chris Randle wrote:

> Hi
>
> I define an Emacs abbrev of, say, "hnbc" to exapand to "how now brown
> cow", and then type "hnbc[space]" inside an org table cell. After it  
> has
> expanded it pushes the trailing cell divider away, even though the  
> cell
> width was adequate. Tabbing out of the cell doesn't re-fit the cell
> divider - it stays "stuck" where it was after the expansion.
>
> It's slightly odd, because if I type lots of leading spaces before the
> abbrev and then tab, org happily moves the expanded text back to the
> beginning of the cell, but still doesn't move the trailing divider.
>
> C-c C-c fixes it, and also moving the cursor over to the trailing cell
> divider and backspace one char and tab.
>
> Any other workarounds or suggestions?

Hi Chris, Jose,

maybe it is useful to explain a bit how the table editor works.  Each  
time you press a character,  Org checks if you are doing this inside a  
table.  If yes, Org is checking if it can insert the character into  
the current field., it it fits in there.  If yes it does so.  If not,  
it raises a flag that the next TAB should trigger a re-alignment of  
the table.  Org goes through all this to avoid having the re-align the  
table always, each time you press TAB, because for large tables this  
can lead to a significant slowdown.

Now, the two things mentioned in this thread, abbrev expansion and  
hiding of emphasis markers, happen outside the control of normal  
editing.  Both happen by some hook, and the corresponding change in  
field width is not noticed by Org.  It is not easy to fix this without  
endangering the mechanism that suppresses constant table alignment.   
It seems to me that these two cases are rare enough that it is not too  
much to ask to quickly fix things with C-c C-c.

I this really bothers you, take a look at the variable `org-enable- 
table-editor'.  The default for this variable is `optimized', which  
leads to the discussed behavior.  If you set it to t, each TAB will re- 
align the table.

HTH

- Carsten

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

end of thread, other threads:[~2008-04-22  3:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-20  9:44 Abbrevs and Org Tables Chris Randle
2008-04-20 14:09 ` Jose Robins
2008-04-21 13:15   ` Carsten Dominik
2008-04-21 14:09     ` Jose Robins
2008-04-22  3:32 ` Carsten Dominik

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.