From: Tim X <timx@nospam.dev.null>
Subject: Re: Plsql mode indenting broken on windows
Date: Fri, 27 Oct 2006 11:42:55 +1000 [thread overview]
Message-ID: <87wt6m355s.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 1161870609.438132.73470@i42g2000cwa.googlegroups.com
"kcrews02460" <kcrews02460@gmail.com> writes:
> In my previous post I failed to get the start of the 2nd error message.
> It begins:
>
> Search failed: "[
> ()]\\(a\\(?:ccess\\|dd\\|l\\(?:l\\|ter\\)\\
>
> kcrews02...@gmail.com wrote:
>> I'm running gnu emacs 21.3.1 on windows xp. I downloaded plsql.el
>> (version Version: 0.8.0) yesterday and it does not work properly.
>> Specifically, if I try to indent code I one of 2 errors:
>>
>> Invalid search bound (wrong side of point)
>>
>> or
>>
>> \\|dd\\|l\\(?:l\\|ter\\)\\|n\\(?:alyse\\|[dy]\\)\\|sc?\\|
>> udit\\|vg\\)\\|b\\(?:etween\\|y\\)\\|c\\(?:heck\\|luster\\|o\\(?:lumn\\|
>> m\\(?:m\\(?:\\(?:en\\|i\\)t\\)\\|press\\)\\|n\\(?:nect\\|tinue\\)\\)\\|
>> reate\\|urrent\\)\\|d\\(?:e\\(?:clare\\|lete\\|sc\\)\\|istinct\\|
>> rop\\)\\|e\\(?:scape\\|x\\(?:ec\\|ists\\|plain\\)\\)\\|f\\(?:loat\\|
>> o\\(?:r\\(?:\\(?:eig\\|tra\\)n\\)\\|und\\)\\|rom\\)\\|g\\(?:o\\|r\\(?:ant\\|
>> oup\\)\\)\\|having\\|i\\(?:dentified\\|mmediate\\|n\\(?:crement\\|dex\\|itial\\|sert\\|
>> t\\(?:eger\\|o\\)\\)?\\)\\|key\\|l\\(?:evel\\|ike\\|o\\(?:ck\\|ng\\)\\)\\|
>> m\\(?:ax\\|in\\(?:us\\)?\\|od\\(?:e\\|ify\\|ule\\)\\)\\|
>> n\\(?:o\\(?:\\(?:\\(?:aud\\|wa\\)i\\)?t\\)\\|u\\(?:ll\\|
>> meric\\)\\)\\|o\\(?:ffline\\|nline\\|ption\\|rder\\|[fnr]\\)\\|
>> p\\(?:ctfree\\|li\\|ri\\(?:mary\\|or\\)\\|ublic\\)\\|
>> r\\(?:e\\(?:\\(?:nam\\|sourc\\|vok\\(?:\\)?\\)e\\)\\|o\\(?:llback\\|
>> w\\(?:id\\|num\\|s\\)?\\)\\)\\|s\\(?:chema\\|e\\(?:ction\\|lect\\|ssion\\|
>> t\\)\\|hare\\|ize\\|ome\\|ql\\(?:code\\|error\\)\\|tart\\|y\\(?:nonym\\|
>> sdate\\)\\)\\|t\\(?:able\\|o\\|r\\(?:igger\\|uncate\\)\\)\\|u\\(?:id\\|
>> ni\\(?:on\\|que\\)\\|pdate\\|ser\\)\\|v\\(?:al\\(?:idate\\|ues\\)\\|iew\\)\\|
>> w\\(?:he\\(?:never\\|re\\)\\|ith\\|ork\\)\\)[
>>
>> ()]" Quit
>>
>> (Note - the 2nd error is really one long line - I added newlines for
>> readibility. Also, it looks kind of odd because the first characters
>> of the keywords are missing "etween" instead of "between", "able"
>> instead of "table", etc.)
>>
>> The version of sql.el that comes with this version of emacs is Version:
>> 1.6.3. I tried downloading the most recent version of sql.el (2.0.1
>> from
>> http://cvs.savannah.gnu.org/viewcvs/*checkout*/emacs/emacs/lisp/progmodes/sql.el)
>> but that did not help. (plsql mode depends on sql.el) Apparently it
>> was tested with emacs 22.1 and might not work with earlier versions of
>> emacs. I have not found any more recent version of emacs for windows
>> than the one I am running, even though it was built in 2004.
>>
>> Does anyone know of either
>>
>> 1) a fix for the indenting problems
>>
>> 2) versions of gnu emacs, sql.el and plsql.el that work together on
>> windows?
>>
>> The code below shows the problem. If you select the entire buffer and
>> indent it (C-\), you get the Invalid search bound error. If you put
>> the cursor at the beginning of the line starting FUNCTION, and press
>> tab, you get the other error.
>>
>> CREATE OR REPLACE PACKAGE BODY Indent_prob AS
>>
>> FUNCTION get_da_value(i_attr_name IN
>> gt_product_profile.attribute%TYPE,
>> i_def_value IN gt_product_profile.char_value%TYPE DEFAULT NULL)
>> RETURN VARCHAR2
>> AS
>> v_value gt_product_profile.char_value%TYPE := i_def_value;
>> BEGIN
>> SELECT char_value
>> INTO v_value
>> FROM gt_product_profile pp
>> WHERE ATTRIBUTE = i_attr_name
>> and UPPER(pp.userid) = 'PUBLIC';
>>
>> RETURN v_value;
>> EXCEPTION WHEN NO_DATA_FOUND THEN
>> IF v_value IS NULL THEN
>> RAISE;
>> END IF;
>> RETURN v_value;
>> END;
>> END Sce_Notification_Util;
>> /
>
I believe this is a long standing bug in plsql-mode. I submitted a
patch to fix this to the author about 4+ years ago, but have never
seen it implemented/updated. Essentially, I don't think there is any
currently maintained plsql-mode.
I would give you my patch, but I stopped working with Oracle not long
after that and don't seem to have it in my archives. However, I do
remember it was relatively easy to fix.
Enable debug on error in emacs and you should be able to track down
the problem quite easily. From memory (which could be completely
wrong), there was an error in one of the regular expressions.
Note that there are a few different plsql modes out there - I think
initially, I tracked down more than four. However, none of them were
being actively maintained and all of them had problems. The one I was
using I found on the emacs wiki site.
Tim
--
tcross (at) rapttech dot com dot au
prev parent reply other threads:[~2006-10-27 1:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-26 13:44 Plsql mode indenting broken on windows kcrews02460
2006-10-26 13:50 ` kcrews02460
2006-10-27 1:42 ` Tim X [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wt6m355s.fsf@lion.rapttech.com.au \
--to=timx@nospam.dev.null \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).